From: Rick T on 3 Feb 2010 06:52 Greetings All I have a slider in a matlab gui that is connected to the phase angle of a sinwave, I would like for the phase angle slider to increment over time 0 to 360 at a specified rate showing what happens to the signal over time, then have the process stop after 60 seconds is this possible? If so how? Example: Have phase angle slider increment automatically or when a button is pressed from 0 to 360 in 10 seconds and stop after 60 seconds Have phase angle slider increment automatically or when a button is pressed from 0 to 360 in 0.5 seconds and stop after 60 seconds tia sal22
From: ImageAnalyst on 3 Feb 2010 08:30 Have you tried the timer object? From the help: This example constructs a timer object with a timer callback function handle, mycallback, and a 10 second interval. t = timer('TimerFcn',@mycallback, 'Period', 10.0); In the timer callback or your button callback, you can enable or disable the timer depending on your criteria.
|
Pages: 1 Prev: Exit from a loop using push button Next: Editing sound files in MATLAB |