function [Rs] = Racinew(s)imax=25;emax=0.00001;x=s; i=1;if s<0 Rs=nan; disp('le paramètre entrée s doit être positif')endwhile i~=imax Rs=x-(x^2-s)/(2*x); E=abs((Rs-x)/x); x=Rs; i=i+1; if E<emax break endendif E>emax Rs=nan;disp('Le nombre de 25 itération a ete atteint sans avoir trouvé la solution')end
It is saying that variable 'E' is not fully defined on some execution paths (line 19 (E>emax))
How can I resolve this problem? Thank you
Best Answer