Serving the Quantitative Finance Community

 
User avatar
RS26
Topic Author
Posts: 0
Joined: May 6th, 2004, 8:12 am

Matlab problem in creating function handles

April 8th, 2005, 12:07 pm

Hello,I would be grateful for some help with the following problem: I'm trying to create an elementary function handle in Matlab>> fhandle=@(x) x.^2; and I keep getting the following error message??? fhandle=@(x) x.^2; |Error: Missing operator, comma, or semicolon.I'm really confused as it is exactly the syntax from the help file. Thank you for your help
 
User avatar
monarc
Posts: 0
Joined: June 21st, 2004, 2:35 pm

Matlab problem in creating function handles

April 8th, 2005, 5:38 pm

Hello,I think you are using Matlab R 13 version 6. Anonymous functions are only implemented from Version 7, R14. You should be able to do it using inline functions.regards,monarc