필터 지우기
필터 지우기

troubles loading Simulink operating point

조회 수: 2 (최근 30일)
Brian Tremaine
Brian Tremaine 2019년 7월 27일
댓글: Anirudh Singh 2020년 3월 31일
I am trying to save and restore an operating point in Simulink R2019a. This is a feature I'm just starting to use.
I used the following to run my model and get the operating point:
simOut = sim('bldc_simple', '0.8')
myOperPoint = simOut.myOperPoint
This seemed to have worked and generates a structure myOperPoint.
Next, I updated the Configuration --> load from Workspace to add myOperPoint as the initial conditions.
Now I use the following to run some longer time:
tic
bldc_simple
% set_param('bldc_simple','SaveFinalState','on','LoadInitialState','on',...
% 'InitialState','myOperPoint','FinalStateName','myOperPoint2',...
% 'SaveOperatingPoint','on');
% load myOperPoint in Configuration
set_param('bldc_simple','SaveFinalState','on',...
'InitialState','myOperPoint','FinalStateName', 'myOperPoint2',...
'SaveOperatingPoint','on');
simOut = sim('bldc_simple','StopTime','1.3') ;% <------ line with error
myOperPoint2 = simOut.myOperPoint
elapsedTime = toc
save('temp.mat');
Now I get an error:
Error using batch (line 14)
,The width of the given MATLAB array does not match that of the Simulink internal data
What am I missing? The error description is cryptic. Thanks !!!
  댓글 수: 1
Anirudh Singh
Anirudh Singh 2020년 3월 31일
Did you apply this:
"Before you save the operating point, disable the Block Reduction parameter in Configuration Settings > Simulation Target > Advanced Parameters."
I am attaching a documantation page of save and restore operating point in simulink, check if you miss any step:

댓글을 달려면 로그인하십시오.

채택된 답변

Florian
Florian 2020년 1월 27일
Hi Brian,
did you solve your problem? I got the same error message.
cheers
Florian

추가 답변 (0개)

카테고리

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