The equation of a circle in a plane with radius R and a center at point (x0, y0) is given by:
(x-x0)2+(y-y0)2=R2 The equation can also be written in the form:
-2x0x-2y0y+c=- (x2+y2) where c =x20+ y20-R2 Given the coordinates of three points (x1, y1) (x2, y2), and (x3, y3) it is possible to determine the radius and the coordinates of the center of the circ le that passes through the three points. This is done by substituting the coordinate of each of the points in the equation and solving the system of three linear equations for x0, y0, and c.
Write a program in a script file that calculates the coordinates of the center and the radius of a circle that passes through three given points. When executed the program asks the user to enter the coordinates of the three points. The program then calculates the center and radius and displays the results in the following format: “The coordinates of the center are (xx.x, xx.x) and the radius is xx.x.”, where xx.x stands for the calculated quantities rounded to the nearest tenth. Execute the program entering the following three points: (11.5, 5). (3.2, 8.6). and (-4.5, -6.8).
Want to see the full answer?
Check out a sample textbook solutionChapter 4 Solutions
MATLAB: An Introduction with Applications
- solve the question based on hw 1, 1.41arrow_forwardT1.4: Let ẞ(G) be the minimum size of a vertex cover, a(G) be the maximum size of an independent set and m(G) = |E(G)|. (i) Prove that if G is triangle free (no induced K3) then m(G) ≤ a(G)B(G). Hints - The neighborhood of a vertex in a triangle free graph must be independent; all edges have at least one end in a vertex cover. (ii) Show that all graphs of order n ≥ 3 and size m> [n2/4] contain a triangle. Hints - you may need to use either elementary calculus or the arithmetic-geometric mean inequality.arrow_forwardWe consider the one-period model studied in class as an example. Namely, we assumethat the current stock price is S0 = 10. At time T, the stock has either moved up toSt = 12 (with probability p = 0.6) or down towards St = 8 (with probability 1−p = 0.4).We consider a call option on this stock with maturity T and strike price K = 10. Theinterest rate on the money market is zero.As in class, we assume that you, as a customer, are willing to buy the call option on100 shares of stock for $120. The investor, who sold you the option, can adopt one of thefollowing strategies: Strategy 1: (seen in class) Buy 50 shares of stock and borrow $380. Strategy 2: Buy 55 shares of stock and borrow $430. Strategy 3: Buy 60 shares of stock and borrow $480. Strategy 4: Buy 40 shares of stock and borrow $280.(a) For each of strategies 2-4, describe the value of the investor’s portfolio at time 0,and at time T for each possible movement of the stock.(b) For each of strategies 2-4, does the investor have…arrow_forward
- Negate the following compound statement using De Morgans's laws.arrow_forwardNegate the following compound statement using De Morgans's laws.arrow_forwardQuestion 6: Negate the following compound statements, using De Morgan's laws. A) If Alberta was under water entirely then there should be no fossil of mammals.arrow_forward
- Negate the following compound statement using De Morgans's laws.arrow_forwardCharacterize (with proof) all connected graphs that contain no even cycles in terms oftheir blocks.arrow_forwardLet G be a connected graph that does not have P4 or C3 as an induced subgraph (i.e.,G is P4, C3 free). Prove that G is a complete bipartite grapharrow_forward
- Elementary AlgebraAlgebraISBN:9780998625713Author:Lynn Marecek, MaryAnne Anthony-SmithPublisher:OpenStax - Rice UniversityAlgebra & Trigonometry with Analytic GeometryAlgebraISBN:9781133382119Author:SwokowskiPublisher:CengageTrigonometry (MindTap Course List)TrigonometryISBN:9781337278461Author:Ron LarsonPublisher:Cengage Learning
- College Algebra (MindTap Course List)AlgebraISBN:9781305652231Author:R. David Gustafson, Jeff HughesPublisher:Cengage LearningGlencoe Algebra 1, Student Edition, 9780079039897...AlgebraISBN:9780079039897Author:CarterPublisher:McGraw HillCollege AlgebraAlgebraISBN:9781305115545Author:James Stewart, Lothar Redlin, Saleem WatsonPublisher:Cengage Learning