GitHub

Original file line numberDiff line numberDiff line change

@@ -233,13 +233,16 @@ With this tool at our disposal, let’s form the composite system and

233233

simulate it

234234
235235

```{code-cell} python3

236+

# Extract integer K1 from the nested array

237+

K1 = K1[0][0]

238+
236239

# Create grand state-space for y_t, a_t as observed vars -- Use

237240

# stacking trick above

238241

Af = np.array([[ 1, 0, 0],

239-

[K1[0][0], 1 - K1[0][0], K1[0][0] * σ_y],

242+

[K1, 1 - K1, K1 * σ_y],

240243

[ 0, 0, 0]])

241244

Cf = np.array([[σ_x, 0],

242-

[ 0, K1[0][0] * σ_y],

245+

[ 0, K1 * σ_y],

243246

[ 0, 1]])

244247

Gf = np.array([[1, 0, σ_y],

245248

[1, -1, σ_y]])

Read the original on github.com ↗