Saving structure data type in Simulink

조회 수: 12 (최근 30일)
Nishant Kumar
Nishant Kumar 2020년 3월 29일
답변: Dhananjay Kumar 2020년 3월 31일
I have a MATLAB Function block from which I need to save 10 variables to a file. Every variable has different size. I thought of taking advantage of structure data types. But not been able to save the structure with help of 'To File' block. Moreover, 'save()' function also can't be used in the matlab function block.
Is there any other way I can do that.
Or any way to store all 10 variables in same .mat file.
  댓글 수: 3
Dhananjay Kumar
Dhananjay Kumar 2020년 3월 31일
편집: Dhananjay Kumar 2020년 3월 31일
You want to save the structure or overwrite it?
Nishant Kumar
Nishant Kumar 2020년 3월 31일
Any method would do but I would like to overwrite it.

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

답변 (1개)

Dhananjay Kumar
Dhananjay Kumar 2020년 3월 31일
Try one of these:
2) Export Workspace Variables through model explorer
3) assignin function
4) evalin function

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by