very simple convergence problem during solving a equation! plz help!

4 次查看(过去 30 天)
im trying to solve a equation (which is in the form det(A)=0) using iterative loop for two unknown variables. The program acts very well but my problem is that i want to get the diagram which can converge to its real value infinitively but my program has a very low resolution and after steps it reaches its value and i have a direct line at the end of diagram. I have tried to improve the iterative steps but i didnt gain what i want.
can anybody help me improving the resolution?
[Merged information from duplicate posting]
im trying to solve a equation using the iterative loop! it works good but at the end it stops converging after some steps! how can i push it forward to continue with the converging? how can i increase the resolution? i have decrease the steps but didnt get a better result! please help me!
  1 个评论
Kye Taylor
Kye Taylor 2012-6-13
Love convergence problems... especially contractions (which it seems like you're dealing with)... can you include some code that generates the figure you're describing? Can you also give the specific equation?

请先登录,再进行评论。

回答(1 个)

Hossein sadri
Hossein sadri 2012-6-13
its actually too complicated if i want to post the whole code, but the main structure is the following:
frequenceindex=1;
for frequence=10e3:e3:1000e3
S=[a b];
start=det(S);
kindex=1;
for k=10:0.1:2000
S=[a b];
end=det(S);
if start*end < 0 & end-start > 0
kmatrix(frequenceindex,kindex)=k;
kindex=kindex+1;
end
frequenceindex=frequenceindex+1;
end
  1 个评论
Walter Roberson
Walter Roberson 2012-6-13
I take it you are updating "a" and/or "b" in the loop? And you are looking for det(S) to converge to 0? We might need to see how you update "a" and "b".
I notice that you are only recording places in which start is negative and end is positive, and not places in which start is positive and end is negative. Is there a reason for that?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by