Is it possible to generate *surface* pareto front for 3 objective functions and plot it?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sotirios
am 26 Dez. 2013
Kommentiert: Tarek Salem
am 18 Aug. 2014
Is it possible to generate surface pareto front for 3 objective functions and plot it? My actual question is that when we have two objectives, the Pareto front is a line in 2D space and when we have three objectives the Pareto front is a surface in 3d space. How we can obtain that surface?
0 Kommentare
Akzeptierte Antwort
Alan Weiss
am 26 Dez. 2013
Sure.
function f = simple_multiobj2(x,a,b,c)
x = x(:); a = a(:); b = b(:); c = c(:); % all column vectors
f(1) = sqrt(1+norm(x-a)^2);
f(2) = 0.5*sqrt(1+norm(x-b)^2) + 2;
f(3) = 0.25*sqrt(1+norm(x-c)^2) - 4;
Then run this:
a = zeros(2,1);
b = [2;1];
c = [3;-.5];
fun = @(u)simple_multiobj2(u,a,b,c);
[x,f,ef] = gamultiobj(fun,2)
scatter3(f(:,1),f(:,2),f(:,3),'k.');
If you want to plot an interpolated surface or mesh, use scatteredInterpolant.
Alan Weiss
MATLAB mathematical toolbox documentation
3 Kommentare
Alan Weiss
am 27 Dez. 2013
Bearbeitet: Alan Weiss
am 27 Dez. 2013
F = scatteredInterpolant(f(:,1),f(:,2),f(:,3),'linear','none');
sgr = min(f(:,1)):.01:max(f(:,1));
ygr = min(f(:,2)):.01:max(f(:,2));
[XX,YY] = meshgrid(sgr,ygr);
ZZ = F(XX,YY);
surf(XX,YY,ZZ,'LineStyle','none')
The 'none' argument in scatteredInterpolant removes any extrapolated points, so you just se the true extent of the calculated surface, assuming that linear interpolation shows the truth.
If this sufficiently answers your question, please accept the answer.
Alan Weiss
MATLAB mathematical toolbox documentation
Tarek Salem
am 18 Aug. 2014
please i i need to plot 4D function, because the algorithm optimize 4 functions at a time
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!