% Matlab file : P4_fn_calc.m
function [V,A] = P4_fn_calc(a,b)
% Matlab function P4_fn_calc to calculate the volume and surface
area
% of a torus gicen its inner radius, a and outer radius,b
V = (((pi.^2)./4).*((a+b).*((b-a).^2)));
A = (pi.^2).*((b.^2) - (a.^2));
end
%end of Matlab function
% Matlab file P4.m
% Matlab main script to calculate the values for Volume and Surface
area
% for the values of a < b, a>b and a = b using values of a
between 1 and 10.
% a < b
a = 2;
b = 4;
[V,A] = torus(a,b);
fprintf('a = %f b = %f V = %f A = %f\n',a,b,V,A);
% a > b
a = 4;
b = 2;
[V,A] = torus(a,b);
fprintf('a = %f b = %f V = %f A = %f\n',a,b,V,A);
% a = b
a = 2;
b = 2;
[V,A] = torus(a,b);
fprintf('a = %f b = %f V = %f A = %f\n',a,b,V,A);
% generate a plot of Volume and Surface Area vs inner radius
% generate 100 points between 0.25 and 4 for the inner radius
a = linspace(0.25,4,100);
b = a+2; % outer radius is 2 in greater than inner radius
% calculate volume and surface arae
[V,A] = torus(a,b);
% plot the graph
plot(a,V,'r-');
hold on;
plot(a,A,'b-');
hold off;
title('Volume and Surface Area of a Torus');
xlabel('Inner radius');
ylabel('Volume and surface Area');
legend('Volume','Surface Area');
%end of script
Output:
Matlab A forus is shaped like a doughnut. If its inner radius isa and its outer...
A small conducting spherical shell with inner radius a and outer radius b is concentric with a larger conducting spherical shell with inner radius c and outer radius d. The inner shell has total charge +2q, and the outer shell has charge +4q. (a) Calculate the magnitude of the electric field in terms of q and the distance r from the common center of the two shells for r < a, b < r < c, and r > d. Note...
For the circuit shown below, find HEVA 1 c = OH() - acolo OH() = City OH OH) = HCL 1) ENGR2304 Final 1.16 points, The US EPA has tested the average fuel efficiency of 24 late model cars. The results obtained are shown below Sample Mileare. Impal Sample Mileagem 25.5 25.4 23.9 24.4 19 22.0 21.7 23.5 27.1 23.0 23.9 23.6 19.2 22.7 26.0 21.3 21 20.7 22 22.8 Enter the data into an Excel spreadsheet and then analyze...
A conducting spherical shell with inner radius a and outer radius b has a positive point charge Q located at its center. The total charge on the shell is -3Q, and it is insulated from its surroundings (Fig. P22.44) (a) Derive expressions for the electric-field magnitude E in terms of the distance from the center for the regions r < a, a < r < b, and r > b. What is the surface charge density (b) on the inner...
A non-conducting thick spherical shell with inner radius a = 5 cm and outer radius b = 10 cm has a uniformly distributed volume charge density of p = 1.3 nC/m2. a) What is the total charge on the shell? Hint: think of the shell as a solid sphere with a volume in the center that's missing. b) Calculate the maximum electric field strength. c) Calculate the electric field at r = 2 cm. d) Calculate a symbolic equation for...
Part A A neutral hollow spherical conducting shell of inner radius 1.00 cm and outer radius 3.00 cm has a +2.00-μC point charge placed at its center. (a) Find the surface charge density on the inner surface of the shell. Part B (b) Find the surface charge density on the outer surface of the shell.
A hollow sphere of inner radius b and outer radius a is subject to normal pressures on its inner and outer surfaces. The sphere is made up of an isotropic material, the displacements and stress fields are spherically symmetric. The only non-vanishing displacement component is the radial displacement ur, and is a function of r only. Based on this we can assume the following strains. lu lur dr The only non-vanishing stress components are the radial stress σ, and the...
A hollow sphere of inner radius b and outer radius a is subject to normal pressures on its inner and outer surfaces. The sphere is made up of an isotropic material, the displacements and stress fields are spherically symmetric. The only non-vanishing displacement component is the radial displacement ur, and is a function of r only. Based on this we can assume the following strains. lu lur dr The only non-vanishing stress components are the radial stress σ, and the...
A conducting spherical shell of inner radius R1 and outer radius R2 has a point charge +q fixed at its center. The spherical shell has a net charge of +aq.Part (a) Enter an expression for the surface charge density on the inner surface of the spherical shell using the variables provided. Part (b) Enter an expression for the surface charge density on the outer surface of the spherical shell using the variables provided. Part (c) The electric field at the surface points...
Vazip Paragraf Saler a db 3. A conducting spherical shell with inner radius a and outer radius b has a positive point charge Q located at its center. The total charge on the shell is - 3Q, and it is insulated from its surroundings. (a) Derive expressions for the electric-field magnitude E in terms of the distance r from the center for r <a, a <r<b, and r > b.(15 pts) (b) Sketch the electric field lines.(5 pts) (c) Plot...
write it in matlab language Question No 4 6 Marks The surface area and volume of the shown ring-shaped mechanical part are calculated respectively as follows: A =rd (2k +d) V = *d? (2R +d) Write a user defined function that computes surface area (A) and volume (V) of this ring from the arguments d and R. Suppose that is constrained to be 15 in, greater than d. Write a script file that uses your function to plot A and...