带循环的复杂公式的表达问题。
Afficher commentaires plus anciens
[code]function result
for j=1:10
f=@(x)(((1-x.^j)^(1-.j).*x.^(j.*(j-1)))+1).^(1./j);
g=mgsint(f,0,1,1000000,5)
end[/code]
错误代码是这样的
??? Error using ==> mpower
Inputs must be a scalar and a square matrix.
Error in ==> result>@(x)(((1-x.^j)^(1-j).*x.^(j.*(j-1)))+1).^(1/j) at 3
f=@(x)(((1-x.^j)^(1-j).*x.^(j.*(j-1)))+1).^(1/j);
Error in ==> mgsint>gsint at 30
g=(b-a)/2*sum(A.*feval(f,(b-a)/2*t+(a+b)/2));
Error in ==> mgsint at 26
g=g+gsint(f,x(i),x(i+1),A,t);
Error in ==> result at 4
g=mgsint(f,0,1,1000000,5)
我想的是mgsint里的错误应该就是公式表达出错才造成的 所以可以暂时不管mgsint函数
原始的表达式是这样的
p就是那个循环参数iRéponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur 电子表格 dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!