Text-only Table of Contents (frame/ no frame)
(6) Entering Matrices Previous Top Next
">

Entering Matrices

Square Brackets
Use of Colons
Parentheses
   
Try:
>> x=[1 5; 10 15]
x =
       1      5
       10     15

>> y  = [ 4,5,6; 7,8,9]
y =  
      4     5     6
      7      8    9

>>  z= [ .4   cos(pi/3)  6/7^2]
z =
       0.400     0.500      0.1224

>> z(2,3) =.9
z =
      0.400     0.500      0.1224
              0            0      0.9000


     
Try:
>> t= 0:2:10
t =
      0   2   4   6   8   10

>>v =20:25
v =
      20 21 22 23 24 25



Previous Top Next


Entering_Matrices.src  last modified Jan 27, 2014 Introduction Table of Contents
(frame/no frame)
Printable
(single file)
© Dartmouth College