How can I save functions or sub functions in matlab?
Show older comments
Dear all, I know how to save variables, but how can I save functions or sub functions in matlab? Thanks..
Accepted Answer
More Answers (1)
KSSV
on 23 Aug 2018
function c = mysum(a,b)
c = a+b ;
end
The above is a function.....as I have named it mysum, when you try to save, it will be automatically saved on the name mysum.m.
3 Comments
Walter Roberson
on 23 Aug 2018
Note that this is not the MATLAB command save() being referred to, it is the editor menu save.
methaq ali
on 23 Aug 2018
Dennis
on 23 Aug 2018
Try to create a script (top left -> New Script).
Categories
Find more on Workspace Variables and MAT Files 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!