MATLAB Answers

0

How can error "Function definitions are not permitted in this context. " be resolved.

Asked by Scott Williams on 1 Oct 2015
Latest activity Commented on by Scott Williams on 2 Oct 2015
Hi. I've uploaded a file to the file exchange and it works well for me. A person has downloaded the file and has problems with the error described. The file and question is at:
Apparently the error "Function definitions are not permitted in this context" arises after typing:
polarG (0 + 0j, 2 + 1 * j, .1,30, 'r', 1)
When I do this, I get the figure I expect. Could someone please look at the code in question and advise how to fix the source of the error?

  0 Comments

Sign in to comment.

1 Answer

Answer by Walter Roberson
on 1 Oct 2015
 Accepted Answer

They tried to put that line at the top of the file and then run the result. They need to store the file unchanged and type that line at the command prompt.

  1 Comment

Hi Walter, That sounds reasonable. I've posted your answer to the file exchange, and await a reply from the user.
Thank you.

Sign in to comment.