[分享]中误差计算小程序
;;由误差求中误差<br>(defun c:jS(/ a m b aa)<br>
(setq a 0 m T b 0 AA 0)<br>
(while m<br>
(setq m(getreal "\输入:<空回车结束>"))<br>
(if m <br>
(progn<br>
(setq a(+ a (* m m)))<br>
(SETQ AA(+ AA M))<br>
(setq b(1+ b))<br>
)<br>
)<br>
)<br>
(setq pj(/ aa b))<br>
(setq x(sqrt (/ a (- b 1))))<br>
(alert (strcat "均差为:" (rtos pj 2 2) "\n中误差为:" (rtos x 2 2)))<br>
) <P>(setq m(getreal "\输入:<空回车结束>"))改为:</P>
<P>(setq m(getdist "\输入:<空回车结束>"))</P>
<P>呢?</P>
页:
[1]