Page 1 of 1

Matlab problem in creating function handles

Posted: April 8th, 2005, 12:07 pm
by RS26
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

Matlab problem in creating function handles

Posted: April 8th, 2005, 5:38 pm
by monarc
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