Labfans是一个针对大学生、工程师和科研工作者的技术社区。 论坛首页 | 联系我们(Contact Us)
MATLAB爱好者论坛-LabFans.com
返回   MATLAB爱好者论坛-LabFans.com > 工程数学软件 > MATLAB论坛
MATLAB论坛 一切MATLAB相关问题在此讨论。
回复
 
主题工具 显示模式
旧 2008-05-08, 15:46   #1
Believen
初级会员
 
注册日期: 2008-04-21
年龄: 38
帖子: 7
声望力: 0
Believen 正向着好的方向发展
问题 [求助]请帮我看看下面的程序哪里错了,我是初学者,还不懂!谢谢啦!

a=sqrt(123.6/239);
r=1.0184;
x=[0.93174:4.34471];
w=1/6/(1/a)^(2/3)*(6*x^(5/2)*(1/a)^(5/3)/(x^3/a^2)^(1/2)*atan((x^3/a^2)^(1/2))-...
3/2*x^(5/2)*(1/a)^(5/3)/(x^3/a^2)^(5/6)*3^(1/2)*log(1-3^(1/2)*(x^3/a^2)^(1/6)+...
(x^3/a^2)^(1/3))-3*x^(5/2)*(1/a)^(5/3)/(x^3/a^2)^(5/6)*atan(1/2*(x^3/a^2)^(1/6)/...
(1-1/2*3^(1/2)*(x^3/a^2)^(1/6)))-6*x^(5/2)*(1/a)^(5/3)/(x^3/a^2)^(5/6)*...
atan((x^3/a^2)^(1/6))+3/2*x^(5/2)*(1/a)^(5/3)/(x^3/a^2)^(5/6)*3^(1/2)*log(1+3^(1/2)*(x^3/a^2)^(1/6)+...
(x^3/a^2)^(1/3))-3*x^(5/2)*(1/a)^(5/3)/(x^3/a^2)^(5/6)*atan(1/2*(x^3/a^2)^(1/6)/(1+1/2*3^(1/2)*(x^3/a^2)^(1/6))));
h=(2/5*x^(5/2)-x)/(3*a.^3);
f=(2/3*x^(3/2)-x)/a;
k=x.*atan(1/a);
y=1./(1+a.^2)*(x/r-4*a^3/r^2.*(h-f+w-k)) ;
z=2*a^3*r*((x^1.5-1)/(3*a^3)-(x^0.5-1)/a+atan(x^0.5/a)-atan(1./a));
subplot(2,2,1);
plot(x,y)
subplot(2,2,2);
plot(x,z)
subplot(2,2,3);
plot(y,z)
主要是想利用x这个参数,来画y与z的关系图,但是不知道哪里错了。
__________________
where there is sunshine, there is hope and chance!
Believen 当前离线   回复时引用此帖
旧 2008-05-08, 15:49   #2
Believen
初级会员
 
注册日期: 2008-04-21
年龄: 38
帖子: 7
声望力: 0
Believen 正向着好的方向发展
问题

它总是出现??? Error using ==> mpower
atrix must be square.是什么意思啊?
在这里万分感谢咯!
__________________
where there is sunshine, there is hope and chance!
Believen 当前离线   回复时引用此帖
旧 2008-05-09, 10:48   #3
hzxsyzl943
普通会员
 
注册日期: 2008-04-28
年龄: 35
帖子: 63
声望力: 19
hzxsyzl943 正向着好的方向发展
默认

mpower的距阵必须是方阵
hzxsyzl943 当前离线   回复时引用此帖
旧 2008-05-10, 10:15   #4
Believen
初级会员
 
注册日期: 2008-04-21
年龄: 38
帖子: 7
声望力: 0
Believen 正向着好的方向发展
难过

我也知道要是矩阵,但是不知道要怎么改,可以教我吗,谢谢你了!
__________________
where there is sunshine, there is hope and chance!
Believen 当前离线   回复时引用此帖
旧 2008-05-10, 16:59   #5
hzxsyzl943
普通会员
 
注册日期: 2008-04-28
年龄: 35
帖子: 63
声望力: 19
hzxsyzl943 正向着好的方向发展
默认

输出的应该是x y z的关系,不是仅仅是y z了
hzxsyzl943 当前离线   回复时引用此帖
旧 2008-05-11, 12:53   #6
Believen
初级会员
 
注册日期: 2008-04-21
年龄: 38
帖子: 7
声望力: 0
Believen 正向着好的方向发展
问题

但是我还是有点想不通,比如:
t=[0i/100:2*pi];
x=sin(t);
y=cos(t);
plot(x,y)
却能够画出关于x,y的图像,为什么那个就不能呢?
__________________
where there is sunshine, there is hope and chance!
Believen 当前离线   回复时引用此帖
旧 2008-05-15, 15:45   #7
hzxsyzl943
普通会员
 
注册日期: 2008-04-28
年龄: 35
帖子: 63
声望力: 19
hzxsyzl943 正向着好的方向发展
默认

用plot3(x,y,z)输出
hzxsyzl943 当前离线   回复时引用此帖
回复


发帖规则
不可以发表新主题
不可以发表回复
不可以上传附件
不可以编辑自己的帖子

启用 BB 代码
论坛启用 表情符号
论坛启用 [IMG] 代码
论坛禁用 HTML 代码



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


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