Masking and base workspace

I have a structure called "uwb" in base workspace. Under uwb structure I have another structure called "channel". Under channel I have got two variables a & b . Now I want to create a subsystem. I want to mask the block. My problem is I have to use the variables a & b for the initialization of the masked subsystem. How can I include a & b in initialization commands of the subsystem while masking.

 채택된 답변

TAB
TAB 2012년 4월 6일

1 개 추천

Initialization commands cannot access base workspace variables, it can only access the variables from Mask workspace.
Pass two more values from the subsystem mask say init_a & init_b.
In initializarion pane write
a = init_a;
b = init_b;
In the parameters dialog pass-
init_a as --> uwb.channel.a
and
init_b as --> uwb.channel.b

추가 답변 (1개)

Kaustubha Govind
Kaustubha Govind 2012년 4월 5일

0 개 추천

Not sure if I understand your question correctly, but try this in your Mask Initialization:
a = uwb.channel.a;
b = uwb.channel.b;

댓글 수: 3

kiran daas
kiran daas 2012년 4월 6일
Sorry for not making myself clear but i have already done that and it doesnt work.
Rephrasing
** can I use the variables of base wrkspace directly in the initialization of masked block ???or I have to do some change in the dialog parameter tab ??
kiran daas
kiran daas 2012년 4월 6일
***I have a structure called "uwb" in base workspace. Under uwb structure I have another structure called "channel". Under channel I have got two variables a & b . Now I want to create a subsystem. I want to mask the "subsystem".
I am having two mask parameters (under the masked subsystem) chan & ch_idx. I have to assign uwb.channel.a & uwb.channel.b to the variables chan & ch_idx respectively in the initialization commands.
Kaustubha Govind
Kaustubha Govind 2012년 4월 6일
TAB's answer is the right solution for you.

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

카테고리

도움말 센터File Exchange에서 Author Block Masks에 대해 자세히 알아보기

태그

질문:

2012년 4월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by