Instructions Use summations in MATLAB and plot the figures C
Instructions: Use summations in MATLAB and plot the figures
Consider a ring of radius r and line charge density 1 times 10^-6 C/m in the xy plane (z = 0) centered at the origin as shown in the figure below. For r = 1 mm, calculate the three vector components of the electric field (Ex, Ey and Ez) along z-axis from z = -2 mm to z = 2mm and also along y-axis from y = -2 mm to y = 2 mm. Repeat the same calculations for r = 0.5 mm and r = 0.25 mm. Plot Ex, Ey and Ez vs z-axis for the three different radii, and Ex, Ey, and Ez vs y-axis for the three different radii. Place titles or legends to identify the curve plotted in a given figure.Solution
Paste your text here and click on \"Next\" to observe this text rewrite man do it\'s issue.
don\'t have any text to check? Have Syntax
F = symsum(f,k,a,b)example
F = symsum(f,k)example
Description
example
F = symsum(f,k,a,b) returns the total of the series with terms that expression f specifies, that depend upon symbolic variable k. the worth of k ranges from a to b. If you are doing not specify the variable, symsum uses the variable that symvar determines. If f could be a constant, then the default variable is x.
example
F = symsum(f,k) returns the indefinite total F of the series with terms that expression f specifies, that depend uponvariable k. The f argument defines the series specified the indefinite total F is given by F(k+1) - F(k) = f(k). If you are doing not specify the variable, symsum uses the variable that symvar determines. If f could be a constant, then the default variable is x.
Examples
Find total of Series Specifying Bounds
Find the subsequent sums of series.
S1=
10
k=0
k
2
S2=
k=1
1
k
2
S3=
k=1
x
k
k!
syms k x
S1 = symsum(k^2, k, 0, 10)
S2 = symsum(1/k^2, k, 1, Inf)
S3 = symsum(x^k/factorial(k), k, 0, Inf)
S1 =
385
S2 =
pi^2/6
S3 =
exp(x)
Alternatively, specify bounds as a row or column vector.
S1 = symsum(k^2, k, [0 10])
S2 = symsum(1/k^2, k, [1; Inf])
S3 = symsum(x^k/factorial(k), k, [0 Inf])
S1 =
385
S2 =
pi^2/6
S3 =
exp(x)
Find Indefinite total of Series
Find the indefinite total of the series nominative by the symbolic expressions k and k^2.
syms k
symsum(k, k)
symsum(1/k^2, k)
ans =
k^2/2 - k/2
ans =
-psi(1, k)
Difference between symsum and total
The total operate finds the total of parts of symbolic vectors and matrices, just like the MATLAB® total operate.
Consider the definite total
S=
10
k=1
1
k
2
.
Contrast symsum and total by totalming this definite sum victimisation each functions.
syms k
S_sum = sum(subs(1/k^2, k, 1:10))
S_symsum = symsum(1/k^2, k, 1, 10)
S_sum =
1968329/1270080
S_symsum =
1968329/1270080
For details on total, see the knowledge on the MATLAB total page.no text to check? Click \"Select Samples\".

