Prev: 3d registration
Next: multi code multi carrier cdma
From: Mohd Firdaus on 11 Feb 2010 06:48 I am Mechanical engineering student. I had problem my final year project. I need help from Matlab users..my question is.. how to solve Undefined function or method 'robot.m' for input arguments of type 'double'?? what is type 'double' in the simulation diagnostics?? please help me..tq.
From: Mohd Firdaus on 11 Feb 2010 06:59 "Mohd Firdaus " <mfirdausrahim86(a)yahoo.com> wrote in message <hl0qpi$b29$1(a)fred.mathworks.com>... > I am Mechanical engineering student. I had problem my final year project. I need help from Matlab users..my question is.. how to solve Undefined function or method 'robot.m' for input arguments of type 'double'?? what is type 'double' in the simulation diagnostics?? please help me..tq. what is the problem in my M-file?? it cannot read 'function out'?? all calculation that i had done is right. %robot M-file %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % final year project % ---------------------------------------------------------- % Script file for joint torque control of a planar manipulator %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function out= robot(u) % %u(1)=omega_1; %u(2)=theta_1; %u(3)=omega_2; %u(4)=theta_2; %u(5)=torque_1; %u(6)=torque_2; % mpl=0; % S1=sin(u(2)); S12=sin(u(2)+u(4)); C1=cos(u(2)); C12=cos(u(2)+u(4)); % a=zeros(14,14); b=zeros(14,1); % a(1,1)=r1*S1+r2*S12;a(1,2)=r2*S12;a(1,7)=1; a(2,1)=-r1*C1-r2*C12;a(2,2)=-r2*C12;a(2,8)=1; a(3,1)=rc1*S1;a(3,3)=1; a(4,1)=-rc1*C1;a(4,4)=1; a(5,1)=r1*S1+rc2*S12;a(5,2)=rc2*S12;a(5,5)=1; a(6,1)=-r1*C1-rc2*C12;a(6,2)=-rc2*C12;a(6,6)=1; a(7,3)=-m1;a(7,9)=1;a(7,11)=1; a(8,4)=-m1;a(8,10)=1;a(8,12)=1; a(9,1)=I1;a(9,11)=r1*S1;a(9,12)=-r1*C1; a(10,5)=-m2;a(10,11)=-1;a(10,13)=1; a(11,6)=-m2;a(11,12)=-1;a(11,14)=1;a(12,2)=I2; a(12,11)=rc2*S12;a(12,12)=-rc2*C12;a(12,13)=(r2-rc2)*S12;a(12,14)=-(r2-rc2)*C12; a(13,7)=mpl;a(13,13)=1; a(14,8)=mpl;a(14,14)=1; % b(1)=-((r1*C1+r2*C12)*u(1)^2+r2*C12*u(3)^2+2*r2*u(1)*u(3)*C12); b(2)=-((r1*S1+r2*S12)*u(1)^2+r2*S12*u(3)^2+2*r2*u(1)*u(3)*S12); b(3)=-rc1*C1*u(1)^2; b(4)=-rc1*S1*u(1)^2; b(5)=-((r1*C1+rc2*C12)*u(1)^2+rc2*C12*u(3)^2+2*rc2*u(1)*u(3)*C12); b(6)=-((r1*S1+rc2*S12)*u(1)^2+rc2*S12*u(3)^2+2*rc2*u(1)*u(3)*S12); b(8)=m1*g; b(9)=u(5)-u(6)-m1*g*rc1*C1; b(11)=m2*g; b(12)=u(6); b(14)=-mpl*g; % out= a\b;
From: Wayne King on 11 Feb 2010 07:01 "Mohd Firdaus " <mfirdausrahim86(a)yahoo.com> wrote in message <hl0qpi$b29$1(a)fred.mathworks.com>... > I am Mechanical engineering student. I had problem my final year project. I need help from Matlab users..my question is.. how to solve Undefined function or method 'robot.m' for input arguments of type 'double'?? what is type 'double' in the simulation diagnostics?? please help me..tq. Hi, your problem is that MATLAB doesn't know where the file robot.m is. If you have this file saved somewhere on your computer, you have to make sure that directory is in MATLAB's path. See >>doc addpath >>doc path double here is just the class of your input, it's saying basically: "hey, you want me to take this input with class double and do something to it with a function or method robot, but I have no idea what robot is." Wayne
From: Oleg Komarov on 11 Feb 2010 08:11 "Wayne King" > double here is just the class of your input, it's saying basically: "hey, you want me to take this input with class double and do something to it with a function or method robot, but I have no idea what robot is." > > Wayne I think that if matlab were to throw errors like this I would laugh most of the time (not that I'll have the opportunity to...:) ) Oleg
From: Mohd Firdaus on 11 Feb 2010 14:34
ok..thanx. i had solve it..huhu |