Trying to plot a D2z function
Show older comments
I am trying to plot the funtion produced by the Dsolve function but it comes up with Not enough input arguments, can I please get any help, Start it Cycloid(3,3,10)
function Cycloid(h,Q,tf)
g=9.81;
% Making the Brachistochrome Equation in MatLab
r=@(z)((3.14.*Q)-(Q).*(acos((z./Q)-1))+sqrt(z.*(2.*Q-z)));
% This is now inputting the second derivitive of z and the first derivitive
% of r
f=@(t,z)[z(2);(-g/Q)*(z(1)-(h./2)) ; sign(z(2)).*(sqrt((g./Q).*(h-z(1)).*(2.*Q-z(1))))];
ode23(f,[0 tf],[h;0;r(h)])
syms t;
j=dsolve('D2z=-(g/Q)*(z(1)-(h/2))','z(0)=h',t)
Answers (0)
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!