ollenystrom
Electrical
- Oct 6, 2006
- 4
Hi,
I would like to have a two varible polyfit in matlab. In mathcad I have used the function regress(XY,Z,2) for two dimensional polynomial regressin, where XY is a Nx2 matrix and Z is a Nx1. This gives me the 6 coeff I need to get
a0xy+a1y^2+a2y+a3C+a4x+a5x^2. In matlab, however, I can't find a similar function. All I find is regress or polyfit with one variable input. Does anyone have any idea how to do this?
Thanks
Olle
I would like to have a two varible polyfit in matlab. In mathcad I have used the function regress(XY,Z,2) for two dimensional polynomial regressin, where XY is a Nx2 matrix and Z is a Nx1. This gives me the 6 coeff I need to get
a0xy+a1y^2+a2y+a3C+a4x+a5x^2. In matlab, however, I can't find a similar function. All I find is regress or polyfit with one variable input. Does anyone have any idea how to do this?
Thanks
Olle