How to find the row and column number in a table
5 ビュー (過去 30 日間)
古いコメントを表示
I want to find the row and column number in a table for expemple A=[1 13 4 7 5 10 21] What is the row and column of 7
0 件のコメント
回答 (1 件)
Abhishek Tiwari
2022 年 6 月 30 日
Hi,
It can be done with a simple conditional expression and find(). The conditional statement will convert your vector to a binary vector, and then find() will locate all the values that are 1. Here's an example:
A = [1 13 4 7 5 10 21];
[row, column] = find(A==7)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Tables についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!