Matlab画曲面图,y\x 2500 2300 2100 1900 1700 1500 1300 110050 419.6099 378.4957 361.7958 326.1949 324.8487 279.1898 322.3748 313.403100 300.3931 295.6684 295.5619 280.6507 259.7203 254.6607 248.0432 250.4377150 256.9897 256.9642 261.9825 252.2383
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 02:11:50
Matlab画曲面图,y\x 2500 2300 2100 1900 1700 1500 1300 110050 419.6099 378.4957 361.7958 326.1949 324.8487 279.1898 322.3748 313.403100 300.3931 295.6684 295.5619 280.6507 259.7203 254.6607 248.0432 250.4377150 256.9897 256.9642 261.9825 252.2383
Matlab画曲面图,
y\x 2500 2300 2100 1900 1700 1500 1300 1100
50 419.6099 378.4957 361.7958 326.1949 324.8487 279.1898 322.3748 313.403
100 300.3931 295.6684 295.5619 280.6507 259.7203 254.6607 248.0432 250.4377
150 256.9897 256.9642 261.9825 252.2383 239.6369 240.7982 224.4745 222.3932
200 237.5079 240.1746 245.3043 236.7053 229.4151 230.6737 214.1141 211.2146
250 227.4217 232.538 236.4134 228.4529 223.9555 225.333 208.9436 207.404
300 221.6222 228.9355 231.2774 223.8711 220.8421 222.6803 206.1111 206.6704
350 218.0225 227.258 228.1127 221.2218 218.9672 221.455 204.4527 207.2454
400 215.6562 226.5581 226.0628 219.6478 217.7903 220.997 203.4347 208.3662
450 214.0302 226.3758 224.6824 218.7017 217.0286 220.9584 202.7889 209.6871
我得到了x轴和y轴对应的坐标点上对应的z值,如上图.
我用surf[X,Y] = meshgrid(x,y) ;
surf(X,Y,z),结果显示错误?为什么?
wacs5 - 副总裁:
能帮我拟合一下,让曲面光滑点吗?
Matlab画曲面图,y\x 2500 2300 2100 1900 1700 1500 1300 110050 419.6099 378.4957 361.7958 326.1949 324.8487 279.1898 322.3748 313.403100 300.3931 295.6684 295.5619 280.6507 259.7203 254.6607 248.0432 250.4377150 256.9897 256.9642 261.9825 252.2383
x=[2500 2300 2100 1900 1700 1500 1300 1100];
y=[50 100 150 200 250 300 350 400 450];
[xx,yy]=meshgrid(x,y);
zz=[419.6099 378.4957 361.7958 326.1949 324.8487 279.1898 322.3748 313.403;
300.3931 295.6684 295.5619 280.6507 259.7203 254.6607 248.0432 250.4377;
256.9897 256.9642 261.9825 252.2383 239.6369 240.7982 224.4745 222.3932;
237.5079 240.1746 245.3043 236.7053 229.4151 230.6737 214.1141 211.2146;
227.4217 232.538 236.4134 228.4529 223.9555 225.333 208.9436 207.404;
221.6222 228.9355 231.2774 223.8711 220.8421 222.6803 206.1111 206.6704;
218.0225 227.258 228.1127 221.2218 218.9672 221.455 204.4527 207.2454;
215.6562 226.5581 226.0628 219.6478 217.7903 220.997 203.4347 208.3662;
214.0302 226.3758 224.6824 218.7017 217.0286 220.9584 202.7889 209.6871];
surf(xx,yy,zz)
不需要求出z值;
你这样试一试:
====================
……
[xx,yy]=meshgrid(x,y);
zz=……//z关于x和y的表达式
surf(xx,yy,zz)
====================
晕!!!!!!!!!!!!!!
x=[2500 2300 2100 1900 1700 1500 1300 1100];
y=[50 100 150 200 250 300 350 400 450];
[xx,yy]=meshgrid(x,y);
zz=[419.6099 378.4957 361.7958 326.1949 324.8487 279.1898 322.3748 313.403; <...
全部展开
x=[2500 2300 2100 1900 1700 1500 1300 1100];
y=[50 100 150 200 250 300 350 400 450];
[xx,yy]=meshgrid(x,y);
zz=[419.6099 378.4957 361.7958 326.1949 324.8487 279.1898 322.3748 313.403;
300.3931 295.6684 295.5619 280.6507 259.7203 254.6607 248.0432 250.4377;
256.9897 256.9642 261.9825 252.2383 239.6369 240.7982 224.4745 222.3932;
237.5079 240.1746 245.3043 236.7053 229.4151 230.6737 214.1141 211.2146;
227.4217 232.538 236.4134 228.4529 223.9555 225.333 208.9436 207.404;
221.6222 228.9355 231.2774 223.8711 220.8421 222.6803 206.1111 206.6704;
218.0225 227.258 228.1127 221.2218 218.9672 221.455 204.4527 207.2454;
215.6562 226.5581 226.0628 219.6478 217.7903 220.997 203.4347 208.3662;
214.0302 226.3758 224.6824 218.7017 217.0286 220.9584 202.7889 209.6871];
[xxx,yyy]=meshgrid(1100:35:2500,50:10:450);
zzz=interp2(xx,yy,zz,xxx,yyy,'spline');%插值
surf(xxx,yyy,zzz)%现在光滑了
收起