필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

To Workspace doesn't accept "a.b" ?

조회 수: 1 (최근 30일)
Zaki
Zaki 2014년 8월 21일
마감: MATLAB Answer Bot 2021년 8월 20일
Hello guys,
"To Workspace" doesn't accept structure e.g. "a.b" within its "Variable Name" field.
Is there a way around this?
My aim is to have a subsystem with a Masked Parameter "Name" = main_name
and within the subsystem is a "To Workspace" block with its "Variable Name" field = main_name.something
How can I make this happen?
Thank you.
I am using R2009b.

답변 (1개)

Yu Jiang
Yu Jiang 2014년 8월 22일
Hi Zaki
You may want to consider using a bus to generate a structure and pass that to a variable in To Workspace.
For more information regarding bus, see http://www.mathworks.com/help/simulink/slref/buscreator.html
I have also attached a simple example, you may want to take a look. Hope it helps!
- Yu Jiang
  댓글 수: 1
Zaki
Zaki 2014년 8월 25일
Hello Yu Jiang,
Thanks for replying. That method you've just showed did not retain their signal names. I would have preferred to see myvar.a and myvar.b within my workspace. I've also created an unelegant S-function solution here where I can write to a structure in the workspace directly. I'm still looking for an elegant solution though.

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by