Home How to end loop if value does not change for X consecutive seconds in Matlab
Reply: 0

How to end loop if value does not change for X consecutive seconds in Matlab

user392
1#
user392 Published in June 19, 2018, 4:15 pm

I am collecting data from a potentiometer connected to an Arduino. In the script, I tell matlab to keep collecting data for 2 minutes. But I need to tell it that if the user does not move the potentiometer for 10 consecutive seconds, then it should stop the loop and move to the next session (write the data to an excel file). Does anybody have ideas on how to achieve this?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.316094 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO