How to write a function with two kind of output modes?
15 views (last 30 days)
Show older comments
How to write a function which can be used as y = myfunc(), or [y,z] = myfunc() ?
0 Comments
Accepted Answer
Star Strider
on 24 Jun 2016
Write the first line as:
function [y,z] = myfunc()
If you only request one output, only the first output is returned by default.
More Answers (0)
See Also
Categories
Find more on Denoising and Compression 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!