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

Problem with Level2 s function

Asked by Arun Badigannavar on 18 Dec 2012

I have developed level 2 s function ,which takes one input and give one output,,, The output value is the adiition of input... Y=output,,, x=input,,, My s function does like,,,, y=x+x;,,, it works nicely,,, now i want to develop a logic where the data input x will be saved to workspace every step increment,,, what is the method to do it?

1 Comment

Guy Rouleau on 26 Dec 2012

I think it is important to know why you want to save the data at every step.

Are you planning to access it every step while the model is running? If yes, what is the goal? I am asking because most of the time exchanging data with the base workspace is not the best solution.

Are you planning to access it only at the end o the simulation? If yes, then as Kaustubha suggests, use one of the many logging options in Simulink.

Arun Badigannavar

Tags

Products

1 Answer

Answer by Kaustubha Govind on 26 Dec 2012

Why not just use the To Workspace block?

0 Comments

Kaustubha Govind

Contact us