Matlab find and print coordinates of array values

13 次查看(过去 30 天)
I have this array:
A =
30 18 40 58 26
70 19 72 29 47
14 48 40 14 48
13 72 59 66 72
I want the program to find the coordinates of the values that are equal or bigger than 42 and then print those answers like this (line,row)

采纳的回答

Walter Roberson
Walter Roberson 2020-1-27
[row, col] = find(A>=42);
fprintf('(%d, %d)\n', [col(:), row(:)].')

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by