% Practical 2, Subject 3: sub3p2.m
x=1
x=[1]
a=[1 2 3 4]
b=[1,2,3,4]
c=[1 ; 2 ; 3 ; 4]
d=transpose(c)
d=c.'
d=c'
e= [1 2 3 4; 5 6 7 8; 9 10 11 12]
whos
f=a
[1 2 3 4]
g=ans
i
i'
e
e(:)
e(2,3)
e(1,end)
e(end,1)
e(end,end)
e(end-1,end-1)
e(end,end)= e(end)*e(1,end)*e(end,2)
diag(e)
diag(e,0)
diag(e,1)
diag(e,-1)
diag(diag(e))
triu(e)
tril(e)
zeros(3)
whos ans
zeros(2,3)
whos ans
zeros(2,3,'single');
whos ans
ones(2,3,'int8')
whos ans
eye(2,3,'uint16')
whos ans
rand(3,4)
whos ans
rand(3,4,'single')
whos ans
clear ans x a b c d f g
whos 
e
a1=size(e)
a2=length(e)
a3=ndims(e)
a4=numel(e)
whos
