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

1 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by