Hi all, i need to find general expression from a given matrix A, his k-power. When i type something like:
>> A=[1,1,0,0;0,1,0,0;0,0,3^(0.5),1;0,0,-1,3^(0.5);]
A =
1.0000 1.0000 0 0
0 1.0000 0 0
0 0 1.7321 1.0000
0 0 -1.0000 1.7321
and then
>> syms k
>> A^k
??? Error using ==> sym.mpower
Exponent must be a numeric integer.
Is there any way to get this working? I need this to study a finite system impulse response. Thx.
|
|
0
|
|
|
|
Reply
|
alex
|
6/3/2010 2:00:23 PM |
|
alex lunax wrote:
> Hi all, i need to find general expression from a given matrix A, his
> k-power. When i type something like:
>
>>> A=[1,1,0,0;0,1,0,0;0,0,3^(0.5),1;0,0,-1,3^(0.5);]
>
> A =
>
> 1.0000 1.0000 0 0
> 0 1.0000 0 0
> 0 0 1.7321 1.0000
> 0 0 -1.0000 1.7321
>
> and then
>
>>> syms k
>>> A^k
> ??? Error using ==> sym.mpower
> Exponent must be a numeric integer.
> Is there any way to get this working? I need this to study a finite
> system impulse response. Thx.
If I remember my long ago Linear Algebra classes correctly,
[U,S,V] = svd(A);
Ak = U*diag(diag(S).^k)*V';
|
|
0
|
|
|
|
Reply
|
Walter
|
6/3/2010 2:15:38 PM
|
|
Hi alex lunax
> >> A=[1,1,0,0;0,1,0,0;0,0,3^(0.5),1;0,0,-1,3^(0.5);]
> >> syms k
> >> A^k
> ??? Error using ==> sym.mpower
> Exponent must be a numeric integer.
I don't see what your exact purpose is, but maybe this suffices: you can e.g. generate 20 matrices stored in a cell array by
for k = 1:20; B{k} = A^k; end
If you prefer to start with identity matrix, use A^(k-1) instead. If you prefer to have a good level of programming efficiency, wait and hope that a ML Expert will respond.
PS For the case you refer to econometric IRFs (such as in VAR modelling): Do not let confuse yourself by the misleading way IRFs are described in many textbooks. The correct formula is a recursive one and you best read Lutkepohl New Introduction to Multiple TSA. Of course if your "impulse reponses" refer to a different topic, just disregard this.
Good luck.
|
|
0
|
|
|
|
Reply
|
sscnekro
|
6/3/2010 2:28:22 PM
|
|
You need to set the assumption that k is a positive integer:
evalin(symengine,'assume(k,Type::PosInt)')
Now you can take powers:
u = A^k
u =
matrix([[1, 1, 0, 0], [0, 1, 0, 0], [0, 0, 3^(1/2), 1], [0, 0, -1,
3^(1/2)]])^k
You can then use the subs command to evaluate u at various values of k.
For more help on assumptions, see
doc(symengine,'assume')
For help in using MuPAD commands in MATLAB, see
http://www.mathworks.com/access/helpdesk/help/toolbox/symbolic/brs6v40.html#brs6wd3
Alan Weiss
MATLAB mathematical toolbox documentation
On 6/3/2010 10:00 AM, alex lunax wrote:
> Hi all, i need to find general expression from a given matrix A, his
> k-power. When i type something like:
>
>>> A=[1,1,0,0;0,1,0,0;0,0,3^(0.5),1;0,0,-1,3^(0.5);]
>
> A =
>
> 1.0000 1.0000 0 0
> 0 1.0000 0 0
> 0 0 1.7321 1.0000
> 0 0 -1.0000 1.7321
>
> and then
>
>>> syms k
>>> A^k
> ??? Error using ==> sym.mpower
> Exponent must be a numeric integer.
>
> Is there any way to get this working? I need this to study a finite
> system impulse response. Thx.
|
|
0
|
|
|
|
Reply
|
Alan
|
6/3/2010 2:57:56 PM
|
|
|
3 Replies
650 Views
(page loaded in 0.036 seconds)
Similiar Articles: Tensor factorization - comp.soft-sys.matlabNon negative matrix factorization means to factorize a non negative matrix V ... Matrix power symbolic 3 201 alex Identifymajor stripe lines in fingers - comp.soft-sys.matlab ...I am doing my final year project in that i need to identify the major ... Matrix power symbolic 3 196 alex Fitting data and then accessing sse, rsquare, dfe, adjrsquare and ...symbolic to vector? 3 2 yates (3314) ... power: ^ character 2 4 Lasse.Murtomaki (7) accessing 3D matrix 2 6 askme3177 (77) comp.soft-sys.matlab - page 108Symbolic Expressions 0 6 (11/10/2003 6:17:35 PM) I'm trying ... one of the loops are the lines checkarea = matrix_in(i ... 47 PM) Hello people, I m trying to simulate a power ... signal into db - comp.soft-sys.matlab... eps is a small value for not having any 0 on matrix. ... A0below to be packed into a ... are: > =A0 =A0 BUF symbol ... noise ratio or dynamic range of 40 dB represents a power ... HP49G+ Summation?? - comp.sys.hp48MC: 4th power with no small digits - comp.sys.hp48 On other thing I thought I should mention: the HP49G+ and HP50G take more time to do ... In other words, what is the sum ... hpgcc integration program - comp.sys.hp48With the power of HPGCC and HPStack/ HPParser, I wanted ... to numeric integration in approx mode, not symbolic in ... Standardizing values in a matrix - comp.soft-sys.matlab ... Looking for function or technique - comp.lang.rexx... and, because it treats the number as mere | symbols, it ... Biproportional Matrix Balancing and RAS Procedures ... rule - comp.soft-sys.matlab Time sequencing power strip ... Can a procedure contain only a SELECT statement? - comp.databases ...Do it all in 1 SQL statement and harness the power of ... 10g it complains: > > PLS-00103: Encountered the symbol ... Generate a CRUD matrix - comp.databases.oracle.server I ... A procedure for finding the k-th power of a matrix1 O O A procedure for finding the k-th power of a matrix Branko Malesevic Faculty of Electrical Engineering University of Belgrade, Serbia malesh@EUnet.yu Symbols in the Matrix movies.Meanings of times in the Matrix [Go to the Symbol Forum] 12 o'clock. Trinity goes to the power station at 12PM; Neo goes to the Merovingian's restaurant La Vrai at ... 7/19/2012 4:05:49 PM
|