want to find the particular column when the column content is given

4 ビュー (過去 30 日間)
suresh
suresh 2012 年 1 月 19 日
a=[1 4 5 9 40 23 18] then if a(5) on command window then output 40 then 'what is the command to know' in which column 40 is there?

採用された回答

Andrei Bobrov
Andrei Bobrov 2012 年 1 月 19 日
i1 = find(a == 40)
OR
i1 = find(abs(a - 40) < 1e3*eps)

その他の回答 (1 件)

Robert Cumming
Robert Cumming 2012 年 1 月 19 日

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by