find value with row and column

조회 수: 2 (최근 30일)
Álvaro
Álvaro 2023년 2월 20일
답변: Voss 2023년 2월 20일
Hi
i need find value in matrix corresponding with row and column.

답변 (1개)

Voss
Voss 2023년 2월 20일
matrix = magic(4)
matrix = 4×4
16 2 3 13 5 11 10 8 9 7 6 12 4 14 15 1
value = 10
value = 10
[row,column] = find(matrix == value)
row = 2
column = 3

카테고리

Help CenterFile Exchange에서 NaNs에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by