File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -12,15 +12,16 @@ def create_system_with_B():
1212 return {"snapshots" : snapshots , "u" : u , "B" : B }
1313
1414
15- def create_system_without_B ():
15+ def create_system_without_B (lag = 1 ):
1616 n = 5 # dimension snapshots
1717 m = 15 # number snapshots
1818 A = scipy .linalg .helmert (n , True )
1919 B = np .random .rand (n , n ) - 0.5
20- x0 = np .array ([0.25 ] * n )
21- u = np .random .rand (n , m - 1 ) - 0.5
22- snapshots = [x0 ]
23- for i in range (m - 1 ):
20+ snapshots = []
21+ for i in range (lag ):
22+ snapshots .append (np .array ([0.25 ] * n ))
23+ u = np .random .rand (n , m - lag ) - 0.5
24+ for i in range (m - lag ):
2425 snapshots .append (A .dot (snapshots [i ]) + B .dot (u [:, i ]))
2526 snapshots = np .array (snapshots ).T
2627 return {"snapshots" : snapshots , "u" : u , "B" : B , "A" : A }
You can’t perform that action at this time.
0 commit comments