Skip to content

Instantly share code, notes, and snippets.

@AmineS
Created August 15, 2013 00:17
Show Gist options
  • Select an option

  • Save AmineS/6237124 to your computer and use it in GitHub Desktop.

Select an option

Save AmineS/6237124 to your computer and use it in GitHub Desktop.
To run it: chmod 0755 cholesky.m ./cholesky 1000 3
#!/usr/bin/octave -qf
arg_list = argv ();
scale = str2num(arg_list{1});
iteration = str2num(arg_list{2});
cumulate = 0; b = 0;
for i = 1:iteration
a = randn(scale, scale);
a = a'*a;
tic;
b = chol(a);
timing = toc;
cumulate = cumulate + timing;
end
timing = cumulate/iteration;
printf(num2str(timing));
% 0.093952 for scale 1000 and iteration 3
@AmineS
Copy link
Author

AmineS commented Aug 15, 2013

To run it: chmod 0755 cholesky.m then ./cholesky 1000 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment