how to find a value of matrix in a specific position?

3 ビュー (過去 30 日間)
Akmyrat
Akmyrat 2014 年 5 月 5 日
コメント済み: Akmyrat 2014 年 5 月 5 日
Lets say I have a matrix A=[1 2 3;2 4 5;6 5 4] and I want to find value at i=2 j=3 which is 5. But I want that program finds that value for me. For example i want something like that, short description " if at i=2 j=3 value is 5, end program, else check i=3 j=1". I would appreciate if someone can help me.

採用された回答

Sara
Sara 2014 年 5 月 5 日
if(A(2,3) == 5)
...your code
elseif(A(3,1) == 89)
...your code
end
  1 件のコメント
Akmyrat
Akmyrat 2014 年 5 月 5 日
thanks a lot Sara :)

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by