how can i avoid error message"Not enough input arguments"?
2 views (last 30 days)
Show older comments
I am trying to simulate the following dynamic equation of a singular slider crank mechanism. I have changed the Dynamic equation to system of first order differential equations. I learnt that this system has no explicit and no implicit solution. Am now trying to get a numerical solution using ode solver 15s. ( I guess the system is stiff) But in running this in an m file i am told an error " undefined variable y2". In trying the one i pasted below you see that "Not enough input argument" Can any one help me way out of this problem please? I appreciate any kind of information.
Error using
@(t,y1,y2,y3,y4)[y2;(sin(y1-y3)*y4^2+19.6*sin(y1))/(cos(y1)^2-2)-(cos(y1)*(9.8*sin(y3)-y2^2*sin(y1-y3)))/(cos(y1)^2-2)-((sin(y1)/(cos(y1)^2-2)-(cos(y1)*sin(y3))/(cos(y1)^2-2))*(-cos(y1)*y2^2-140*sin(y1)*y2-cos(y1)*y4^2-140*sin(y3)*y4+400*cos(y1)+400*cos(y3)+sin(y1)*(sin(y1)/(cos(y1)^2-2)-(cos(y1)*sin(y3))/(cos(y1)^2-2))+sin(y3)*((2*sin(y3))/(cos(y1)^2-2)-(cos(y1)*sin(y1))/(cos(y1)^2-2))))/(sin(y1)*(sin(y1)/(cos(y1)^2-2)-(cos(y1)*sin(y3))/(cos(y1)^2-2))+sin(y3)*((2*sin(y3))/(cos(y1)^2-2)-(cos(y1)*sin(y1))/(cos(y1)^2-2)));y4;(19.6*sin(y3)-2*y2^2*sin(y1-y3))/(cos(y1)^2-2)-(cos(y1)*(sin(y1-y3)*y4^2+19.6*sin(y1)))/(cos(y1)^2-2)-(((2*sin(y3))/(cos(y1)^2-2)-(cos(y1)*sin(y1))/(cos(y1)^2-2))*(-cos(y1)*y2^2-140*sin(y1)*y2-cos(y1)*y4^2-140*sin(y3)*y4+400*cos(y1)+400*cos(y3)+sin(y1)*(sin(y1)/(cos(y1)^2-2)-(cos(y1)*sin(y3))/(cos(y1)^2-2))+sin(y3)*((2*sin(y3))/(cos(y1)^2-2)-(cos(y1)*sin(y1))/(cos(y1)^2-2))))/(sin(y1)*(sin(y1)/(cos(y1)^2-2)-(cos(y1)*sin(y3)) /(cos(y1)^2-2))+sin(y3)*((2*sin(y3))/(cos(y1)^2-2)-(cos(y1)*sin(y1))/(cos(y1)^2-2)))]
Not enough input arguments.
1 Comment
Answers (0)
See Also
Categories
Find more on Assembly 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!