フィルターのクリア

finding values in a column

1 回表示 (過去 30 日間)
James Connor
James Connor 2015 年 11 月 15 日
コメント済み: James Connor 2015 年 11 月 15 日
If I have a 2x6 table
x=[2.85952761913254,-1.33764402056949,-2.74861220460403,-2.39401291954310,-2.41122090675109,-2.58624072856484;1.98331894606493,2.70742364289862,3.50139737348142,3.34125579107176,3.92698601521501,0.804096918943113]
how do I find the angle that is above the highest length in the bottom. for example lengths are displayed on the second row and angles on the first. How do I find the angle in the first row for the highest length in the second row. So in this example the highest length is 3.9270 and its corresponding angle is -2.4112 so ans=-2.4112
Thanks
  2 件のコメント
Jan
Jan 2015 年 11 月 15 日
This does not look like a "table", but like a standard matrix.
James Connor
James Connor 2015 年 11 月 15 日
yes sorry it appears to be a matrix

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

採用された回答

Jan
Jan 2015 年 11 月 15 日
x = [2.85952761913254,-1.33764402056949,-2.74861220460403,-2.39401291954310, ...
-2.41122090675109,-2.58624072856484; ...
1.98331894606493,2.70742364289862,3.50139737348142,3.34125579107176, ...
3.92698601521501,0.804096918943113];
[maxValue, maxIndex] = max(x(2, :));
maxAngle = x(1, maxIndex);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by