How to choose the values from matrix

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 件のコメント

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 2 月 15 日
What does that mean?
Rupesh
Rupesh 2013 年 2 月 15 日
I want to choose the value from matrix which based on the two values. One value from first column & one value from the first row is to be refered to find the required value. eg. Say a table containing a pump details & a Pump is to be selected based on the discharge quantity & the operating Head of pump.
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 2 月 15 日
Can you illustrate with a short example?

サインインしてコメントする。

 採用された回答

TAB
TAB 2013 年 2 月 15 日

0 投票

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));

1 件のコメント

Rupesh
Rupesh 2013 年 2 月 15 日
Thanks a Lot for Prompt answer.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

質問済み:

2013 年 2 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by