我想制作一个绘图力与位置(对于库仑定律)并估计常数 e0。我有费用的值,q1=1,q2=1。我有例如
position=[0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1];
force=[0.08,0.015,0.013,0.0062,0.0016,0.00519,-0.00159,0.00118,...
0.0061,0.00155,0.00143];
库仑为 F= (1/4*pi*e0) * q1*q2/r^2。所以,它的形式是:
y=ax^-m ,其中 a= (q1*q2/4*pi*e0)
我在做:
p=polyfit(-log10(position),log10(force),1); % I am not sure about '1' and minus
m=p(1);
a=10^(p(2)); % I am not sure about a
xp=0.1:0.1:1.1;
yp=a*xp.^(-m);
plot(position,force,'o',xp,yp)
e0=q1*q2/4*pi*a
我没有为 e0 找到正确的值。我做错了什么吗?m 值应该是 -2 但我正在服用:
米=
1.6287 - 0.2008i