Help me with this error ?
    4 ビュー (過去 30 日間)
  
       古いコメントを表示
    
I downloaded this file from file exchange (fixedpoint iteration method find approximate root of nonlinear equation). But I don't understand why it have this error(the success variable). Help me to fix it ? . thanks very much.




0 件のコメント
回答 (1 件)
  Star Strider
      
      
 2014 年 6 月 29 日
        There seems to be a logic problem in the fixedpoint function.
I don’t usually suggest altering others’ code, but it might be worthwhile to experiment by inserting between these lines:
P0 = p0;
% STEP 1
the line:
success = false;
so that it reads:
P0 = p0;
success = false;
% STEP 1
I cannot guarantee that it will find the real root of your function, since I haven’t run the fixedpoint function or your code with it.
When I used the core MATLAB function roots on your polynomial:
r = roots([1 2 0 -5])
it had one real negative root and two complex roots:
r =
      -1.6209e+000 +  1.1826e+000i
      -1.6209e+000 -  1.1826e+000i
       1.2419e+000 +             i
0 件のコメント
参考
カテゴリ
				Help Center および File Exchange で Fixed-Point Designer についてさらに検索
			
	製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

