Differences From Artifact [80100ee5cc]:
- Executable file mttroot/mtt/bin/trans/m/mtt_optimise.m — part of check-in [4c14f1758d] at 1999-11-11 21:48:46 on branch origin/master — Modified step size adjustment (user: gawthrop@users.sourceforge.net, size: 2843) [annotate] [blame] [check-ins using] [more...]
To Artifact [dfff4797e3]:
- Executable file mttroot/mtt/bin/trans/m/mtt_optimise.m — part of check-in [cd23f4d0ce] at 1999-11-12 06:56:18 on branch origin/master — *** empty log message *** (user: gawthrop@users.sourceforge.net, size: 2861) [annotate] [blame] [check-ins using]
| ︙ | |||
52 53 54 55 56 57 58 59 60 61 62 63 64 65 | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | + |
Y = [];
iterations = -1;
while (abs(error_old-error)>criterion)&&(iterations<max_iterations)
iterations = iterations + 1;
error_old_old = error_old;
error_old = error;
eval(sprintf("[t,y,y_theta] = mtt_s%s(system_name,theta,free);",method)); # Simulate system
plot(t,y(:,2:3));
error = 0;
J = zeros(n_th,1);
JJ = zeros(n_th,n_th);
for i = 1:n_y
E = weight(:,i).*(y(:,i) - y_s(:,i)); # Weighted error
error = error + (E'*E); # Sum the error
|
| ︙ |