I have come across the Scilab program below, but I am having difficulty understanding how this program calculates z3. I inserted the line disp(z3(i)) to try to work this out, but there is one thing I do not understand. If w goes from -25000 to 25000 in intervals of 500 and L = 0.5, then why isn't the value of z3 for i = 1 equal to -0.00008? Why is it -0.0000023? If someone could explain this, then I believe I would understand the discrepancies in the values for z3 for all he other values of i
The program is:
Z = 75; R = 225; C = 0.6D-6; L = 0.5;
function [z] = f(w)
z1 = 1/(R^2); z2 = w*C; z3 = 1/(w*L);
a = length(w);
for i=1:a
z(i) = (1/(z1+(z2(i)-z3(i))^2)^0.5)-Z;
disp(z3(i))
end

endfunction;
w=[(-25)*1D+3:500:25D+3]; z = f(w); plot(w,z); xgrid(5); xlabel("w"); ylabel("z");





Any help would be truly appreciated