matlab - Manipulate specific regions of matrix -


I want to manipulate a matrix / look-up table in the matrix: Matrix is ​​working here:

  0 5 10 15 20 25 30 35 40 45 50 0 3 4 5 6 4 5 5 5 5 20 3 4 5 6 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 41 4 5 6 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 3 3 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 3 5 5 5 5 4 5 6 5 4 5 5 5 5   

The first column and row I want to use as my variable, for example, for example if I manipulate a specific area I want to, how do I do this? Like all prices had to be multiplied by 5 - 15 (the top row) and 20-41 (the first column) 1.33.

Ideally, I want to use it in GUI but I want to get this concept to be understood first because I am still a new user for the software.

Thanks for all help,

kind of relationship,

Sam

Use, to combine lines and column positions (can also be done with repmat ). Then use that index to apply the desired operation to the selected entries.

Let A denote your matrix: ind = bsxfun (@and, a (1,:)> = 5 and a (1, :) & lt; = 15, a (:, 1)> = 20 & amp; nbsp; a (:, 1) & lt; = 41); A (Ind) = A (Ind) * 1.33;

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -