search for: 300763

Displaying 1 result from an estimated 1 matches for "300763".

Did you mean: 30073
2009 Jan 09
3
Matrix: Problem with the code
Hi, Can any one please explain why the following code doesn't work? Or can anyone suggest an alternative. Suppose       x<-c(23,67,2,87,9,63,8,2,35,6,91,41,22,3)        mat<-0;        for(j in 1:length(x))        {              for(i in 1:p)                      mat[i,j]<-x[j]^i;        }    Actually I want to have a matrix with p columns such that each column will have the