F********E 发帖数: 1025 | 1 Hi all:
I want to do a least square fitting, but I need to apply a constraint--which
is that the fitting line has to exactly cut through one specific data point
in my data set. For example, I want the parabolic line pass the origin, or
I need the following equation to fit in my data:
*************
a*x^2+b*x
**************
instead of the regular one:
*************
a*x^2+b*x+c
**************
Does anybody know any function in PYLAB OR PYTHON or other suite which can
do this? Thanks a lot! | g****t 发帖数: 31659 | 2 你读读matlab的polyfit函数的帮助。
这个不是问题。和原来的最小二乘法没区别。
如果是更复杂的约束就麻烦些。
Hi all:
I want to do a least square fitting, but I need to apply a constraint--which
is that the fitting line has to exactly cut through one specific data point
in my data set. For example, I want the parabolic line pass the origin, or
I need the following equation to fit in my data:
*************
a*x^2+b*x
**************
instead of the regular one:
*************
a*x^2+b*x+c
**************
Does anybody know any function in PYLAB OR PYT
【在 F********E 的大作中提到】 : Hi all: : I want to do a least square fitting, but I need to apply a constraint--which : is that the fitting line has to exactly cut through one specific data point : in my data set. For example, I want the parabolic line pass the origin, or : I need the following equation to fit in my data: : ************* : a*x^2+b*x : ************** : instead of the regular one: : *************
| M**r 发帖数: 31 | 3 用Excel或其它的spreadsheet可能就可以做,请给出一组数据,偶来做做看。。。??
which
point
or
【在 F********E 的大作中提到】 : Hi all: : I want to do a least square fitting, but I need to apply a constraint--which : is that the fitting line has to exactly cut through one specific data point : in my data set. For example, I want the parabolic line pass the origin, or : I need the following equation to fit in my data: : ************* : a*x^2+b*x : ************** : instead of the regular one: : *************
|
|