|
119 | 119 |
|
120 | 120 | subplot(221); title("Identity weights") |
121 | 121 | # plot(T, Y[:,1, 1], '-', T, Y[:,2, 2], '--'); hold(True); |
122 | | -plot(Tx, Yx[0,:].T, '-', Ty, Yy[0,:].T, '--'); hold(True); |
| 122 | +plot(Tx.T, Yx[0,:].T, '-', Ty.T, Yy[0,:].T, '--'); hold(True); |
123 | 123 | plot([0, 10], [1, 1], 'k-'); hold(True); |
124 | 124 |
|
125 | 125 | axis([0, 10, -0.1, 1.4]); |
|
141 | 141 | [T3, Y3] = step(H1cx, T=linspace(0,10,100)); |
142 | 142 |
|
143 | 143 | subplot(222); title("Effect of input weights") |
144 | | -plot(T1, Y1[0,:].T, 'b-'); hold(True); |
145 | | -plot(T2, Y2[0,:].T, 'b-'); hold(True); |
146 | | -plot(T3, Y3[0,:].T, 'b-'); hold(True); |
| 144 | +plot(T1.T, Y1[0,:].T, 'b-'); hold(True); |
| 145 | +plot(T2.T, Y2[0,:].T, 'b-'); hold(True); |
| 146 | +plot(T3.T, Y3[0,:].T, 'b-'); hold(True); |
147 | 147 | plot([0 ,10], [1, 1], 'k-'); hold(True); |
148 | 148 |
|
149 | 149 | axis([0, 10, -0.1, 1.4]); |
|
162 | 162 | subplot(223); title("Output weighting") |
163 | 163 | [T2x, Y2x] = step(H2x, T=linspace(0,10,100)); |
164 | 164 | [T2y, Y2y] = step(H2y, T=linspace(0,10,100)); |
165 | | -plot(T2x, Y2x[0,:].T, T2y, Y2y[0,:].T) |
| 165 | +plot(T2x.T, Y2x[0,:].T, T2y.T, Y2y[0,:].T) |
166 | 166 | ylabel('position'); |
167 | 167 | xlabel('time'); ylabel('position'); |
168 | 168 | legend(('x', 'y'), loc='lower right'); |
|
185 | 185 | # step(H3x, H3y, 10); |
186 | 186 | [T3x, Y3x] = step(H3x, T=linspace(0,10,100)); |
187 | 187 | [T3y, Y3y] = step(H3y, T=linspace(0,10,100)); |
188 | | -plot(T3x, Y3x[0,:].T, T3y, Y3y[0,:].T) |
| 188 | +plot(T3x.T, Y3x[0,:].T, T3y.T, Y3y[0,:].T) |
189 | 189 | title("Physically motivated weights") |
190 | 190 | xlabel('time'); |
191 | 191 | legend(('x', 'y'), loc='lower right'); |
|
0 commit comments