How to choose the values from matrix
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
As Excel is having V-Lookup & H-Lookup command. Does MatLab is having any method to choose the value from matrix dependent on the two values in left column values and Top row values.
Please any body share the knowledge in this regard.
Thank you.
3 Kommentare
Akzeptierte Antwort
TAB
am 15 Feb. 2013
Do you mean something like this...
Data = [1 2 3 4 5;
10 5 6 7 9;
20 8 47 9 6;
30 4 7 25 12]
FirstCol_Val = 20;
FirstRow_Val = 4;
FoundValue = Data((Data(:,1)==FirstCol_Val), (Data(1,:)==FirstRow_Val));
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!