How can delete specific values from below matrix?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi.
I'd like to delete the columns from matrix distance which don't meet the condition inx.
Thanks.
for ig= 1:length(A)
distance(:,ig) = sqrt(abs(((A(:,1)-A(ig,1)).^2+(A(:,2)-A(ig,2)).^2)));
inx = distance>=50;
end
0 Kommentare
Antworten (1)
Dyuman Joshi
am 15 Dez. 2019
To delete elements(columns here) from a matrix(distance) that don't meet a condition (distance>=50), you can do this
distance(distance<50)=[];
Siehe auch
Kategorien
Mehr zu Feature Detection and Extraction finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!