PDA

查看完整版本 : 求助~~~高手帮下忙,看看程序错在哪里?谢啦


小溪1986
2009-03-01, 16:31
H=input('pleasse input the value of H:');
M=input('pleasse input the value of M:');
disp(H);
disp(M);
if H>0.5 && H<1
Q=0
else if H>0 && H<0.5
U=0;
for u=1:Inf
U=U+u^(H-1.5)
end;
Q=(0.5-H)*U;
end;
end;
disp(Q);
G(u:1)=randn(M-1);
for u=(t-M):(t-1)
T(1,:)=(t-u)^(H-1.5);
end;
G(t)=randn(1);
f=(H-0.5)*(T*G(u))+Q*G(t);
plot(t,f,'b*');
grid on;

skingenius
2009-03-02, 21:41
H=input('pleasse input the value of H:');
M=input('pleasse input the value of M:');
disp(H);
disp(M);
if H>0.5 && H<1
Q=0
else...

不明白这个程序是干什么?u=1:inf 是一个无限循环,如果进入就麻烦了!你最好先给Q赋值,否则如果Q不满足if else if end的条件,那Q就无值可取。

mathjiang
2009-03-04, 12:16
把错误信息帖出来就知道了。
好多坛友或游客都不知贴出错误信息,why?

chihu117
2009-03-04, 20:20
最好说明一下你想干什么

小溪1986
2009-03-09, 19:14
谢谢大家~~我自己已经调试好了