Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please answer the question 1 and 2 in Matlab code 1. Write a code that computes Cn and the absolute error, n=Cn2, as a function

image text in transcribedimage text in transcribed

Please answer the question 1 and 2 in Matlab code

1. Write a code that computes Cn and the absolute error, n=Cn2, as a function of n=1,2,,30. Plot the absolute error on a semi-logarithmic plot (your vertical axis should have logarithmic scale). 2. Note that equation (1) can alternatively be written as sn=2+4sn12sn1. Compute and plot the absolute error n again, except that this time use equation (2) to compute sn. Consider the problem of approximating by inscribing an equilateral polygon inside a unit circle, as discussed in class (see figure 1). Recall that the number of edges are given by en=32n, so that for n=1 we obtain a hexagon, for n=2 a 12-gon, and so on. Also recall that the edge length of the polygon is given by the recursive formula, sn=24sn12, where s1=1 and n2. As a result, the circumference of the polygon is given by Cn=ensn. As n tends to infinity, this circumference converges to the circle's circumference, 2. In other words, limnCn=2. Figure 1: An equilateral hexagon inscribed in a unit circle. We have n=1,en=6 and sn=1

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

Database Systems For Advanced Applications 18th International Conference Dasfaa 2013 Wuhan China April 22 25 2013 Proceedings Part 2 Lncs 7826

Authors: Weiyi Meng ,Ling Feng ,Stephane Bressan ,Werner Winiwarter ,Wei Song

2013th Edition

3642374492, 978-3642374494

More Books

Students also viewed these Databases questions