how can I use parameter instead of equation in dsolve
Ältere Kommentare anzeigen
Hi
I want to solve an ordinary differential symbolic equation with dsolve. But I want to save my equation in a parameter and use this parameter in dsolve. My codes are coming below:
clear all
syms a x
l=a*x;
dsolve('Dx=l')
these codes don't work. What should I do?
Thanks a lot
Akzeptierte Antwort
Weitere Antworten (1)
Walter Roberson
am 27 Apr. 2012
dsolve( subs(sym('Dx=l')) )
4 Kommentare
Andrei Bobrov
am 27 Apr. 2012
Hi Walter!
This is for MATLAB R2012a only?
Walter Roberson
am 27 Apr. 2012
Shouldn't be. It is just using a straight-forwards subs().
frank
am 28 Apr. 2012
Luan Trinh
am 26 Nov. 2014
Hi everyone,
I want to know how to solve some ODEs like this: clear all; syms a x; l=a*x; dsolve(['D2x*' char(l)+ 'Dx*x' == 0])
Could you help me?
Kategorien
Mehr zu Mathematics finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!