Thanks. I restate my problem/question and hope its better understandable now.

Let us define A and B as kxk matrices. C is the output (matrix), which I try to 
calculate for differnt i values. 

So for example: I want to caluclate the matrix C for the value i=10:

Therefore, I set:

i <- c(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)

Finally, I have to define the summation formula in R. My question is how this 
following summation formula has to be applied to R.

The arithmetic form of the formula equals:

C = (Σ(from i=0 to i)  A^i ) x B x (Σ(from i=0 to i) A^i )’

Which means: 
matrix C equals the sum from i=0 to i times matrix A to the power of i
times matrix B
times the transposed/invers of the sum from i=0 to i times matrix A to the 
power of i


I hope I were able to specify my problem in an understandable way. If not, 
please let me know.

Thanks and regards
Sebastian





________________________________________
From: David Winsemius [dwinsem...@comcast.net]
Sent: Saturday, August 24, 2013 8:35 PM
To: Sebastian Hersberger
Cc: r-help@r-project.org
Subject: Re: [R] how to apply summation sign formula to R

On Aug 24, 2013, at 6:37 AM, Sebastian Hersberger wrote:

> Hi all
>
> I have a short question relating to the usage of the summation sign in R.
>
> Let's define A and B as two kxk matrice.
> My goal is to calculate the matrix C for the periods from 1 to 200 (n=1-200).
>
> C^(n) = Σ_(j=1)^n [(Σ_(i=1)^(j-1) A^i ) B (Σ_(i=1)^(j-1) A^i)’  ]
>
> How has that to be implemented in R (lets say for example for period = n = 
> 150)?

I don't follow all this notation but you might want to look at the expm package 
that has a powm function. It's possible that the expm function may do what you 
want, but as I said I was unclear what the equation was attempting to do. 
Perhaps if you explained the steps in mathematical language, then other viewers 
who actually woke up to attend their linear algebra course might have a better 
chance of offering assistance.

( When I saw the earlier copy yesterday, I had hopes that such wiser viewers 
might chime in and still have such hopes.)

--

David Winsemius
Alameda, CA, USA


______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to