matlab - Electric field integral plot -
i trying plot electric field integral in matlab, e(yaxis) vs z (xaxis). function follows :
i graph first integral e(z) in picture.
as have analytic formula integral, need set values z , compute corresponding e(z):
%% set values z z = x1:0.1:x2; % x1 , x2 bounds on x axis % discrete step set 0.1, lower/increase depending on level of detail want %% compute electric field values ez = (k*l/z) .* ( b/sqrt(z.*z + b*b) + a/sqrt(z.*z + a*a) ); %% plot values plot(z, ez);
Comments
Post a Comment