Find with condition in loop can't create cell array
Mostra commenti meno recenti
Hello, i have to crate a new vector that will have the different number of peaks in each row for each pulse. So i have this graph where red squares are the minimal and the blue are the peaks for each pulse as you can see. These vectors are pks=[4432 4434 4452 4413 4402 4406 4395 4397 4347 4408 2486 1761 1771 1788 3953], the peaks , lo=[175 203 262 454 553 773 852 1054 1167 1369 1560 1738 1800 1860 2023], the locations of the peaks, also vect=[67 353 646 951 1265 1540], the locations of the minima. Hence i will need to use the find funtion and them store my results to cell, as the number of peaks may differ as you can see from the photo. I did all the above but i get error saying that "Cell contents assignment to a non-cell array object" , here is my code maybe i am missing something but i can't really understand what i am doing wrong , any help really appreciated ,thanks in advance.
for k=1:size(vect,2)
az{k}=find( lo>vect(k) & lo<vect(k+1) );
end

Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Loops and Conditional Statements in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!