I solved the differential equation by eigenvalues/eigenvectors, how would I solve for the constants from my initial conditions?
7 次查看(过去 30 天)
显示 更早的评论
syms lambda
A = [-8/3 0 0; 8/3 -8/2 0; 0 8/2 -8/24];
Id3 = sym([1,0,0;0,1,0;0,0,1])
B = lambda*Id3-A
evs = solve(p)
null(evs(1)*Id3-A)
[evctrs,d] = eig(A)
x0 = [3; 7; 6];
lambda_1 = d(1,1);
lambda_2 = d(2,2);
lambda_3 = d(3,3);
vec_1 = evctrs(:,1);
vec_2 = evctrs(:,2);
vec_3 = evctrs(:,3);
syms C1 C2 C3 t
X = C1*vec_1*exp(-lambda_1*t)+C2*vec_2*exp(-lambda_2*t)+C3*vec_3*exp(-lambda_3*t)
% I have initial conditions x1(0)=3, x2(0)=7, and x3(0)=6, but I am not sure how I would equate them to solve for the constants in my equation.
0 个评论
回答(1 个)
Navya Seelam
2019-12-9
Hi,
vpasolve(subs(X(1),t,0)==3,C3) % to solve for C3.
Similarly you can solve for C2 and C3.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear Algebra 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!