Dear all,
I have a matrix "r" (attached in the Gretl session file) and need to
calculate the following values:
R6 = r[6,1] + r[5,2] + r[4,3] + r[3,4] + r[2,5] + r[1,6]
R7 = r[7,1] + r[6,2] + r[5,3] + r[4,4] + r[3,5] + r[2,6]
.
.
.
R12 = r[12,1] + r[11,2] + r[10,3] + r[9,4] + r[8,5] + r[7,6]
Aft
On Fri, 16 Apr 2010, Henrique Andrade wrote:
> I have a matrix "r" (attached in the Gretl session file) and need to
> calculate the following values:
>
> R6 = r[6,1] + r[5,2] + r[4,3] + r[3,4] + r[2,5] + r[1,6]
> R7 = r[7,1] + r[6,2] + r[5,3] + r[4,4] + r[3,5] + r[2,6]
> .
> .
> .
> R12 = r[12,1
Em 16 de abril de 2010 Allin escreveu:
On Fri, 16 Apr 2010, Henrique Andrade wrote:
>
> > I have a matrix "r" (attached in the Gretl session file) and need to
> > calculate the following values:
> >
> > R6 = r[6,1] + r[5,2] + r[4,3] + r[3,4] + r[2,5] + r[1,6]
> > R7 = r[7,1] + r[6,2] + r[5,3] +
Henrique Andrade a écrit :
>
> matrix R = zeros(12,1)
>
> loop i=6..12
> R_$i = r[$i,1] + r[$i-1,2]+ r[$i-2,3]+ r[$i-3,4]+ r[$i-4,5]+ r[$i-5,6]
> R[i] = R_$i
> end loop
>
>
Hi Henrique,
Well, what do you think about the following general form :
matrix R = zeros(dim1,dim2)# In your e
On Sat, 17 Apr 2010, Henrique Andrade wrote:
> I'd attached a .pdf file into this e-mail to show you a little bit better
> what exactly I need.
On that basis, here's an example:
matrix r = mshape(seq(1,144),12,12)
print r
scalar m = 7 # number of values to compute
scalar n = 6 # number of ele
Dear Artur and Allin,
Thank you so much for your invaluable help. Now everything is working
really fine! With the use of the Gretl scripting language I'm going to save
a lot of time (these tasks are part of my PhD thesis).
Best regards,
Henrique
2010/4/18 Allin Cottrell
>
> On Sat, 17 Apr 2010