Set parameters of "ToWorkspace" block progrmmatically

1 次查看(过去 30 天)
Hi,
I am trying to add toWorkspace block to my simulink model using matlab code. By default it is setting "Limit data points to last:" to 1000 and the save format is Array. I want to set the following parameters as:
Limit data points to last: inf
Save Format: Time Series.
I am trying to do that but cant. Can anyone answer this?

采纳的回答

Ramtej
Ramtej 2024-1-11
Hi Harish,
As per my understanding you are trying to set the block parameters programatically.
You can use "set_param" function for this case as follows:
% here block_path is the path to your toWorkspace block in your model
set_param(block_path, 'MaxDataPoints', 'inf'); %set the Limit data points to last to inf
set_param(block_path, 'SaveFormat', 'Timeseries'); %set the save format to Timeseries
Hope this resolves your query!
  1 个评论
Harish
Harish 2024-1-11
编辑:Harish 2024-1-11
In fact I was looking for the parameter name "MaxDataPoints".
It worked finally, thankyou.

请先登录,再进行评论。

更多回答(0 个)

类别

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

标签

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by