How to remove array elements after comparing it to another array?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Karolis Naujalis
am 6 Mai 2020
Kommentiert: Karolis Naujalis
am 7 Mai 2020
Hello guys,
I am facing the issues with removing unneeded part of array, which I read from .xlsx file. The thing is, that I want to have the same vector lengths of time and yaxis vectors. I read my time vector from the xlsx file and after that I read the Yaxis value from the same xlsx. As you see, I managed to do a time cutoff after 30 seconds, so I need to make the same vectors length. How can I make a cutoff for another vector and make it the same length? Any ideas?
Thanks!
time=xlsread('duom.xlsx', 'A3:A7040');
mask = time > 30
time(mask) = [];
yaxis=xlsread('duom.xlsx','C3:C7040');
0 Kommentare
Akzeptierte Antwort
Rik
am 6 Mai 2020
The same you already had:
time=xlsread('duom.xlsx', 'A3:A7040');
yaxis=xlsread('duom.xlsx','C3:C7040');
mask = time > 30
time(mask) = [];
yaxis(mask) = [];
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!