[讨论] matlab 代数问题

楼主: koogoo (Killen)   2015-03-31 17:42:23
大家我想请问一下
假如我写如下:
U=dsolve('Dy=cos(t)')
执行结果
U=C+sin(t)
但如果我想把cos(t)用代数表示
因此写:
A=cos(t);
U=dsolve('Dy=A')
执行结果
U=C+A*t
他并不会把A=cos(t)带入微分方程运算,而是让A仅为一个代数,
有办法让matlab懂得要把A=cos(t)带入吗??
请求高手帮忙!!!感恩
作者: profyang (prof)   2015-03-31 19:08:00
A='cos(t)'; U=dsolve(['Dy=',A])

Links booklink

Contact Us: admin [ a t ] ucptt.com