How to write the script for iteration when the input is the matrix?

for example, I have one iteration such as x_{n+1}=ax_n+bAx_n. where a,b are real numbers and A is 3x3 matrix.
My problem is x_n is not a real number but it is in the form of matrix (3x1 dimension). How could I write the script for running this iteration? Thank you so much in advance.

 採用された回答

Walter Roberson
Walter Roberson 2015 年 6 月 29 日

0 投票

x_n = x; %original value
for n = 1 : maximum_n - 1
x_n(:,n+1) = a * x_n(:,n) + b * A * x_n(:,n);
end
The values will appear down the columns.

1 件のコメント

Nunoy Female
Nunoy Female 2015 年 6 月 29 日
Thank you very much. ^___________________^

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Community Treasure Hunt

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

Start Hunting!

Translated by