Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Empty plot: I need to plot one variable vs Results of fmincon

1 visualización (últimos 30 días)
Devdatt Thengdi
Devdatt Thengdi el 4 de Abr. de 2018
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
clc
d0 = 0.01:1;
Xmat = zeros(numel(d0),5);
for i=1:numel(d0)
d0_actual = Ef(i);
x0 = [0.08, 9.14, 10, 1, 0.1];
options=optimset('fmincon');
options.Display='iter';
options.Algorithm='interior-point';
fitnessfcn = @(x)Lobo(d0_actual, x(2), x(3), x(4), x(5));
nonlcon1 = @(x)nonlcon(d0_actual, x(2), x(3), x(4), x(5));
lb = [0.08, 9.14, 10, 1, 0.1];
ub = [1, 18.3, 1300, 25, 1];
[X, fval] = fmincon(fitnessfcn, x0, [], [], [], [], lb, ub, nonlcon1, options);
Xmat(i,:) = X(:);
X
disp(X);
end
plot(d0(i), Xmat(i,1));
  8 comentarios
Torsten
Torsten el 4 de Abr. de 2018
If you write d0=0.01:1, the step size is automatically chosen to be 1. Since 0.01+1 = 1.01 > 1, lower limit + stepsize > upper limit. Thus d0 = 0.01 only.
Best wishes
Torsten.

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by