|
|
|
||||
|
Help the Stat Consulting Group by
giving a gift
| |||||
|
Loading
|
|||||
matrix x = (1,2,3\2,3,4\3,4,5)
matrix list x
symmetric x[3,3]
c1 c2 c3
r1 1
r2 2 3
r3 3 4 5
matrix y = x /* create y */
/* begin loop */
local i=1
while `i'<=3 {
local j=1
while `j'<=3 {
matrix y[`i' , `j'] = exp(x[`i' , `j'])
local j = `j' + 1
}
local i = `i' + 1
} /* end loop */
/* matrix y is now the exponentiated matrix */
matrix list y
symmetric y[3,3]
c1 c2 c3
r1 2.7182818
r2 7.3890561 20.085537
r3 20.085537 54.59815 148.41316
UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services