[已解决] 三维画图

[复制链接]
WKWALKER 发表于 2021-6-9 17:50:11
y1=[ 4145.5    4212.1    4256.4    4287.6    4354.2    4434.2    4505.3    4598.7    4660.8    4753.9    4785.1];
y2=[ 4145.5    4189.1    4200.6    4194.6    4218.3    4251.3    4277.1    4322.2    4334.2    4369.7    4352.3];
y3=[  4145.5    4139.6    4098.8    4038.1    4002.8    3972.5    3931.4    3903.3    3840.2    3792.5    3688.7];
Z=[2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030];
x1=[4114.978 4175.50336 4179.0023 4194.91938 4224.96799 4261.48861 4285.2193 4334.52984 4353.94586 4392.62381 4373.20779];
x2=[4114.978 4154.74527 4164.28172 4158.49173 4179.3811 4211.62338 4235.35098 4280.98971 4287.5744 4320.83845 4295.18085];
x3=[4114.978 4132.94767 4137.71589 4125.34121 4141.46236 4166.09819 4182.21933 4220.2516 4222.06807 4245.79566 4214.57514];
这是我要作图的数据,怎么能够把它化成一个三维的图 不是那种单纯的线的三维图 能不能画出一个类似这种图 763367-20190329104512222-967120.png

最佳答案


j1729330595 发表于 2021-6-9 20:47:28
y1=[ 4145.5    4212.1    4256.4    4287.6    4354.2    4434.2    4505.3    4598.7    4660.8    4753.9    4785.1];
y2=[ 4145.5    4189.1    4200.6    4194.6    4218.3    4251.3    4277.1    4322.2    4334.2    4369.7    4352.3];
y3=[ 4145.5    4139.6    4098.8    4038.1    4002.8    3972.5    3931.4    3903.3    3840.2    3792.5    3688.7];
y=[y1;y2;y3];
Z=[2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030];
z=[Z;Z;Z];
x1=[4114.978 4175.50336 4179.0023 4194.91938 4224.96799 4261.48861 4285.2193 4334.52984 4353.94586 4392.62381 4373.20779];
x2=[4114.978 4154.74527 4164.28172 4158.49173 4179.3811 4211.62338 4235.35098 4280.98971 4287.5744 4320.83845 4295.18085];
x3=[4114.978 4132.94767 4137.71589 4125.34121 4141.46236 4166.09819 4182.21933 4220.2516 4222.06807 4245.79566 4214.57514];
x=[x1;x2;x3];
surf(x,y,z,'EdgeColor','none');
回复此楼

2 条回复


j1729330595 发表于 2021-6-9 20:47:28
y1=[ 4145.5    4212.1    4256.4    4287.6    4354.2    4434.2    4505.3    4598.7    4660.8    4753.9    4785.1];
y2=[ 4145.5    4189.1    4200.6    4194.6    4218.3    4251.3    4277.1    4322.2    4334.2    4369.7    4352.3];
y3=[ 4145.5    4139.6    4098.8    4038.1    4002.8    3972.5    3931.4    3903.3    3840.2    3792.5    3688.7];
y=[y1;y2;y3];
Z=[2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030];
z=[Z;Z;Z];
x1=[4114.978 4175.50336 4179.0023 4194.91938 4224.96799 4261.48861 4285.2193 4334.52984 4353.94586 4392.62381 4373.20779];
x2=[4114.978 4154.74527 4164.28172 4158.49173 4179.3811 4211.62338 4235.35098 4280.98971 4287.5744 4320.83845 4295.18085];
x3=[4114.978 4132.94767 4137.71589 4125.34121 4141.46236 4166.09819 4182.21933 4220.2516 4222.06807 4245.79566 4214.57514];
x=[x1;x2;x3];
surf(x,y,z,'EdgeColor','none');
untitled1.png
回复此楼

WKWALKER 发表于 2021-6-13 16:08:33
j1729330595 发表于 2021-6-9 20:47
y1=[ 4145.5    4212.1    4256.4    4287.6    4354.2    4434.2    4505.3    4598.7    4660.8    4753. ...

我想要做出不同搭配之间的图 比如x1y2   x3y2  等等之类的应该怎么写代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则

热门教程
站长推荐
快速回复 返回顶部 返回列表