MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   帮忙啊!画三维图问题! (https://www.labfans.com/bbs/showthread.php?t=3635)

sura 2008-06-17 15:03

帮忙啊!画三维图问题!
 
2 个附件
求助:
我要画个三维图, X和Y的范围知道了 有个函数是关于Y的 即f(Y) Z轴是关于X和f(Y)的函数 表达式也有 照例用两个循环就可以画出XYZ的图 可怎么总提示“Vectors must be the same lengths.”
望大虾指教
还有 画图命令plot3 surf 和mesh该用哪个啊??

程序在附件里 主程序是Figure.m 其他被调用程序应该没问题的 谢谢啦:mad:

fanxing39 2008-06-19 00:26

2 个附件
[QUOTE=sura;12741]求助:
我要画个三维图, X和Y的范围知道了 有个函数是关于Y的 即f(Y) Z轴是关于X和f(Y)的函数 表达式也有 照例用两个循环就可以画出XYZ的图 可怎么总提示“Vectors must be the same lengths.”
望大虾指教
还有 画图命令plot3 surf 和me...[/QUOTE]

你的程序里的 MIFTP 是 190*10的矩阵,
难道你要得到10条曲线吗?
如果是的话,把最后一个程序改成下面的
plot3(n,Pdet,MIFTP(:,1),n,Pdet,MIFTP(:,2),n,Pdet,MIFTP(:,3),n,Pdet,MIFTP(:,4),n,Pdet,MIFTP(:,5),n,Pdet,MIFTP(:,6),n,Pdet,MIFTP(:,7),n,Pdet,MIFTP(:,8),n,Pdet,MIFTP(:,9),n,Pdet,MIFTP(:,10))

Ps: 程序是长了点哦 ,不过可以把10条线画到一个图形窗口中 :cool:


所有时间均为北京时间。现在的时间是 11:14

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.