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
댓글 수: 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!