Matlab help This is what I have so far for this problem I do

Matlab help. This is what I have so far for this problem. I do not know where to go from here and all results must be displayed using fprintf.

like a 1. A container is shaped as a frustum of a cone with R2-1.2 Ris designed to have a volume of 1000 cm3. Determine R1, R2 and the Surface area, S, of the container with the heights of 8, 10, 12, 14 and 16 cm. Display results in a table. Using an if statement deter if one of the height will allow you to put a decal on the container if the surface area of decal is 550 om?? hint: if has to be in a loop, to look at individual elements of the vector) ID 2m (KM R t (a nth Ri R1 11 2

Solution

disp(\'problem 1\');
pi=3.14;
h=[8 10 12 14 16];
for i=1:1:5
R1(i)=sqrt((1000*3)/(pi*3.64*h(i)));
R2(i)=1.2*R1(i);
v(i)=((1/3)*pi*h(i)*(R1(i)^2+R2(i)^2+(R1(i)*R2(i))));
s(i)=pi*(R1(i)+R2(i))*sqrt((R1(i)-R2(i))^2+h(i)^2)+ pi*(R1(i)^2+R2(i)^2);
  
end
disp(\'the output:\ \');
for i=1:1:5
fprintf(\'\ for index %d:\ \',i);
fprintf(\'\ val for R1:%d, \ val for R2:%d, \ the height:%d, \ vol:%d, \ surface area:%d \ \',R1(i),R2(i),h(i),v(i),s(i));
end

% given surface area 550 , to find the h, take variable h1 instead to h to
% distinguish from above

s=550;
for i=1:1:5
  
h1(i)= sqrt((s-(pi*(R1(i)^2+R2(i)^2))/(pi*(R1(i)+R2(i))))^2)-(R2(i)-R1(i))^2;
fprintf(\'\ the val for h:%d \ \',h1(i));
end

Matlab help. This is what I have so far for this problem. I do not know where to go from here and all results must be displayed using fprintf. like a 1. A conta

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site