Not able to change RTWInfo properties

Hi
I am using MATLAB R2011b with ECoder. I am trying to modify the RTWInfo property of my class using:
h = mypackage.Parameter % Derived from mpt.Parameter
h.RTWInfo = mypackage.RTWInfoParamer % Derived from mpt.CustomRTWInfoParameter.
the above statement gives me an error saying that 'Changing the RTWInfo property of Simulink.Data isi not allowed.
What am I doing wrong and how do I change the RTWinfo property with my derive class?.

Answers (2)

RTWInfo is a built-in class. If you've customized that class, you probably need to do
h = mypackage.Parameter;
h.RTWInfoParamer=something;
Allwyn
Allwyn on 9 Nov 2011
I have created two classes (Parameter and RTWInfoParamer) in package 'mypackage'. Here what i am trying to do is change RTWInfo property from
'Simulink.ParamRTWInfo' to 'mypackage.RTWInfoParamer'
I am able to change the RTWInfo property in R14 but MATLAB doesnot allow me to do this in R2011b :(
Regards, Allwyn

1 Comment

Then, maybe in your customization of mypackage class, you need to specify 'mypackage.RTWInfoParamer' as the default sub-class or allowed sub-class for 'RTWInfo'

Sign in to comment.

Products

Tags

Asked:

on 9 Nov 2011

Community Treasure Hunt

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

Start Hunting!