フィルターのクリア

3D surface (frontier) from a set of points

7 ビュー (過去 30 日間)
Marcel
Marcel 2015 年 2 月 13 日
回答済み: Hans Scharler 2024 年 4 月 1 日
Hello,
I would like to create a 3D surface plot out of 15 data points(x,y,z).
x=[0.0080,0.0044,0.0068,0.0040,0.0061,0.0068,0.0067,0.0041,0.0034,0.0049,0.0058,0.0069,0.0037,0.0050,0.0052];
y=[0.0044,0.0015,0.0039,0.0024,0.0016,0.0040,0.0028,0.0019,0.0018,0.0027,0.0024,0.0030,0.0020,0.0019,0.0022];
z=[-0.7422,-0.5890,-0.2624,-0.4232,-0.7427,-0.2631,-0.4131,-0.4303,-0.4680,-0.3782,-0.3646,-0.3505,-0.4246,-0.4694,-0.4074];
I need the plot like a frontier of combinations similar to this figure:
Only think I know so far is to use the surf function, but I think some adaptions need to be done to get this type of figure.
How can this be done ?
Thank you in advance.
Regards

回答 (1 件)

Hans Scharler
Hans Scharler 2024 年 4 月 1 日
You can use the 3D surface plot.
x=[0.0080,0.0044,0.0068,0.0040,0.0061,0.0068,0.0067,0.0041,0.0034,0.0049,0.0058,0.0069,0.0037,0.0050,0.0052];
y=[0.0044,0.0015,0.0039,0.0024,0.0016,0.0040,0.0028,0.0019,0.0018,0.0027,0.0024,0.0030,0.0020,0.0019,0.0022];
z=[-0.7422,-0.5890,-0.2624,-0.4232,-0.7427,-0.2631,-0.4131,-0.4303,-0.4680,-0.3782,-0.3646,-0.3505,-0.4246,-0.4694,-0.4074];
[XI, YI] = meshgrid(linspace(min(x), max(x), 100), linspace(min(y), max(y), 100));
ZI = griddata(x, y, z, XI, YI, 'cubic');
figure;
surf(XI, YI, ZI);
colormap jet
xlabel('Return');
ylabel('Risk');
zlabel('Skewness');
title('The shape of the skewness');
view(-60, 30);
The shape of the skewness

カテゴリ

Help Center および File ExchangeVector Volume Data についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by