Changing function logic parameters depending on outputs
显示 更早的评论
If I have a function with 3 output arguments
[a,b,c] = fun(x)
I want the function only to calculate a,b,c if I actually call for them i.e. if I only want "c" I want to be able to call
[~,~,c] = fun(x)
without fun calculating a and b
what logical function can I use based on the specific outputs requested to achieve this? Probably a fairly trivial question but I can't find the answer.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Just for fun 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!