3D Scatterplot and Pareto Front visualization
8 次查看(过去 30 天)
显示 更早的评论
Hey,
So first things first, I'm really new in MatLab and even though I'm trying to learn the bassics in order to do what I want and udenrstand it, it seems like it is hard when you are under schedule.
I've Uploaded an excel file with all my data ( 525 rows and 3 columns) and then I created my workspace. After that I defined my x's,y's and z's using the following commands.
numbers = xlsread(filename);
x = numbers(1:525,3);
y = numbers(1:525,2);
z = numbers(1:525,1);
I tried following this answer ( https://www.mathworks.com/matlabcentral/answers/110723-is-it-possible-to-generate-surface-pareto-front-for-3-objective-functions-and-plot-it) but I had no luck - the first reason was because I couldn'y understand what a,b and c were and how they were related to my data.
So my question is, how do I create a 3d scatterplot were I can also create a visible Pareto front?
Thanks in advance!
0 个评论
回答(1 个)
Alan Weiss
2021-4-12
Did you try the scatteredinterpolant code from the answer? Modify it for your data:
F = scatteredInterpolant(numbers(:,1),numbers(:,2),numbers(:,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')
Alan Weiss
MATLAB mathematical toolbox documentation
5 个评论
Alan Weiss
2021-4-12
Sorry, my original code was for numbers on the order of 1, your data might be different. This code should be independent of the scale:
sgr = linspace(min(numbers(1:525,1)),max(numbers(1:525,1)));
ygr = linspace(min(numbers(1:525,2)),max(numbers(1:525,2)));
Alan Weiss
MATLAB mathematical toolbox documentation
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multiobjective Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!