The Math Forum



Search All of the Math Forum:

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


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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Looking for "publish" example for a function with input arguments.
Replies: 7   Last Post: Sep 16, 2014 2:11 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Nicolas Cottaris

Posts: 2
Registered: 9/16/14
Re: Looking for "publish" example for a function with input arguments.
Posted: Sep 16, 2014 2:11 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hello,

After lots of trials and errors I determined that for this to work the arguments struct (say params) must exist in the base workspace.

This can be achieved by adding the following statement:
assignin('base', 'params', params);

right before the following:
options.codeToEvaluate = ['params', char(10), 'foo(params)', char(10)'];
publish(foo', options);

I have only tested this in R2014a.

Best,
Nicolas



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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.