Multiple output function only returning s
1 view (last 30 days)
Show older comments
function [s,n] = candy(p, k)
n = rem(p,k);
s = fix(p/k);
end
so here's my funtion i run it and it only outputs s how do i get it to output s and n
0 Comments
Accepted Answer
the cyclist
on 9 Jan 2014
How you you call this function? It should be
[s,n] = candy(p_in,k_in)
when you call it, not just
candy(p_in,k_in)
0 Comments
More Answers (0)
See Also
Categories
Find more on Get Started with MATLAB 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!