##// END OF EJS Templates
Implementation of voltages simulation for estimating correlations (some things need to be fixed)
yamaro -
r25:26
parent child
Show More
@@ -11,6 +11,7
11 import time No newline at end of file
11 import time
12 import matplotlib.pyplot as plt No newline at end of file
12 import matplotlib.pyplot as plt
13 from scipy.optimize import root No newline at end of file
13 from scipy.optimize import root
14 from scipy.optimize import newton_krylov No newline at end of file
14 from scipy.stats import nanmean No newline at end of file
15 from scipy.stats import nanmean
15 No newline at end of file
16
16 from y_hysell96 import * No newline at end of file
17 from y_hysell96 import *
@@ -26,7 +26,7
26 # WAVELET SOFTWARE AT POLYTECHNIC UNIVERSITY, BROOKLYN, NY No newline at end of file
26 # WAVELET SOFTWARE AT POLYTECHNIC UNIVERSITY, BROOKLYN, NY
27 # http://taco.poly.edu/WaveletSoftware/ No newline at end of file
27 # http://taco.poly.edu/WaveletSoftware/
28
28
No newline at end of file
29 # These coefficients are rounded to 8 decimal places. No newline at end of file
29 # These cofficients are rounded to 8 decimal places. No newline at end of file
30 No newline at end of file
30
31 a1 = np.array([ No newline at end of file
31 a1 = np.array([
32 [ 0.03516384000000, 0], No newline at end of file
32 [ 0.03516384000000, 0],
@@ -37,7 +37,7
37 fid = norm(np.dot(A,u)-b)**2; No newline at end of file
37 fid = norm(np.dot(A,u)-b)**2;
38 print 'lambda = %2e \t' % lambda1, '||A*u-b||^2 = %.1f' % fid; No newline at end of file
38 print 'lambda = %2e \t' % lambda1, '||A*u-b||^2 = %.1f' % fid;
39
39
No newline at end of file
40 # Refinement using brentq (equiv to fzero in matlab) No newline at end of file
40 # Refinement using fzero/ brentq No newline at end of file
41 lambda0 = np.array([lambda1,lambda1*alpha]); # interval with zero-crossing No newline at end of file
41 lambda0 = np.array([lambda1,lambda1*alpha]); # interval with zero-crossing
42 No newline at end of file
42
43 def myfun(lambda1): No newline at end of file
43 def myfun(lambda1):
General Comments 0
You need to be logged in to leave comments. Login now