removing zeros from matrix
Ältere Kommentare anzeigen
Hi,
I've constructed a code looking at vertical force data and have it set to put each stance phase into it's own column. The one issue I'm having is that I have all these extra zeros. Any way to remove them so I don't have to export all of these zeros with the data I care about? Have tried "remove," "nonzeros," and "~=0" functions but with no luck.
Thanks in advance
1 Kommentar
Jan
am 19 Dez. 2021
Post the code you have tried and explain "no luck" with details. Then the readers can mention, what the problem is.
Antworten (1)
Jan
am 19 Dez. 2021
x(x==0) = [];
% Or:
x = x(x~=0);
Where do the zeros come from? Instead of removing them it might be easier to avoid to create them before.
1 Kommentar
Perri Johnson
am 20 Dez. 2021
Kategorien
Mehr zu Pulse and Transition Metrics 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!