Hi,
I have created a script where I want to assign a character string to an element in a structure, namely the "description" field of Simulink data objects in the workspace. I have seutp a loop to assign each using the following command:
assignin('base',myVar,myDes)
myVar is the variable as a string (e.g., 'name.Description'). myDes is the character string to be assigned as a description. When I run the command, I get this error:
Error using assigninInvalid variable name "name.Description" inASSIGNIN.Error in AddDescriptionToDDEntries (line 15) assignin('base',myVar,myDes)
If I perform the assignment at the command line using an "=", it works fine. What am I missing?
Thanks!
Best Answer