Set parameters of "ToWorkspace" block progrmmatically

조회 수: 2 (최근 30일)
Harish
Harish 2024년 1월 11일
편집: Harish 2024년 1월 11일
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에서 Parrot Minidrones에 대해 자세히 알아보기

태그

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by