Multiple output function only returning s

1 次查看(过去 30 天)
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

采纳的回答

the cyclist
the cyclist 2014-1-9
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 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by