{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lab 2 - Your function should return zero if the discs do...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
ECOR 2606 Lab 2 Two discs overlap each other as shown is the diagram below: If R 1, R 2, and D are known X can be calculated using: D R R D X 2 / ) 2 1 ( 2 2 2 The area of a segment of a circle can be calculated using the following formula: R x R x R x R A 1 2 2 2 2 sin 2 The area of the overlap between the two discs is equal to the sum of the areas of two circle segments. Part 1 Write a function m-file (overlap.m) that, given R 1, R 2, and D , computes and returns the overlap area.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Your function should return zero if the discs do not overlap and should generate an error (use function error) if D is less than the minimum of R 1 and R 2 (function min is useful). Part 2 Assume that R 1 = 100mm and R 2 = 50mm. Write a script-m (script.m) that i) plots the overlap area for D from 50mm to 160mm and ii) determines and outputs the value of D that gives an overlap area of 2000 mm 2 . Submit overlap.m and script.m....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online