Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Note: The units should be in SI. Make the use of both user-defined and built- in MATLAB functions as well as the conditional statements in

image text in transcribed
Note: The units should be in SI. Make the use of both user-defined and built- in MATLAB functions as well as the conditional statements in your program. P1 (20%). Figure 1 shows the geometry formulas for common 2D shapes. Write a MATLAB program that ask the user about the shape, as well as corresponding parameters and calculate the area. SQUARE * = side Area: A = Perimeter: P = 48 CIRCLE r=radius, d = diameter Diameter: d=2r Area: A Circumference C = 2 = RECTANGLE 1 = length, w = width Area: A=Ine Perimeter: P = 21+ 2 SECTOR OF CIRCLE r = radius, 8 = angle in radians Are A = 10r? Are Length: * = r TRIANGLE b = base, h = height Ara: A = 4th Perimeter: P =a + b + c ELLIPSE mimjor axis b = cmiminor axis Aren: A = *ab Circumference C** (3(a + b) - Via +3h)(b + 3a)) EQUILATERAL TRIANGLE side Height: h= Are A=4 ANNULUS r=inner radius, R outer radius Average Radius: p= $(r + R) Widthew R- Area: A = *(R? - ) or A = 2 PARALLELOGRAM b = buse, h = height, a = wide Area: A = We Perimeter: P =2a + 20 TRAPEZOID 0,b=besh = height: cd-sites Area A a +b) Perimeter P=a+b+e+ REGULAR POLYGON * = side length mamber of sides Circumradius: R = sce() Area: A = inco ) or A = Rsin()

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

Step: 3

blur-text-image

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

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions

Question

6. What questions would you suggest should be included?

Answered: 1 week ago