Electric Field due to surface charge density

This file was written to calculate the Electric field at a point or several points in any z plane and export table by the field values
20 Downloads
Updated 19 Feb 2023

View License

This code was written to calculate the electric field caused by a finite sheet on a point or several points in space and plot the 3D field and export an excel file contains the coordinates of each point and the field components at each point (Ex,Ey,Ez).
you need to set the surface boundaries first by determining the xlimits (lower and upper), ylimits (lower and upper) and the elevation of the sheet in the z plane.
for example:
x_lower_limits = -1; x_upper_limits = 1;
y_lower_limits = -3; y_upper_limits = 3;
z_height = 3
The above part of code will create a finite sheet extend from -1 to 1 in the x-axis and from -3 to 3 in the y axis and the sheet will be at z=3.
x_dest_lower = -5; x_dest_higher = 5;
y_dest_lower = -10; y_dest_higher = 10;
z_dest_lower = 5;
The above part of code will calculate the field at each point in the z plane =5 for each point extend from -5 to 5 in x axis and from -10 to 10 in the y axis.
Finally, Charge density can be figure or expression in terms of x y & z.
charge_density = 5* 10^-9 * dS;
or charge_density = (x.*y.*(x.^2 + y.^2 +25).^1.5)*10^-9*dS;
Where,
x=array(:,1); y=array(:,2);z=array(:,3) ;

Cite As

Mohammad Naim (2024). Electric Field due to surface charge density (https://www.mathworks.com/matlabcentral/fileexchange/124955-electric-field-due-to-surface-charge-density), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2021a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0