Open links in new tab
  1. Replacing values in a Matrix - MATLAB Answers - MATLAB Central

    Aug 15, 2016 · How do I write a script to replace all the 25's, with a certain value, and the 40's with another value and 12's with another value?

  2. how to replace the element in matrix? - MATLAB Answers

    May 16, 2013 · i have a matrix if true A = [ 1 5 9 7 3 5 7 8 8 2 4 6 ]; end now i want to put number 12 in the location of A(2,2) also i want to put number 13 in the location ...

  3. How to replace numbers in an array - MATLAB Answers

    Nov 8, 2011 · I have a sample array a=[3 2 5 7 4 8 2 5], I would like to replace all numbers greater than 5(>5) to be 5, the expected result should be a=[3 2 5 5 4 5 2 5]. Thank you very much. 0 Comments

  4. changem - MathWorks

    B = changem(A,new) replaces all occurrences of 0 in array A with the specified scalar new. This function is useful for replacing values in classification grids.

  5. Replace values at certain positions (positions given in an array, as ...

    Aug 11, 2017 · I want to change the value of numbers or text in certain position. indexing doesn't actually work when you have huge data with some values in different places that you want to keep. that's why it's not helpful.

  6. Changing a specific value in a matrix - MATLAB Answers

    I request a x,y input where i would want a function to change the value (it could be from 0 to 1 or 9) in the matrix (2,4 for instance). I have found plenty of solutions where you change all the 0's to 1's but not a specific target.

  7. replace elements in an Array with other elements - MATLAB …

    Jul 20, 2015 · i want now to replace the element with this index with the previous value. it means i want to get: A_new=[1 2 3 3 3 3 5 8 7 7 6 6]. i did it with a loop. is there any method without loop?

  8. changing value in a 2d array - MATLAB Answers - MATLAB Central …

    Jul 11, 2011 · I would like to know how to change values in a 2d array. For example, I have an 2d array A as of 1000x1000, of all zero values I want to change value in position, 1x1, 1x100, 1x1000 to value 1.

  9. How to replace the elements of a matrix using the ... - MathWorks

    Jun 5, 2011 · I want to replace the elements of a matrix using different conditions. For instance, let all elements larger than 0.5 be replaced by -1, else keep the way it is. So I thought I should ...

  10. Searching and replacing values in a matrix - MATLAB Answers

    Apr 19, 2021 · I have a very large matrix of ones and zeros X. I would like to replace all the ones in the first column with a value, and all the zeros in the same column with a different value. I would like to d...

  11. Some results have been removed
Refresh