50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
n_th = length(free);
error_old = inf;
error=1e50;
theta = theta_0;
Theta = [];
Error = [];
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
|
|
|
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
n_th = length(free);
error_old = inf;
error=1e50;
theta = theta_0;
Theta = [];
Error = [];
Y = [];
iterations = 0;
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
|