Clear Filters
Clear Filters

CAN 'dsolve' solve ODE matrix equations ????

1 view (last 30 days)
berkeley
berkeley on 10 Jan 2013
I try to solve Dx=Ax; while x is of 2*1 elements,
A=[2 1;3 2];f=dsolve('Dx=A*x','x(0) = [32 20]');Warning: Explicit solution could not be found. > In dsolve at 101
Not so surprising, no Explicit solution ,at leaast no errors.
But when I change x to 3*1 elements, it comes the following errors, so amazing!!!
Thanks for your help
A=[1 2 1;1 5 6;4 2 1]; f=dsolve('Dx=A*x','x(0) = [20;20;20]');
'x' IS a matrix
??? Error using ==> mupadmex
Error in muPAD command: Illegal equations [ode::new]
Error in ==> sym.sym>sym.mupadmexnout at 2003 out = mupadmex(fcn,args{:});
Error in ==> dsolve>mupadDsolve at 190 [var_list,R] = mupadmexnout('mllib::dsolve',sys,x,ignoreConstraints);
Error in ==> dsolve at 97 [R,vars] = mupadDsolve(ignoreConstraints,varargin{1:narg}); *can ‘dsolve ’ solve ODE matrix equations *
now,i tear matrix, there comes out the result
[f,g]=dsolve('Dx=x+y','Dy=x') f = (C3*exp(t/2 - (5^(1/2)*t)/2))/2 + (C4*exp(t/2 + (5^(1/2)*t)/2))/2 - (5^(1/2)*C3*exp(t/2 - (5^(1/2)*t)/2))/2 + (5^(1/2)*C4*exp(t/2 + (5^(1/2)*t)/2))/2
g = C3*exp(t/2 - (5^(1/2)*t)/2) + C4*exp(t/2 + (5^(1/2)*t)/2)
*SO I assert dsolve can't matrix ODE equation,am i right?
if i solve matrix ODE equation ,so i use what? *

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!