Respuesta :
Answer:
Matlab capacity to ascertain the surface territory of an inflatable
work surfaceArea = surfaceBalloon(Volume,M)
Step-by-step explanation:
% Matlab capacity to ascertain the surface territory of an inflatable
work surfaceArea = surfaceBalloon(Volume,M)
% compute R
cubeOfR = 3 * Volume * ones(1,length(M));
cubeOfR = cubeOfR ./(pi * (M+2));
R = power(cubeOfR,1/3);
% compute surface zone
power1 = power(M,2);
power1 = 1+ power1;
power1 = power(power1,1/2);
power1 = 2 + power1;
surfaceArea = pi .* power(R,2) .* power1;
end
% End of capacity
% Matlab content to utilize work surfaceBalloon to locate the surface zone of
% expand
clc;
V = 14000;
M = (0:10);
surfaceArea = surfaceBalloon(V,M);
plot(M,surfaceArea);
xlabel('M');
ylabel('Surface Area m^2');
ylim([2900 5000]);
title('M v/s Surface Area of an inflatable');
saveas(gcf,'surfaceAreaPlot','png'); % spare the chart
% end of primary content
Answer:
radius = ((3*Volume) ./ ((2+M).*pi)).^(1/3);
surfaceArea = pi .* radius.^2 .* (2+sqrt(1+M.^2));
Step-by-step explanation:
The OP didn't include this part, but the original problem has the equations written for you in the header. Here they are again:
A = [tex]\pi R^{2}[/tex](2 + [tex]\sqrt{1+M^{2} }[/tex])
V = [tex]\pi R^{3} (2+M)/3[/tex] where M = H/R
The problem is asking for the surface area of the balloon, but the only values that the user inputs are volume and M. We need to solve for the radius before we can complete the code. So, we can solve for R in one equation and plug it into the second equation.
Let's adapt the given equation V = [tex]\pi R^{3} (2+M)/3[/tex] and solve for R to get the equation for the radius.
V = [tex]\pi R^{3} (2+M)/3[/tex]
3*V = [tex]\pi R^{3} (2+M)[/tex]
[tex]\frac{3*V}{\pi (2+M)} = R^{3}[/tex]
R = [tex](\frac{3*V}{\pi (2+M)})^{1/3}[/tex]
Now, let's convert the equation for R to MATLAB code. Because we are using arrays, each operational symbol must be preceded by a "." unless it is a + or -.
R = [tex](\frac{3*V}{\pi (2+M)})^{1/3}[/tex]
radius = ((3*Volume) ./ ((2+M).*pi)).^(1/3);
Okay, so the hard part is done. The second line of code is easy: all you have to do is transform the given equation for surface area into MATLAB code while using the variable we named "radius" in the last step. Again, because we are performing operations with arrays, use "." in front of all operational symbols (except + and -).
A = [tex]\pi R^{2}[/tex](2 + [tex]\sqrt{1+M^{2} }[/tex])
surfaceArea = pi .* radius.^2 .* (2+sqrt(1+M.^2));
Putting it all together, your answer should be
radius = ((3*Volume) ./ ((2+M).*pi)).^(1/3);
surfaceArea = pi .* radius.^2 .* (2+sqrt(1+M.^2));