i have the store of sum and want to know the index
1 回表示 (過去 30 日間)
古いコメントを表示
i have the store_sum=[ 0.18,0.27,0.43,0.57];
and i want to know the index
starting from colum colum 2 in this matrix
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/294694/image.png)
0 件のコメント
採用された回答
Ameer Hamza
2020 年 5 月 20 日
See ismembertol(): https://www.mathworks.com/help/releases/R2020a/matlab/ref/ismembertol.html. Something like this
M % name of your matrix
store_sum=[ 0.18,0.27,0.43,0.57];
[~, idx] = ismembertol(store_sum, M(:,2));
idx is index of elements of store_sum in the 2nd column of M.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Matrices and Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!