blob: 10dbf78a32db9e966897761792b483bc278353b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#! /usr/bin/octave -qf
1; % measuring Octave computing times
function r = rot(a)
c = cos(a);
s = sin(a);
r = [ c , 0, s;
0, 1, 0;
-s, 0, c];
end
t0=time();
x = linspace(0,1,1E5);
ac = eye(3);
for a=x
ac = rot(a)*ac;
end
disp(ac);
disp(time()-t0)
|