编辑代码

printf("Hello world! - octave.jsrun.ne \n");
clear;
mu0 = 4*pi*1e-007;
l   = 1;
r   = sqrt(95e-006 / pi);
h   = 4*r;

temp1 = ( l + sqrt(l^2 + h^2) ) / h;
temp2 = sqrt(l^2 + h^2) / l;

Lo = mu0 * l / (2*pi) * (log(2*l/r) - 1)
M  = mu0 * l / (2*pi) * (log(temp1) - temp2 + h/l)

LCM = (Lo + 2*M) / 3;

printf('LCM = %6.2f nH \n', LCM * 1e+009);