Created
August 15, 2013 00:17
-
-
Save AmineS/6237124 to your computer and use it in GitHub Desktop.
To run it:
chmod 0755 cholesky.m
./cholesky 1000 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To run it: chmod 0755 cholesky.m then ./cholesky 1000 3