Professional Documents
Culture Documents
Q3quadratic Formula PDF
Q3quadratic Formula PDF
real_part=-b/(2*a);
imag_part=sqrt( abs ( discriminant ) ) / ( 2 * a );
fprintf('The real part=%f \nThe imaginary part=%f \n',real_part, imag_part)
disp('Equation has complex roots.')
end
enter co-efficient a of the quadratic forumla:8
enter co-efficient b of the quadratic forumla:9
enter co-efficient c of the quadratic forumla:7
DISC value is =-143.000000
The real part=-0.562500
The imaginary part=0.747391
9/25/12 7:31 PM MATLAB Command Window 2 of 2