Hello everybody. When I run this program an error appears "Not enough input arguments.. in line 2". Can anyone help me?
function [avg, med] = mystats(x)n=length(x);avg=mymean(x,n);med=mymedian(x,n);endfunction a=mymean(v,n) a=sum(v)/n;endfunction m=mymedian(v,n)w=sort(v);if rem(n,2)==1 m=w((n+1)/2);else m=(w(n/2)+w(n/2+1))/2;endend
Best Answer