97.9k views
2 votes
A solenoid with a length of 20 cm and a radius of 5 cm consists of 400 turns and carries a current of 12 A. If z = 0 represents the midpoint of the solenoid, generate a plot for |H(z)| along the axis of the solenoid for a range −20 cm ≤ z ≤ 20 cm. Please use MATLAB to generate the solution numerically and indicate how you did it. Include a copy of the computer code that you create to solve the problem

1 Answer

1 vote

Answer:

Copy MATLAB code to plot the magnitude of magnetic field strength with respect to z on the axis of solenoid:

z=-20:0.01:20;

H=120.*(((20-(2.*z))./sqrt((20-(2.*z)).^2+100))+((20+(2.*z))./sqrt((20+(2.*z)).^2+100)));

plot(z,H)

title('plot of |H| vs z along the axis of solenoid')

ylabel('Magnitude of magnetic field 'H")

xlabel('position on axis of solenoid 'z")

Step-by-step explanation:

full explanation is attached as picture and the resultant plot also.

A solenoid with a length of 20 cm and a radius of 5 cm consists of 400 turns and carries-example-1
A solenoid with a length of 20 cm and a radius of 5 cm consists of 400 turns and carries-example-2
A solenoid with a length of 20 cm and a radius of 5 cm consists of 400 turns and carries-example-3
A solenoid with a length of 20 cm and a radius of 5 cm consists of 400 turns and carries-example-4
User Shuberman
by
5.2k points