From: Bryan on
I want matlab to perform certain action if the user does nos insert a value for a variable after certain time? Is there any way to do that?
Thank you very much.
From: kk KKsingh on
"Bryan " <bryancasares(a)hotmail.com> wrote in message <htkgng$4n6$1(a)fred.mathworks.com>...
> I want matlab to perform certain action if the user does nos insert a value for a variable after certain time? Is there any way to do that?
> Thank you very much.

Well you can use tic toc facility of matlab ! And can create a if loop for time value like if

if (toc=3 min)
disp('Insert the number')
else
Go back to loop

It can also be written using for loop ! GIve a try


Thanks
From: Walter Roberson on
Bryan wrote:
> I want matlab to perform certain action if the user does nos insert a
> value for a variable after certain time? Is there any way to do that?

uiwait() with a timeout.
From: us on
"Bryan " <bryancasares(a)hotmail.com> wrote in message <htkgng$4n6$1(a)fred.mathworks.com>...
> I want matlab to perform certain action if the user does nos insert a value for a variable after certain time? Is there any way to do that?
> Thank you very much.

....yet another hint:

help timer;

us
From: Bryan on
"Bryan " <bryancasares(a)hotmail.com> wrote in message <htkgng$4n6$1(a)fred.mathworks.com>...
> I want matlab to perform certain action if the user does nos insert a value for a variable after certain time? Is there any way to do that?
> Thank you very much.

Thank you very much for your answer, but I still have a problem.
The last line executed in my program would be
a=input('Insert value')
I want the program to asign 0 to the variable "a" if the user does not insert a value after 60 seconds. The problem is that I cannot find a way to stop executing "input"
I'm sorry but I couldn't do that with your suggestions, maybe I just didn't understand.
Thank you very much!