Here's a simple code
syms x(t) y(t)A = [1 2; -1 1];B = [1; t];Y = [x; y];S = dsolve(diff(Y) == A*Y + B);x = S.xy = S.y
I am trying to implement something like, x(0)=0 and y(0)=0. How do I add these conditions?
boundaryboundary conditiondsolveinitialinitial conditionmatrixodeode'ssystem
syms x(t) y(t)A = [1 2; -1 1];B = [1; t];Y = [x; y];S = dsolve(diff(Y) == A*Y + B);x = S.xy = S.y
Best Answer