开发者

Computing EField around a point in a ring

I am trying to write code to compute the Efield on a point P in both the x and y direction, from a charged ring.

double y_eField = (_ke_value * _dq * (Sin_angle) / (Math.Pow(r, r)));
开发者_开发问答

Problem I am having is the code seems to follow the equation as given but the result it outputs is not correct at all. Anyone able to help please? I appreciate the help.


This might be more applicable for the Physics Stack Exchange. That said, are you sure you want to raise r to the power of r (as implied by Math.pow(r, r))? I suspect maybe you want r squared? If that's the case you could use Math.pow(r, 2) or simply r*r.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜