eigenvalues and eigenvectors question

조회 수: 4 (최근 30일)
Kyle
Kyle 2013년 2월 7일
Write a MATLAB routine that solves the problem:
(d/dt)u=Au; u(0)=u0 dt given a matrix A and initial condition u0, and plots the solution from t = 0 to t = 1.
This is what my instructor said
"you need to have a nested loop. First, establish a row vector *t* that runs from 0 to 1 in small increments (0.01 should work fine). Then, use the 'zeros' command to establish a matrix *u* that has the appropriate number of rows and a number of columns equal to the size of *t*. Then the outer loop iterates over the rows of *u*, and the inner loop iterates over the terms in the summation that I wrote on the board today(u0=sum c_i*x_i=Sc). Use a construct like this:
u(j,:) = u(j,:) + . . . ;
where *j* is the outer loop."
Here is what I have gotten to
function eigenplot(A,u0)
%v is eigen vectors x is eigenvalues
[v,x]=eig(A);
for t=(0:0.01:1)
obviously i need some help.
Thanks!

답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by