How to delete elements from vector in for loop?
이전 댓글 표시
I have an A vector and I want to remove values less than the 0.1*max(A). Also I want to remove same rows in a B vector with respect to A:
size(B)= 801 1 size(A)=801 1
The error that I got is:
'A null assignment can have only one non-colon index.'
for p=length(A):-1:1
if A(p,1)<max(A)*0.1
A(p,1)=[]; B(p,1)=[];
end
end
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 루프와 조건문에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!