![]() ![]() The result can be converted into a symbolic form to view the model more simply. Of course, polyfitn works in higher dimensions, as it was this problem it was really designed to solve. The exact first 4 coefficients for a cosine series would have been: The coefficients won't be exact of course, as I used only a finite number of terms for what is essentially a truncated Taylor series, and I had only a finite amount of points to build the model from. P = polyfitn(x,y,'constant x^2 x^4 x^6') It also allows the user to specify a general model, for example, a quadratic model, with constant and quadratic terms, but no linear term.įor example, to fit a polynomial model to points selected from a cosine curve, we will only need the even ordered terms. Polyfitn is an extension of polyfit, allowing the user to create models with more than one independent variable. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |