I evaluated an array of x,y couples and obtained coefficients using polyfit function then I created a symbolic polynomial expression from these coefficients to view how it looks like in a polynomial form using poly2sym but the output of this function displays these coefficients in rational form , but I want these coefficients to stay as they are in float form. How can I do it ?
That happens because SymPy replaces floating point with rational numbers.
Look through the coeffs
function in the symbolic package. You may need to do something like
[c, t] = coeffs (p);
c = eval(c);
That will at least get you the information you want on a term-by-term basis.