Using global structures in matlab functions block(Simulink)

조회 수: 6 (최근 30일)
bethel o
bethel o 2012년 8월 6일
댓글: Shruthi Kubatur 2014년 7월 22일
In the data store memory block, it is not possible to set your variable as a structure since structures are not primitive types. My question is, is there a away to still use global structures in matlab function block?
Thank you very much.
Bethel

채택된 답변

bethel o
bethel o 2012년 8월 13일
편집: John Kelly 2013년 11월 14일
This is infact possible
  댓글 수: 2
bethel o
bethel o 2013년 7월 10일
편집: John Kelly 2013년 11월 19일
You can type '*Working with Structures and Bus Signals*' in matlab 2012a documentation to find the missing page. Let me know if that helps.
Shruthi Kubatur
Shruthi Kubatur 2014년 7월 22일
Hi,
Could you please provide more information about it? Did it work? Thank you

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

추가 답변 (1개)

TAB
TAB 2012년 8월 6일
편집: TAB 2012년 8월 6일
AFAIK, it is not possible to use structure as the global data in matlab function block.
Global data in matlab function block always need to be stored with Data store memory block, and Data store memry block do not support structure.
Also if you are using Simulink.Signal object to scope the global data, type of object should be defined explicitly. It can not be structure.
However if you can explore more detail about your requirement, someone can suggest alternative.
  댓글 수: 3
TAB
TAB 2012년 8월 7일
bethel, I am not aware of using java classes with matlab or with simulink. But I don't thing matlab function block supports the use of java classes.
You can post this question in separate thread, may be someone else knows the answer.
bethel o
bethel o 2012년 8월 7일
Ok, I have done it now using the interpretted matlab block to update the java object, and it works fine.
cheers

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

카테고리

Help CenterFile Exchange에서 Target Computer Setup에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by