フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

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

1 回表示 (過去 30 日間)
Devdatt Thengdi
Devdatt Thengdi 2018 年 4 月 4 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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 件のコメント
Torsten
Torsten 2018 年 4 月 4 日
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.
Devdatt Thengdi
Devdatt Thengdi 2018 年 4 月 4 日
Okay thanks.

回答 (0 件)

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by