Checking Previous Value in an Array.
显示 更早的评论
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
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!