필터 지우기
필터 지우기

Renaming simulink mdl files

조회 수: 6 (최근 30일)
Jamie
Jamie 2013년 11월 26일
편집: Andreas Goser 2016년 6월 20일
When renaming simulink model files (mdl/slx), whether using 'save as' or renaming the file within windows explorer I recieve the following error:
"Error loading the initial state for model 'model'. Unable to find a matching block state corresponding to element 1 of signals structure array"
Reinstating the original file name, the model executes without issue. Any reason why the number states of the system might be seen to vary dependant on the model name?
The error appears to refer to an issue with the initial states of the model defined in the configuration parameters GUI (though I dont believe this to be the source of the problem). I have defined the initial states using the getstruct statment 'getstatestruct(operating_point)'.
To retain version control I have had to resort to copying each iteration of the design and dependant files to new folders. This is proving a real pain!
A 'fix' would be greatly appreciated!!
Many Thanks

채택된 답변

Andreas Goser
Andreas Goser 2013년 12월 2일
편집: Andreas Goser 2016년 6월 20일
That might be related to a bug, see bug report
It may also be related to configuration parameter settings:
- Open the Configuration Parameters -> Data Import/Export pane - Check the boxes with 'Time' and 'States', select the 'Format' option to 'Array'
It general, you issue might be release or model specific and thus contacting Technical Support may be the best for you.
  댓글 수: 2
Rashmi savulge
Rashmi savulge 2016년 6월 20일
how to see the bug report
Andreas Goser
Andreas Goser 2016년 6월 20일
편집: Andreas Goser 2016년 6월 20일
The link behind my note a above was
Which for some reason is not working anymore. I changed it to
www.mathworks.com/support/bugreports/340106
I personally also have issues with IE, but it workes in Chrome.

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

추가 답변 (1개)

Jamie
Jamie 2013년 12월 2일
Hi Andreas,
Thank you kindly for the response. The issue would indeed appear to be linked to the bug report you provided (the model contains both memory blocks and S functions with states).
Much appreciated.
Jamie

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by