1. Engineering
  2. Computer Science
  3. please help me to fix the codes i got lost...

Question: please help me to fix the codes i got lost...

Question details

Please Help me to fix the codes. I got lost on part c.

Array Operations 2.8 (a) The volume ofa cylinder is π r2h. Define ras 3 and h as the matrix 为 h1, 5, 12] Find the volume of the cylinders (see Figure P2.8(a)). The area of a triangle is 1/2 the length of the base of the triangle, times the height of the triangle. Define the base as the matrix Figure P2.8(a) (b) b [2, 4, 6 and the height h as 12, and find the area of the triangles (see Figure P2.8(b)). The volume of any right prism is the area of the base of the prism, times the vertical dimension of the prism. The base of the prism can be any shape-for example, a circle, a rectangle, or a triangle (c) Figure P2.8(b) Find the volume of the prisms created from the triangles of part (b). As- 6 (see Figure P2.8(c)). base is a circle base is a rectangle base is a triangle% % problem 2.8 clear, clc format bank %Instructions %a) find the volume of the cylinder %b) define the base as the matrix %c) find the volume of the prism created from the triangles of part b variables r=3 ; hl-I1,5,121: h2-12: b= [2,4,6]; y=6; radius of the cylinder sheight of the cylinder theight of the triangles base sbase of triangle vertical dimension of prismsscalculations part a) disp (part a)volume of cylinders) disp (v) scalculation part b disp (part b)area of the trianglest) disp (a) calculation part c u [a* (pi)*(r2) y, bth2 * y, ary]; %base of prisms a vertical components disp ( disp (u) ...-area .of rectangles d Window MATLAB? See resources for Getting Started 28.27 141.37 339.29 t b)area of the triangiles 24.00 12.00 36.00 area。f circles 2035.75 rectangles 144.00 triangles 72.00 194.0 288.00 32.00 4071.506107-26

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution