Matlab如何绘制这种图?
如图,这种图如何绘制呢?有代码demo学习吗? 参考slice函数的用法 你可以参考下这个例子:clc; clear;
n = 51;
x = linspace(-5, 5, n);
y = x;
z = x;
= meshgrid(x, y, z);
v = exp(-(X.^2+Y.^2+Z.^2)/1e3);
figure('position', );
colormap(jet);
s1 = slice(X, Y, Z, v, [], [], z());
set(s1, 'FaceColor', 'interp', 'EdgeColor', 'none');
cbar = colorbar();
ylabel(cbar, 'data');
xlabel('x'); ylabel('y'); zlabel('z');
set(gca, 'fontsize', 16);
页:
[1]