Info
此问题已关闭。 请重新打开它进行编辑或回答。
Which is the best method to find zero ? and choose the max value and plot a graph comproving the zeros.
1 次查看(过去 30 天)
显示 更早的评论
For a given parameters
ss=0.6;
T=0.1;
g=1;
b=0.5;
f1 = @(r) 1 - (b./r).^2 - (g^-2)*((2/15)*(ss)^9 *(1./(r - 1).^9 - 1./(r + 1).^9 - 9./(8*r).*(1./(r - 1).^8 - 1./(r + 1).^8)) -(ss)^3 *(1./(r-1).^3 - 1./(r+1).^3 - 3./(2*r).*(1./(r-1).^2 - 1./(r+1).^2)));
I want to find the r value when
f1 == 0
So, which is the best method ? findzero, fminbnd, newtonraphson ? fsolve ?
i try
a1= fzerof1,[1.00000001)
assume(r, 'real');
t=vpasolve(1 - (b/r)^2 - (g^-2)*(2/15*[(s/R)]^9 *(1/(r - 1)^9 - 1/(r + 1)^9 - 9/(8* r) *(1/(r - 1)^8 - 1/(r + 1)^8)) - [(s/R)]^3 *(1/(r -1)^3 - 1/(r + 1)^3 - 3/(2* r)* (1/(r - 1)^2 - 1/(r + 1)^2))) == 0,r,[-Inf,Inf]);
t
options=optimset('MaxIter',1e3,'TolFun',1e-10);
t1=fminbnd(func,0.1,15,options);
t1
but i dont know if it is correct. I want to plot a graph r x f1 to see the zeros.
Any help how i can find zeros exactly ?
1 个评论
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!