필터 지우기
필터 지우기

matlab simulink

조회 수: 1 (최근 30일)
li xinjun
li xinjun 2011년 12월 14일
댓글: 埃博拉酱 2021년 3월 23일
I have established a library in simulink which has some blocks such as A,B,C,D and so on. In every block I have added a "toworkspace"before out(because I need every export data of every block ).When I creat a system use these blocks just one time,I can get what I want.But if a block appears more two times in this system ,the data will overwrite each other in workspace.How can I do? I don't want to modify its name( to workspace) in blocks every time to change. http://my.nuaa.edu.cn/data/attachment/album/201112/14/231419vh3ndsrh4htmm7ts.png

채택된 답변

Abhishek Gupte
Abhishek Gupte 2011년 12월 14일
The 'To Workspace' block will write to the MATLAB base workspace. Given multiple 'To Workspace' blocks with the same variable name, they will all write to the same variable in the base workspace in the same order as the Block Sorted Order.
There is no workaround to this using the 'To Workspace' block. The best option would be to turn on Signal Logging for the line whose signal you wish to log. The Simulink.DataLogs object that is created, retains each signal in a separate 'sub-object'.
  댓글 수: 2
Fangjun Jiang
Fangjun Jiang 2011년 12월 14일
I assume, using mask parameter could be the workaround.
埃博拉酱
埃博拉酱 2021년 3월 23일
What if there are more than one outputs in a single block? What's the best practice to distinguish them?

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

추가 답변 (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