print iteration output into one single matrix<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />Hi,
How do I get the iteration output into one single matrix with format 3-columns and n-rows? The column1 , column2 and column3 are filled with x(i), y(i), z(i) respectively.
n = 6;
x_i = J (1,n);
y_i = J (1,n);
z_i = J (1,n);
For(i = 0, i <=n , i++,
x_i = 38 + (i*5.0);
y_i = 45 + 3*(x_i) ;
z_i = 80 + 10*(x_i) ;
);
mymatrix = [x_i , y_i, z_i];
print (mymatrix);
Re: print iteration output into one single matrixThanks, MS!
Re: print iteration output into one single matrixThis should work:
n = 6;
x_i = J( 1, n );
y_i = J( 1, n );
z_i = J( 1, n );
For( i = 1, i <= n, i++,
x_i[i] = 38 + (i * 5.0);
y_i[i] = 45 + 3 * (x_i)[i];
z_i[i] = 80 + 10 * (x_i)[i];
);
mymatrix = Transpose( x_i |/ y_i |/ z_i );
Print( mymatrix );