Extracting only certain data from a matrix
이전 댓글 표시
I have a very large matrix and I need only certain data to show from it. I need only the data that has values of 3 in the first column. How do I find this.
댓글 수: 1
the cyclist
2023년 7월 11일
답변 (2개)
Stephen23
2023년 7월 11일
Where M is your matrix:
X = M(:,1)==3;
B = M(X,:)
Parth Saraf
2023년 7월 11일
Hi,
You can try using this:
M(M(:, 1) == 3)
Hope this helps!
댓글 수: 1
the cyclist
2023년 7월 11일
I think this needs to be
M(M(:, 1) == 3,:)
카테고리
도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!