yanice 发表于 2006-11-7 22:45

请问这个怎么改

函数文件
function XX=R2(w,v,alf)
a=alf.^2+4*w.^2;
b=4*sqrt(alf.^2.*w.^2.*v./(1-v));
r=sqrt(a.^2+b.^2);
B=0.5*sqrt((r-a)/2);
C=0.5*(alf-sqrt((r+a)/2));
XX=-((2*C-alf).*w.^2+v*(B.^2+C.^2).*alf./(1-v))/(2*w.*(B.^2+(C-alf).^2))-1;
运行语句
quad(@(w)R2(w,0.3,20),1,20)
提示错误
??? Attempted to access y(7); index out of bounds because numel(y)=1.

Error in ==> quad at 71
if ~isfinite(y(7))
怎么改,谢谢大虾
我是菜鸟
页: [1]
查看完整版本: 请问这个怎么改