how to calculate power of a matrix

8 ビュー (過去 30 日間)
Maurizio Mastorfini
Maurizio Mastorfini 2012 年 10 月 2 日
I have just started looking at this, so it may be a very simple task to do.
I have a vector of M elements, each element is a matrix 2x2 where the matrix elements A are complex number (real and imaginary or module and phase )
I need to calculate the power^r of this vector. in other words I need to calculate the power^r, where r is a real number, of the matrix A = [ A11 A12 / A21 A22]^r where Axy = Re +Im or Mod and Ph
I'm a new with Matlab, so any suggestion is welcome.
BR Maurizio

回答 (2 件)

Wayne King
Wayne King 2012 年 10 月 2 日
編集済み: Wayne King 2012 年 10 月 2 日
Are you just asking for the squared modulus (magnitude) of the complex-valued elements of a matrix?
X = randn(5,5)+1i*randn(5,5);
abs(X).^2
or if you want to the third power:
abs(X).^3
  1 件のコメント
Maurizio Mastorfini
Maurizio Mastorfini 2012 年 10 月 4 日
編集済み: Maurizio Mastorfini 2012 年 10 月 4 日
the matrix is like this:
S11 S12 S21 S22
S = { S11;S12;S21;S22 }
each Sxy is a complex number: re + jim
I need to calculate the S^r where r can be any real number.
The theory says this: find the digonal matrix D of S, which contains the eigenvalues of that matrix S and decompose S in 2 other matrices, called U and V in order to have S = U*D*V the S^r is then calculated in this way
S^r = U*(D^r) *V
D only has 2 non 0 coefficients: D11 and D22,then
D^r = { D11^r;0;0;D22^r }
I wander if all this can be done with a single funtion, and if the funtion will support a the matrix of complex numbers.
BR

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


Azzi Abdelmalek
Azzi Abdelmalek 2012 年 10 月 2 日
r=0.25
A={rand(2)+j*rand(2);rand(2)+j*rand(2);rand(2)+j*rand(2)}
out=cellfun(@(x) x^r,A,'uni',false)
out{:}
if you A^r element by element use
out=cellfun(@(x) x.^r,A,'uni',false)
  1 件のコメント
Maurizio Mastorfini
Maurizio Mastorfini 2012 年 10 月 4 日
I'll, give this try.. thanks

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

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by