Creating new matrix with another matrix
Ältere Kommentare anzeigen
We have a matrix,if any of the rows has a 0 at the last column we take the that row to write a new matrix and it will continue till the end of the old matrix.
Antworten (1)
Rik
am 20 Nov. 2019
Do you mean something like this?
data=randi([-2 5],[50 70]);
hasZeroInLastCol= data(:,end)==0;
newdata=data(hasZeroInLastCol,:);
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!