Error in default port dimensions function of S-function 'SimulacionPIA/MATLAB Function'. This function does not fully set the dimensions of output port 2
Show older comments
Hi guys, im doing an analysis on a arm prosthesis, the mechanical model is divided in 2, one for the elbow and 1 for the shoulder, the thing is that everytime i try to simulate the agular position it gives me this error.
Error in default port dimensions function of S-function 'SimulacionPIA/MATLAB Function'. This function does not fully set the dimensions of output port 2
i cannot see why is failing so i could use some help.
The array im trying to use in the sources are 2 (2x1000) values
(Sorry for bad english is not my native language)

function [qpp1,qpp2] = r2dof(T1,T2,q1,q2,qp1,qp2)
qp=[qp1; qp2];
M=[.1935+.0494*cos(q) .0371+.0090*cos(q2); .0180+.0090*cos(q2) .0180];
C=[-.05631*sen(q2)*qp2 -.0281*sen(q2)*qp2; .0281*sen(q2)*qp1 0.0];
parg=[.2815*sen(q1)+.3136*sen(q1)+.1005*sen(q1+q2); .1005*sen(q1+q2)];
fr=[1.86*qp1+1.93*sign(qp1); 0.16*qp2+0.3*sign(qp2)];
tau=[T1;T2];
qpp= M^(-1)*(tau-C*qp-parg-fr);
qpp1=qpp(1);
qpp2=qpp(2);
end
Answers (0)
Categories
Find more on Simulink in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!