[19242] in s-news-athena

home help back first fref pref prev next nref lref last post

[S] Query:sum of arrays

daemon@ATHENA.MIT.EDU (Stefano Sofia)
Fri Sep 17 05:54:21 1999

Message-Id: <37E20D90.9EF5BDB2@isis.sunderland.ac.uk>
Date: Fri, 17 Sep 1999 10:44:48 +0100
From: Stefano Sofia <cs0sso@isis.sunderland.ac.uk>
Mime-Version: 1.0
To: s-news@wubios.wustl.edu
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


Dear S-Plus users,
I'm struggling to evaluate the sum of some elements as explained below.
( I'm using S-plus4 in Windows environment )
Could please somebody help me in this "qualitative" poor task ?

At each step "t" ( t =1...n ) I defined some arrays as follows: ( i = j
)
pp(t)[i,j] is a square (i x j ) matrix therefore pp <- array(NA, dim =
c(length(n), i, j))
p(t)[j] is a vector therefore p <- array(NA, dim = c(length(n), j))
mm(t)[i,j] is a 3 dimensional matrix, i.e. at each element of a square
(i x j ) matrix corresponds a vector of length s, therefore mm <-
array(NA, dim = c(length(n), i, j, s))
m(t)[j] is a (j x s ) matrix , therefore m <- array(NA, dim =
c(length(n), j, s))
C(t)[j] is a square (s x s ) matrix, therefore C <- array(NA, dim =
c(length(n), s, s))
CC(t)[j] for each element of a square (i x j ) matrix contains a square
(s x s ) matrix, therefore C <- array(NA, dim = c(length(n), i, j, s,
s))

At each step "t" I have to evaluate:

m(t)[j] = SUM(for i=1:4) { pp(t)[i,j] / p(t)[j] } mm(t)[i,j]
and
C(t)[j] = SUM(for i=1:4)  (pp(t)[i,j] / p(t)[j] ) { CC(t)[i,j] + (
mm(t)[i,j] - m(t)[j] ) ( mm(t)[i,j] - m(t)[j] )' }

I'm sorry for the disturb and I'll be grateful for an eventual help
Stefano


-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

home help back first fref pref prev next nref lref last post