Problem with Level2 s function

1 次查看(过去 30 天)
Arun Badigannavar
Arun Badigannavar 2012-12-18
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 个评论
Guy Rouleau
Guy Rouleau 2012-12-26
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.

请先登录,再进行评论。

回答(1 个)

Kaustubha Govind
Kaustubha Govind 2012-12-26
Why not just use the To Workspace block?

类别

Help CenterFile Exchange 中查找有关 Sources 的更多信息

标签

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by