Initial Value of DataStoreMemory
Afficher commentaires plus anciens
MATLAB 2015b question: I am trying to set the initial value of a DataStoreMemory block in my Simulink model. I have created a Simulink.Bus object named MY_BUS and a DataStoreMemory block of that type.
For the initial value struct, I did this at the command line:
MyInitValue = Simulink.Bus.createMATLABStruct('MY_BUS');
MyInitValue.field1 = <value1>;
MyInitValue.field2 = <value2>;
etc...
Since the I don't populate every single field of MyInitValue, I set Configuration_Parameters->Diagnostics->Underspecified_Initialization_Detection to 'Simplified'.
However, when I put 'MyInitValue' in the InitialValue field of the DataStoreMemory, an error message is generated:
Invalid setting in 'MyModel.MY_BUS_Data_Store_Memory' for parameter 'InitialValue'.
Is there something I am missing?
1 commentaire
Shubham Srivastava
le 1 Août 2016
Hi Kurt,
I tried setting the initial value of a DataStoreMemory block using the Simulink.Bus object of a demo model. To open the demo model, open it using
>> open_system('busdemo')
I then populate the value of Clock and Pulse fields, but leave the sine field unpopulated. After doing the steps you mentioned, I did not get the Invalid setting for parameter Initial Value error. If you share the details of your model and structure values, then it will help in understanding the issue.
-Shubham
Réponses (0)
Catégories
En savoir plus sur Modeling dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!