我有三个函数,我想要两个变量来运行所有函数。我试过这样做:
R = rot(mir(sca(P(1,:),P(2,:))));
但是我收到此错误:
Error using mir (line 2)
Not enough input arguments.
有什么建议么?
%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];