how to calculate power of a matrix
7 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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
0 Commenti
Risposte (2)
Wayne King
il 2 Ott 2012
Modificato: Wayne King
il 2 Ott 2012
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 Commento
Maurizio Mastorfini
il 4 Ott 2012
Modificato: Maurizio Mastorfini
il 4 Ott 2012
Azzi Abdelmalek
il 2 Ott 2012
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)
Vedere anche
Categorie
Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!