Talk:MATLAB Programming/Entering data at the command line

a=input('please enter num = ') b=input('please enter den =') c=numel(a); d=numel(b); sub=c-d; w=0; for i=1:1:c; if a(i)<0 w=w-1; else w=w+1; end

end p=0; for h=1:1:d; if b(h)<0 p=p-1; else p=p+1; end end if sub>1 r=0; end k=roots(a); f=numel(k);

t=0; for j=2:1:f if k(1)==k(j) t=t-1; else t=t+1; end end x=0; for u=1:1:f if real(k(u))>0 x=x-1; else x=x+1; end end o=roots(b); z=numel(o); l=0; for v=2:1:z if o(1)==o(v) l=l-1; else l=l+1; end end s=0; for q=1:1:z if real(o(q))>0 s=s-1 else s=s+1; end end if((w==c)&(p==d)&(t==f-1)&(x==f)&(l==z-1)&(s==z)) disp('y') else disp('n') end