y = [];
whos y;
  Name      Size            Bytes  Class     Attributes

  y         0x0                 0  double              

y(1) = 1;
whos y;
  Name      Size            Bytes  Class     Attributes

  y         1x1                 8  double              

y(2) = 2;
whos y;
  Name      Size            Bytes  Class     Attributes

  y         1x2                16  double              

y(2) = 5;
whos y;
  Name      Size            Bytes  Class     Attributes

  y         1x2                16  double              

y = zeros(1,10);
whos y;
  Name      Size            Bytes  Class     Attributes

  y         1x10               80  double              

x = [1 2 3 4];
x

x =

     1     2     3     4

x .^ 2

ans =

     1     4     9    16

x

x =

     1     2     3     4

x < 2

ans =

     1     0     0     0

sum(x < 2)

ans =

     1

x = [5 6 7 8 9]

x =

     5     6     7     8     9

x < 7

ans =

     1     1     0     0     0

x(x < 7)

ans =

     5     6

x([1 1 0 0 0])
??? Subscript indices must either be real positive integers or logicals.
 
y = [1 1 0 0 0]

y =

     1     1     0     0     0

x(y)
??? Subscript indices must either be real positive integers or logicals.
 
x < 7

ans =

     1     1     0     0     0

x > 7

ans =

     0     0     0     1     1

x

x =

     5     6     7     8     9

x < 7 | x > 7

ans =

     1     1     0     1     1

x(x <7 | x > 7)

ans =

     5     6     8     9

y = x < 7

y =

     1     1     0     0     0

whos x
  Name      Size            Bytes  Class     Attributes

  x         1x5                40  double              

whos y
  Name      Size            Bytes  Class      Attributes

  y         1x5                 5  logical              

x

x =

     5     6     7     8     9

y

y =

     1     1     0     0     0

x(y) = x(y) .* 2

x =

    10    12     7     8     9

z = [1 2 0 0 6];
find(z)

ans =

     1     2     5

z = [1 2 0 0 0 6];
find(z)

ans =

     1     2     6

z = [1 2 0 0 0 8];
find(z)

ans =

     1     2     6

z = [1 2 0; 0 0 8]

z =

     1     2     0
     0     0     8

find(z)

ans =

     1
     3
     6

z

z =

     1     2     0
     0     0     8

z == 2

ans =

     0     1     0
     0     0     0

find(z == 2)

ans =

     3

[x y] = find(z == 2)

x =

     1


y =

     2

[x y a] = find(z == 2)

x =

     1


y =

     2


a =

     1

randi(100)

ans =

    69

randi(100)

ans =

    93

rand()

ans =

    0.1418

floor(rand()*100)

ans =

    88

floor(rand()*100)+1

ans =

     2

record1.name = 'Me';
record1

record1 = 

    name: 'Me'

record1.credits = 16;
record1

record1 = 

       name: 'Me'
    credits: 16

record2.name = 'Not Me';
record2.credits = 30;
record2

record2 = 

       name: 'Not Me'
    credits: 30

displayRecordName(record1);
Me
displayRecordName(record2);
Not Me
