Use a nx2 matrix to indicate desired positions on another matrix

Hello everyone,
I have a quick question, how can i use the matrix lets say
pos = [1 2; 3 3];
as a guide to change the values of another matrix lets say
val = zeros(3);
avoiding for loops. What i want is something like var(pos(1,end,:)) = "some value"

More Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Products

Asked:

on 31 Oct 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!