I'm entering a function which returns an error, "requires more input parameters to run,"
Show older comments
The function looks something like this:
if true
function dy = pendode2(t,y)
dy= zeros(2,1); % a column vector
A=110;
B=0.01;
C=0.001;
g=9.81;
L = (3*g)/(2*A);
omega=0.002;
% E=0.00011;
E=0.2;
d=80e-3;
h= d+L(1-cos(y(2)));
r= ((Lsin(y(2)))^2+(h)^2)^0.5;
dy(1)=Asin(y(2))+Bsin(omega*t)-C*y(1)+cross((abs(y(2))/y(2))*(E/r^2),cos(abs(y(2))+arctan(-abs(h/Lsin(y(2))))));
dy(2)= y(1);
end
and then in another command window, saved in the same directory I typed,
if true
options=odeset('RelTol',2.22045e-14,'AbsTol',[1e-14 1e-14]);
[t,y]=ode113(@pendode2, [0 1000], [0 0.2], options);% code
end
CAN SOMEBODY PLEASE HELP IM DYING, IT SHOULD GIVE OUT TWO VECTORS, ONE FOR T AND ONE FOR Y.
2 Comments
madhan ravi
on 13 Oct 2018
h= d+L(1-cos(y(2)));
r= ((Lsin(y(2)))^2+(h)^2)^0.5;
dy(1)=Asin(y(2))+Bsin(omega*t)-C*y(1)+cross((abs(y(2))/y(2))*(E/r^2),cos(abs(y(2))+arctan(-abs(h/Lsin(y(2))))));
what's Lsin ,Asin, Bsin??
Muhammad Muzammil
on 13 Oct 2018
Accepted Answer
More Answers (0)
Categories
Find more on Programming 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!