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 Center および File ExchangeLinear Algebra についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by