This article presents calculations and visualization of an electric field of a point charge (equipotential lines) and systems of oppositely charged threads, of magnetic field lines of a thin long and straight current-carrying conductor, magnetic field lines inside a cylindrical conductor with evenly distributed current made using the MATLAB language. Calculations of an electric field and potential of a point charge as a function of a distance are provided as well as a potential of a system of oppositely charged threads, magnetic induction of a thin, long current-carrying conductor as a function of a distance and magnetic induction inside the cylindrical conductor are performed. The graphs of these dependencies are drawn.