% Demo 3  ( Compare with demo1)
% Vectorized calculation of 30.000 values 
tic
tmax=30000;
t=[1:tmax];
y=cos(t);
toc