Write a MATLAB program to plot the following:b. The magnitude of the electric field along the central axis of a uniformly charged circular disk of radium 1 m and charge density 1 C/m2. Assume that the disk is centred around the Z –axis.

6 ビュー (過去 30 日間)
Is my code is correct?
code:
%19BEE0151
sigma = 1; % in C/m^2
R = 1; % R in metres
k = 9e9;
n = input('Enter the value of z:');
z = -n:1:n;
E = ((sigma*k*2*pi)*(1-z./(R.^2+z.^2).^0.5));
plot(z,E)
title("Electric Field Along z-axis");
xlabel('z-axis (in metres)');
ylabel('E-field (in N/C)');

回答 (0 件)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by