问题描述
如何确定微分函数的根。我使用ode
来解决该功能:
g=9.81//m/s^2
l=1.0//m
function phiprim=f(t,phi)
phiprim(1)=phi(2)
phiprim(2)=phi(1)*(-g/l)
endfunction
t0=0
tmax=%pi
step=0.05
t=t0:step:tmax
phi0=25/180*%pi // 25° in rad umgerechnet
phiprim0=0 // entspricht phi' bzw. Phi1'
phi=ode([phi0;phiprim0],t0,t,f)
到目前为止,太好了。但是,如何确定Scilab中φ(t)
和φ'(t)
的根?
使用ode_root
函数会引发错误“无效索引”:
deff("[z]=gr(t,phi)","z=phi(1)") // should find the roots of phi function
ng=1
[phi,rd]=ode("root",phi0,tmax,f,ng,gr)
谢谢!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)