Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: matlab syntax for 'for workspace' in simulink
Replies: 1   Last Post: Dec 3, 2012 3:20 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Phil Goddard

Posts: 348
Registered: 1/27/12
Re: matlab syntax for 'for workspace' in simulink
Posted: Dec 3, 2012 3:20 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


Your question isn't clear.

Are you trying to set the name of a variable into a From Workspace block, or are you trying to set a (model's) input parameters when using the sim function?

If the former, then you need to use set_param.
Something like the following (with appropriate modification to your specific model)
set_param('modelname\blockname','VariableName','newvarname')

If the latter, then how to get the allowable model parameters is shown in documentation for sim, but it'll be something like
sim('modelname','ExternalInputs','yourData');

Phil.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.