Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

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

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

image text in transcribedimage text in transcribedimage text in transcribed

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 triangle's base sbase of triangle vertical dimension of prisms scalculations 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)*(r"2) 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 areaf circles 2035.75 rectangles 144.00 triangles 72.00 194.0 288.00 32.00 4071.506107-26

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Server T-SQL Recipes

Authors: David Dye, Jason Brimhall

4th Edition

1484200616, 9781484200612

More Books

Students explore these related Databases questions