Subject: XploRe: Learning Guide
See XploRe:

Quantlet: matrix01
Description: Simple matrices.
Download: matrix01.xpl

Code:
;
  mat=matrix(2,3)          ; matrix of ones
  mat
;
  array = matrix(2,3,2)    ; array of ones
  array
;
  randomize(111222)        ; sets random seed
  normal(2,2,2)            ; array of normal random numbers
;
  x = #(1, 2, 3)           
  diag (x)                 ; diagonal matrix
;
  library("xplore")
  id=unit(3)               ; identity matrix
;
  dim(mat)                 ; dimension 
;
  rows(mat)                ; number of rows
  cols(mat)                ; number of columns
;
  dim(array)               ; diemension
;
  unit(3)~matrix(3)        ; horizontal concatenation
;
  diag(1:3)|matrix(1,3)    ; vertical concatenation
;
  textmat = #("aa","c") ~ #("b","d2") ; text matrix
  dim(textmat)





Subject: XploRe: Learning Guide
See XploRe:

© MD*Tech - Method and Data Technologies, generated on 6.6.2000 .