selecting values from matrix
Show older comments
Hi everyones,
I explain my question with an example :
q2 is obtained from an equation
A=[r1 r2 r3;q1 q2 q3;k1 k2 k3];
I want to select proportional row values (r2 and k2).
what should I do?
Thanks.
Accepted Answer
More Answers (1)
the cyclist
on 23 Nov 2015
Here's one way:
idx = A(2,:)==q2;
values = A([1 3],idx);
3 Comments
Hamid
on 23 Nov 2015
the cyclist
on 23 Nov 2015
Maybe Star Strider's answer works for you? If not, then I would say you should start over with a new question, and fully specify the general problem.
Hamid
on 23 Nov 2015
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!