annotate tests/testLstsq.py @ 41:a916c38cfe8a

Added standard params std3 and std4, which are identical to std1 and std2, but with 10dB SNR
author nikcleju
date Mon, 28 Nov 2011 13:29:53 +0000
parents 9079a9f7c4cf
children
rev   line source
nikcleju@7 1 import numpy as np
nikcleju@7 2 import numpy.linalg
nikcleju@7 3 import scipy.io
nikcleju@7 4 import scipy.linalg
nikcleju@7 5 import time
nikcleju@7 6
nikcleju@7 7 def main():
nikcleju@7 8 mdict = scipy.io.loadmat('testLstsq.mat')
nikcleju@7 9 A = mdict['A'].newbyteorder('=')
nikcleju@7 10 b = mdict['b']
nikcleju@7 11
nikcleju@7 12 starttime = time.time()
nikcleju@7 13 for i in np.arange(mdict['nruns']):
nikcleju@7 14 #for i in np.arange(100):
nikcleju@7 15 #np.linalg.lstsq(A, b)
nikcleju@7 16 np.linalg.svd(A)
nikcleju@7 17 print "Elapsed time = ",(time.time() - starttime)
nikcleju@7 18
nikcleju@7 19 if __name__ == "__main__":
nikcleju@7 20 main()