matlab画图问题。

2 vues (au cours des 30 derniers jours)
果博东方开户客服【微8785092】
这个是把半径为1、0.75、0.5的球离散化为20X20的网格点,并绘制散点图,请问这两个ones命令组成的向量是什么意思呢?
N=20;
[X,Y,Z]=sphere(N-1)
x=X(:); y=Y(:); z=Z(:)
x=[x;x*0.75;x*0.5]; y=[y;y*0.75;y*0.5]; z=[z;z*0.75;z*0.5];
s=[ones(N.^2,1)*40;ones(N.^2,1)*30;ones(N.^2,1)*20];
c=[ones(N.^2,1)*3;ones(N.^2,1)*2;ones(N.^2,1)];
scatter3(x,y,z,s,c,'filled')
xlabel('x');ylabel('y');zlabel('z')
colorbar

Réponse acceptée

果博东方开户经理【微8785092】
仅供参考
s决定每个圆圈的大小,c决定每个圆圈的颜色

Plus de réponses (0)

Catégories

En savoir plus sur 插值 dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!