tnjk.net
当前位置:首页 >> mAtlAB中画三维散点图 >>

mAtlAB中画三维散点图

例子: x=[4229042.63 4230585.02 4231384.96 4231773.63 4233028.58 4233296.71 4235869.68 4236288.29]; y=[431695.4 441585.8 432745.6 436933.7 428734.4 431946.3428705.0 432999.5]; z=[1.019 1.023 1.011 1.022 1.020 1.022 1.022 1.023]...

不能出三维图的根本错误是,hold on放在循环语句外面,这样系统会默认出图是二维。应把该命令放在plot3()的后面。更改后的代码: figure(1); for i=1:8; x=i*2; y=i*3; z=i*5; plot3(x,y,z,'r*');grid on;hold on; end hold off;

举例说明空间坐标数据A; A=[w];%x,y,z轴坐标 x=A(:,1);y=A(:,2);z=A(:,3); scatter3(x,y,z)%散点图 figure [X,Y,Z]=griddata(x,y,z,linspace(min(x),max(x))',linspace(min(y),max(y)),'v4');%插值 pcolor(X,Y,Z);shading interp%伪彩色图 figur...

A=[-6 6 41.1;-3 6 7.9;3 6 20.7;6 -6 41.1;-6 3 40.5;-3 3 42.8;3 3 43;6 3 43.1; -6 -3 40.5;-3 -3 42.3;3 -3 41.9;6 -3 44;-6 -6 42.9;-3 -6 42.1;3 -6 42.2;6 -6 42.6] x=A(:,1);y=A(:,2);z=A(:,3); scatter(x,y,5,z)%散点图 figure [X,Y,Z]...

就用plot3啊,你把所有点的顺序按照你连接的顺序排序,然后用plot3就行了。然后你再使用点型设置,画出那些空心的圆点就可。 u=[5 0.01 0.13861; 10 0.1 0.13611; 20 0.08 0.13667; 30 0.01 0.13861; 40 0.01 0.13861; 50 0.08 0.13667; 100 1.9...

data=load('data.txt'); x=data(:,1); y=data(:,2); z=data(:,3); for m=1:length(x) for n=1:length(y) for i=1:length(z) l(i)=1./((x(n)-x(i)).^2+(y(m)-y(i)).^2); end r=l*z; z(m,n)=r./sum(l); end end [X,Y]=meshgrid(x,y); mesh(X,Y,z) ...

请参照如下例题: 二元散乱点上的插值与作图 函数:zij=griddata(x0,y0,z0,xi,yj,’插值方法’) 例如:r1=rand(30,1);r2=rand(30,1); x0=-2+(2-(-2))*r1; y0=-1+(3-(-1))*r2; z0=x0.*exp(-x0.^2-y0.^2); uij=-2:0.2:2; vij=-1:0.2:3; [xi,yj]=mesh...

例如,这些点的三维数据如下(1.486,3.059,0.1);(2.121,4.041,0.1);(2.570,3.959,0.1);(3.439,4.396,0.1);(4.505,3.012,0.1);(3.402,1.604,0.1);(2.570,2.065,0.1);(2.150,1.970,0.1);(1.794,3.059,0.2);(2.121,3.615,0.2);...

不知道你要的哪种,我都发下。 第一种渲染方式: A=[5 5 5; 7 2 1; 4 7 2; 6 1 6; 2 6 7; 3 3 4; 1 4 3];%x,y,z轴坐标 x=A(:,1);y=A(:,2);z=A(:,3); scatter3(x,y,z)%散点图 figure; plot3(x,y,z,'.r','markersize',16) grid on; xlabel('X') yl...

% 生成测试数据,每列是一个时刻的数据 x = randn(1000, 500); y = randn(1000, 500); z = randn(1000, 500); % 下面这句比较重要——避免闪烁 set(gcf, 'doublebuffer', 'on') for i = 1 : size(x,2) plot3(x(:,i), y(:,i), z(:,i), '.') % 下面...

网站首页 | 网站地图
All rights reserved Powered by www.tnjk.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com