[R] Query on while loop
Atanasio Alberto Tembe Tembe
m@notembe @ending from gm@il@com
Fri Jul 20 23:57:36 CEST 2018
Hello,
I have two matrices: a<-matrix(c(100,350,100,240,150,210,60,120,200 ),3,3)
and c<-matrix(c(2,9,13,10,4,11,14,12,3),3,3).
I have also defined the following variables:
K=0
A[i,j]=colSums(a)
P[i,j]=rowSums(a)
F[i,j]=c[i,j]^(-2 )
Using these data I want to perform the calculation which must end when
a convergence between X and Y values is reached.
X1=1/(K*A1*c11+K*A2*c12+K*A3*c13)
Y1=1/(X1*P1*c11+X1*P1*c12+X1*P1*c13)
X2=1/(Y1*A1*c21+Y1*A2*c22+Y1*A3*c23)
Y2=1/(X2*P2*c21+X2*P2*c22+X2*P2*c23)
X3=1/(Y1*A1*c31+Y1*A2*c32+Y1*A3*c33)
Y3=1/(X2*P3*c31+X2*P3*c32+X2*P3*c33)
I have been struggling over this for some time. Your support is highly
appreciated.
Thanks
--
Atanasio Alberto Tembe (Mr)
Doctoral student
Graduate School of Urban Innovation
Transportation and Urban Engineering Laboratory
Yokohama National University
Tel: +81-(0)80-4605-1305 <+81%2080-8080-2482>
Mail: tembe-atanasio-dz using ynu.jp <pattamaporn-wongwiriya-cs using ynu.jp>
manotembe using gmail.com <pattamaporn.w using gmail.com>
[[alternative HTML version deleted]]
More information about the R-help
mailing list