Is it possible to keep Matlab idle (for some time, let's say 60 secs) using m-code and then run the same / another m-code program iteratively.
I want this, beacuse I am facing some problem with Matlab memory and it doesn't after n no of iterations in my program. But it runs for several iterations (without quitting Matlab) if I run every single iteration and keep Matlab idle for some time.

Hope you understood my problem.

Best Regards,
Sunil

Subject: Looking for way to keep Matlab idle using m-code (for Windows application)

"Sunil " <sunil.nagtilak@gmail.com> wrote in message <i53cq5$31g$1@fred.mathworks.com>...
> Dear All,
>
> Is it possible to keep Matlab idle (for some time, let's say 60 secs) using m-code and then run the same / another m-code program iteratively.
> I want this, beacuse I am facing some problem with Matlab memory and it doesn't after n no of iterations in my program. But it runs for several iterations (without quitting Matlab) if I run every single iteration and keep Matlab idle for some time.
>
> Hope you understood my problem.
>
> Best Regards,
> Sunil

doc pause

Subject: Looking for way to keep Matlab idle using m-code (for Windows application)

> doc pause
Hello Andy,
Sorry i forgot to mention that i have already tried pause cmd, but it will not idle Matlab and it is not working for me. What I am looking for is something which can idle Matlab, in simple words it should show ">>" in command window

Sunil

Subject: Looking for way to keep Matlab idle using m-code (for Windows application)

"Sunil " <sunil.nagtilak@gmail.com> wrote in message <i53eqc$i52$1@fred.mathworks.com>...
>
> > doc pause
> Hello Andy,
> Sorry i forgot to mention that i have already tried pause cmd, but it will not idle Matlab and it is not working for me. What I am looking for is something which can idle Matlab, in simple words it should show ">>" in command window
>
> Sunil

doc timer

Subject: Looking for way to keep Matlab idle using m-code (for Windows application)

I think 'timer' should work for my problem.. I tried to use this cmd in my code is one of my while loop with timer period of 180 secs.. but instead of waiting 180 secs to execute the TimerFcn it goes to next line in m-code. I want program to wait till it exceutes the TimerFcn and then goto next line in the code. I tried using a while loop with condition on task executed, but when i run this code my Matlab could not terminate it!!? even Ctrl+c is also not terminating this program :P
here is my code
================================
clear all;
clc;
tasks=0;
while (tasks<=0)
t = timer('StartDelay', 10,'Period', 1,'TasksToExecute', 1,...
'ExecutionMode','fixedRate');

You're close! Run this:
%
T = timer('timerfcn','disp(''Hello World'')','ExecutionMode','fixedRate','Period',7)
start(T)
%
Now every seven seconds it'll display 'Hello World' to the command line. You can do whatever else you want while this is running.

What you were doing above is creating a new timer every time through the loop which defeats the purpose of timers. What you want is one timer that sits in the background and does its thing whenever it has to; leaving everything else open.

Subject: Looking for way to keep Matlab idle using m-code (for Windows application)

> You're close! Run this:
> %
> T = timer('timerfcn','disp(''Hello World'')','ExecutionMode','fixedRate','Period',7)
> start(T)
> %
> Now every seven seconds it'll display 'Hello World' to the command line. You can do whatever else you want while this is running.
>
> What you were doing above is creating a new timer every time through the loop which defeats the purpose of timers. What you want is one timer that sits in the background and does its thing whenever it has to; leaving everything else open.

Hello Sean,

My main concern is that I don't want to run any other application while my timer function is running !! Is that possible?

Sunil

Subject: Looking for way to keep Matlab idle using m-code (for Windows application)

"Sunil " <sunil.nagtilak@gmail.com> wrote in message
news:i55mkn$mm8$1@fred.mathworks.com...
>> You're close! Run this:
>> %
>> T = timer('timerfcn','disp(''Hello
>> World'')','ExecutionMode','fixedRate','Period',7)
>> start(T)
>> %
>> Now every seven seconds it'll display 'Hello World' to the command line.
>> You can do whatever else you want while this is running.
>>
>> What you were doing above is creating a new timer every time through the
>> loop which defeats the purpose of timers. What you want is one timer
>> that sits in the background and does its thing whenever it has to;
>> leaving everything else open.
>
> Hello Sean,
>
> My main concern is that I don't want to run any other application while my
> timer function is running !! Is that possible?