Why cant I create a function in MatLab student version?
Show older comments
When I try to create a function i keep getting this error Error: Function definitions are not permitted in this context.
Here is the code I wrote
function sum = myfirst(v,w)
then I get the mentioned error
Accepted Answer
More Answers (1)
per isakson
on 6 Sep 2014
Edited: per isakson
on 7 Sep 2014
0 votes
Because function sum = myfirst(v,w) must be the first executable line of the m-file. Read Function Basics, Create functions, including anonymous, local, and nested functions
Categories
Find more on Adding custom doc in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!