Checking Previous Value in an Array.
Mostra commenti meno recenti
Hey All,
Currently I need to find all values in an array that are over a defined value, if the last 6 preceding values are under 0.
At the moment finding values over the defined value is no problem but I can't figure out how to check for the preceding value. This is what I have right now;
acceleration_z_output = file.data( : , 2 );
acceleration_limit = (5)
Z_Check = acceleration_z_output(acceleration_z_output > acceleration_limit);
I Need something like this;
acceleration_z_output = file.data( : , 2 );
acceleration_limit = (5)
Z_Check = acceleration_z_output(acceleration_z_output > acceleration_limit && last_6_values of acceleration_z_output < 0);
Any Idea How to do this? Cheers
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Matrix Indexing 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!