matlab - Electric field integral plot -


i trying plot electric field integral in matlab, e(yaxis) vs z (xaxis). function follows :

enter image description here

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

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -