Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

how to use pause command inside embedded matlab in simulink?

Asked by Sivakumaran Chandrasekaran on 20 Oct 2012

I wrote a code for fft and placed inside embedded matlab block. I am getting error when i run it. Can anyone tell me option to go for an alternate solution for the use of " pause " command. x0=1;x1=2;x8=3;x9=4;

pause(.04)

a0=x0+x8

pause(.08)

a1=x1+x9

the above code is just a part of my project

0 Comments

Sivakumaran Chandrasekaran

Products

1 Answer

Answer by Azzi Abdelmalek on 20 Oct 2012
Edited by Azzi Abdelmalek on 20 Oct 2012

function pause is not supported with matlab function, use instead interpreted matlab function

the content of your function file is

function y=fpose(u)
y1=u(1)+u(2)
pause(0.4)
y2=u(1)*u(2)
pause(0.4)
y=y1+y2

3 Comments

Thanks Azzi.. Can you give little bit more explanation about interpreted matlab function.

Azzi Abdelmalek on 20 Oct 2012

what version of matlab?

Azzi Abdelmalek on 20 Oct 2012

in matlab editor program a function (e.g named fpose)

function y=fpose(u)
%your code
pause(0.1)

in matlab function block set a name of your function created before

Azzi Abdelmalek

Contact us