How can I parametrize the "To Workspace" block in Simulink?
Mostra commenti meno recenti
Hi there. I am trying to parametrize the "To Workspace" block in Simulink, but it shows me error. Instead of the default variable name simout , I want to use a name that I can pass from workspace. Ex: eval('HHH') instead of simout , where HHH='some_var' . Then the signal from simulation should be stored in a variable named some_var in the base workspace.
The actual scenario is a bit more complex. I would want to provide variable name through eval('B.Label') , where the field Label of the structure B is initialized in the base workspace as B.Label='some_var' . Otherwise, B could be an internal variable in the mask of the subsystem that contains the "To Workspace" block.
The variable name is never changed during the simulation. Thanks in advance for any helpful suggestions.
These are the inputs I tried instead of the default simout, but they gave error Invalid MATLAB variable name specified in ...
eval('B.Label')
B.Label
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Choose and Parameterize Blocks in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!