RosettaCodeData/Task/Matrix-multiplication/Octave/matrix-multiplication.octave
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

13 lines
165 B
Text

a = zeros(4);
% prepare the matrix
% 1 1 1 1
% 2 4 8 16
% 3 9 27 81
% 4 16 64 256
for i = 1:4
for j = 1:4
a(i, j) = i^j;
endfor
endfor
b = inverse(a);
a * b