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: dynamic anonymous function
Replies: 2   Last Post: Mar 9, 2012 9:28 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Balachander Narasimhan

Posts: 39
Registered: 2/4/08
dynamic anonymous function
Posted: Mar 8, 2012 8:40 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


I know if we define fn = @(x)x*x, then fn(a) will give the squared value of a

Now suppose I don't know the anonymous function x*x in advance, rather it is obtained out of a string manipulation operation and I have it in 'fnstr' which has 'x' in it

I tried doing 'fn = @(x)fnstr' but it does not work.

Kindly let me know how to do this

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.