Contents Previous Next Subchapters Current Chapters-> assignment clear const elements pi building exit include auto_include comment printexp print stop coldim rowdim size dim reshape MatrixAsVector Parent Chapters-> Omatrix6 basic assignment Search Tools-> contents reference index search

Assigning Values To Variables
 Syntax variable` = `value See Also multiple assignment , functions as variables , constants

Description
Assigns a value to the specified variable.

Tutorial
The assignment statement sets a variable equal to a value. The variable takes the type and dimension of the value assigned to it.

Scalars
If you enter ```      x = 42      print x ``` O-Matrix will respond ```      42 ```
Row Vectors
If you enter ```      x = [2, 3, .2]      x ``` O-Matrix responds ```      [ 2 , 3 , 0.2 ] ```
Column Vectors
If you enter ```      x = {2, 3, .2}      x ``` O-Matrix responds ```      {      2      3      0.2      } ```
Matrices
Entering ```      x = {[1, 2], [0, 1]}      x ``` yields ```      {      [ 1 , 2 ]      [ 0 , 1 ]      } ```