how can I use parameter instead of equation in dsolve
이전 댓글 표시
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
채택된 답변
추가 답변 (1개)
Walter Roberson
2012년 4월 27일
dsolve( subs(sym('Dx=l')) )
댓글 수: 4
Andrei Bobrov
2012년 4월 27일
Hi Walter!
This is for MATLAB R2012a only?
Walter Roberson
2012년 4월 27일
Shouldn't be. It is just using a straight-forwards subs().
frank
2012년 4월 28일
Luan Trinh
2014년 11월 26일
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?
카테고리
도움말 센터 및 File Exchange에서 Mathematics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!