Trying to plot a D2z function
显示 更早的评论
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)
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!