I have three functions and i want two variables to run through all the functions. I tried doing this:
R = rot(mir(sca(P(1,:),P(2,:))));
however i get this error:
Error using mir (line 2)
Not enough input arguments.
Any suggestions?
%rot.m
function rot = rot(x,y)
rot = [ cos(pi/6)*x-sin(pi/6)*y; sin(pi/6)*x+cos(pi/6)*y ];
%mir.m
function mir = mir(x,y)
mir = [x;(-y)];
%sca.m
function sca = sca(x,y)
sca = [2*x;2*y];
mir(the result ofsca), but it requires more.sca) has two arguments, and passes two arguments (at least that's my intention) sca.m looks like this, and the other functions are very similar:function sca = sca(x,y)sca = [2*x;2*y];mirandscain your question, and elaborate a bit more on your intention?