Publisher review:Polyfitn - N-d polynomial regression model This is yet another in the long list of polynomial regression modeling tools. What does polyfitn do that the others don't? You can supply any list of terms, with any set of exponents: positive, negative, or real. It works in n-d as well as 1-d. And it has a simple, clean interface to specify your terms.Simple statistics are generated, R^2, rmse, standard deviations and variances of the coefficients. I've supplied an evaluation tool to use the model.x = -2:.1:2;y = cos(x);p = polyfitn(x,y,'constant x^2 x^4 x^6');% Evaluationpolyvaln(p,[0 .5 1])ans =0.999960.87760.54031% Conversion to a sympolypolyn2sympoly(p)A scalar sympoly object0.99996 - 0.49968*x^2 0.041242*x^4 - 0.0012079*x^6This last operation employs my own sympoly toolbox also found on the file exchange, although it is not necessary for use of polyfitn and polyvaln.As another example, fit a complete 2-d model with all terms up to a second order model:x = randn(100,2);y = randn(100,1);p = polyfitn(x,y,2);% Display it as a sympoly, just makes it easy to read:polyn2sympoly(p)A scalar sympoly object0.19175*X1^2 0.052769*X1*X2 0.093648*X1 0.039723*X2^2 - 0.04943*X2 - 0.19188% Only want a linear model in 2-d, but with no constant term? Its easy to specify:uv = rand(100,2);w = sin(sum(uv,2));p = polyfitn(uv,w,'u, v');polyn2sympoly(p)A scalar sympoly object0.74604*u 0.68452*v Requirements: ยท MATLAB Release: R14SP1
Polyfitn is a Matlab script for Mathematics scripts design by John D`Errico.
It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.
Polyfitn - N-d polynomial regression model
Operating system:Windows / Linux / Mac OS / BSD / Solaris