a = [1 2 3 4 5; 6 7 8 9 10; 11 12 13 14 15]
size(a)
length(a)
help length
a(3,2)
% spezziamo a in tre righe
riga1 = a(1, [1:5])
riga1 = a(1, : )
riga1 = a(2, : )
riga1 = a(3, : )
colonna5 = a( : , 5)
% sottomatrice
a([1 2], [2 4])
a(1,2)
a(1,4)
a(2,2)
a(2,2) = 0
b = [2 3; 4 5]
c = inv(b)
b * c
c * b
eye(2)
% calcolare l'inversa di b
eye(2)/b
b\eye(2)
d = [1 2 3; 4 5 6]
% l'inversa della b era c
c * d
b\d
d/b
d'/b
d.'/b
a
diag(a)
v = diag(a)
diag(v)
a
% scambiare nella a la prima e la terza riga
aa = a;
a(1, :) = a(3, :)
a(3, :) = aa(1, :)
a
a([3 2 1], :)
eye(3) * a
a
eye(3) * a
[0 0 1; 0 1 0; 1 0 0]
[0 0 1; 0 1 0; 1 0 0] * a
rand(2,3)
mean(rand(1000))
aaa=rand(1000);
size(aaa)
mean(rand(1000,1))
mean(rand(1000000,1))
n=2000; A=randn(n); B=randn(n); tic; C=A*B; t=toc, MFLOPS=2*n^3/t*1e-6 
quit
# Octave 3.6.2, Wed Oct 24 17:01:27 2012 CEST <achilles@achilles-TOSH>

