Question

This question is given from 'Numerical Techniques and Statistical Analysis' paper which based on using Matlab program.

However, I don't know how can I solve this tough question.

Could anyone please help me?

Thank you so much.

6. Even today, if you are attempting to sail to Fiji, you need to pass a test by Maritime New Zealand to show that you can na1. You will probably have more circles than you strictly need. (With just two cir- cles, you possibly have two intersecting p

6. Even today, if you are attempting to sail to Fiji, you need to pass a test by Maritime New Zealand to show that you can navigate without using a GPS! One of the things you need to do is find your (, y) position given a number of circles with known centers, and radii, as shown in Fig. 2. 0 .5 -10 -5 5 15 20 Figure 2: The intersection of 5 different circles of different radii is in this case at the point Write a MATLAB routine to find the intersection of a bunch of circles of different centers and radii. You should expect around 5 to 10 circles, and also anticipate that the intersec- tion may not be perfect, i.e. in marine navigational terms, you should expect a 'cocked hat As a test-case, use the data for the 5 circles centers and radii given in Table 2. This data is similar to, but not exactly the same as, the case presented above in Fig. 2. Also assume for this section, that we are assume the (x, y) data lies on a perfectly flat plane, (not the surface of a sphere for example.) Table 2: Circle centers and radii on a flat plane. radius -7.37637.6512 7.8 3.51991.0563 5.6 5.26464.8721 10.0 2.17830.5596 4.9 -5.4952 2.1826 3.5 For the general case, you should anticipate the following issues:
1. You will probably have more circles than you strictly need. (With just two cir- cles, you possibly have two intersecting points, with three you might just have one common point.) 2. Due to imprecision in the distance measurements, (perhaps using an electronic range finder), you may not have a perfect intersection. In nautical navigation, this was classically known as a cocked hat3 In this case, you will need to find the best position, perhaps the one that minimises the squared errors. Figure 3: This is an actual chart from the bridge of the USS Midway aircraft carrier in San Diego harbour. You can see the small error in position as a crooked hat' penciled on the chart by the navigator 3. You may wish to think of ways to obtain a reasonable starting guess for the center coordinates, and also reasonable upper and lower bounds for these variables. For example, you should be able to easily construct rectangular bounds by looking at the spread of circle center points and their radii. 4. It is entirely possible that one of your 'sights' is completely wrong, so much so, that there is no reasonable solution. You should try to identify such cases, and flag appropriately Hint: Since you are solving a nonlinear system of algebraic equations, you should use either fsolve or lsqnonlin. See www.working-the-sails.com/fixing_a position.html
0 0
Add a comment Improve this question Transcribed image text
Answer #1

% Center of the circles

C1=[0,0];

C2=[5,0];

% Radius of the circles

R1=3;

R2=5;

% x1(x,y) on the first circle satisfy the following equation:

%(x1(1)-C1(1))^2+(x1(2)-C1(2))^2-R1^2=0

% x2(x,y) on the second circle satisfy the following equation:

%(x2(1)-C2(1))^2+(x2(2)-C2(2))^2-R2^2=0;

% once intersecting we have:

% x1(1)=x2(1);

% x1(2)=x2(2);

% then

F=@(x) ([(x(1)-C1(1))^2+(x(2)-C1(2))^2-R1^2; ...

(x(1)-C2(1))^2+(x(2)-C2(2))^2-R2^2]);

opt=optimoptions(@fsolve);

opt.Algorithm='levenberg-marquardt';

opt.Display='off';

x=fsolve(F,[C1(1),C1(1)+R1],opt);

fprintf('First intersection point: (%f,%f)\n',x(1),x(2));

x=fsolve(F,[C1(1),C1(1)-R1],opt);

fprintf('Second intersection point: (%f,%f)\n',x(1),x(2));

when you run it you get:

First intersection point: (0.900000,2.861818)

Second intersection point: (0.900000,-2.861818)

The main difference here is that the initial guess or starting points is located on one of the circles (so it satisfies one of the equations and not the other. (0,0) that you start doesn't satisfies any of the equations. The convergence rate would be much worse there. setting starting guess as (x,y)=(C(1), C(2)+R) helps it, and that is always the point right on top of one of the circles. Not necessarily the intersection. And Setting the initial guess like this is by no mean any restriction, and in fact choosing proper initial guess is always encouraged.

Alternatively you could have posed this as a constrained optimization problem. Then you had more flexibility for the initial guess.

Add a comment
Know the answer?
Add Answer to:
This question is given from 'Numerical Techniques and Statistical Analysis' paper which based on ...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Activity-Based Costing, Distorted Product Costs Sharp Paper Inc. has three paper mills, one of which is...

    Activity-Based Costing, Distorted Product Costs Sharp Paper Inc. has three paper mills, one of which is located in Memphis, Tennessee. The Memphis mill produces 300 different types of coated and uncoated specialty printing papers. Management was convinced that the value of the large variety of products more than offset the extra costs of the increased complexity. During 20X1, the Memphis mill produced 120,000 tons of coated paper and 80,000 tons of uncoated paper. Of the 200,000 tons produced, 180,000 were...

  • Coding for Python – don’t need it to be complex: In this assignment, your goal is to write a Python program to determine whether a given pattern appears in a data series, and if so, where it is locate...

    Coding for Python – don’t need it to be complex: In this assignment, your goal is to write a Python program to determine whether a given pattern appears in a data series, and if so, where it is located in the data series. This type of problem is common in many health disciplines. For example, identifying treatment pathways. The goal is to detect whether a certain pattern appears in the data series. In the following example, the pattern to be...

  • In 5-6 sentences, evaluate this website: https://www.bls.gov/k12/. Your analysis should assess the source using the techniques...

    In 5-6 sentences, evaluate this website: https://www.bls.gov/k12/. Your analysis should assess the source using the techniques referenced in this week’s lecture. Based on your findings, do you think that this source is appropriate for college level research? Why or why not? Be sure to provide specific details and examples to support your decision. Review the two articles cited below, both of which deal with piracy and copyright. In 5-6 sentences, explain which source is more credible and why. Be specific...

  • Dear Experts, The following question has about 5 answers here which have 2 different forms: one...

    Dear Experts, The following question has about 5 answers here which have 2 different forms: one form treats the BOAT CREW PER FLIGHT ($30) as a Variable Cost while the other treats it as a Fixed Cost. Which of the TWO types of answers MUST be correct in this case? QUESTION: You are the owner of a parasailing company that is expanding operations to a new beachfront location, and you need to prepare a 3-year analysis for the bank that...

  • Partner: Date Name 11 Snell's Law Introduction When light passes from one material to another it ...

    Partner: Date Name 11 Snell's Law Introduction When light passes from one material to another it is always bent away from its original path. This process is known as refraction and the change in direction depends on the change in optical density (or refractive index) of the two materials. A larger change in refractive index results in a larger change in angle between incoming and outgoing light beams. A light beam bends closer to the normal in the material with...

  • QUESTION 1 Given two double variables named x and y, which of the following statements could...

    QUESTION 1 Given two double variables named x and y, which of the following statements could you use to initialize both variables to a value of 0.0? a. x | y = 0.0; b. x = y = 0.0; c. x, y = 0.0; d. none of the above 1 points    QUESTION 2 When you use a range-based for loop with a vector, you a. can avoid out of bounds access b. must still use a counter variable c....

  • 1.- Based on the below reading, using Critical Analysis, based on the concepts of text, comment,...

    1.- Based on the below reading, using Critical Analysis, based on the concepts of text, comment, and answer What can we learn from the great business leaders? WHAT CAN WE LEARN FROM GREAT BUSINESS LEADERS? 2.- Depending on the below reading assigned, using Critical Analysis, based on the concepts of reading, comment on your optics regarding the last three paragraphs of the reading conclusions. WHAT CAN WE LEARN FROM THE BIG BUSINESS LEADERS? William Henry “Bill” Gates III was born...

  • Please read the attached article from the New York Times and write a short paper answering...

    Please read the attached article from the New York Times and write a short paper answering the below questions. There is no length minimum for the essay. I would anticipate approximately 1-2 pages double-spaced, 12pt Times New Roman font to address all required elements. Papers over 2 pages will receive an automatic reduction of 50%. Your task is to accomplish two goals in your paper: Analyze a business problem(s) presented in the article and describe its effect on the business...

  • Data Analysis Project Part 1 Custom Fabric Ventures is a small company that produces fabric-based wardrobe...

    Data Analysis Project Part 1Custom Fabric Ventures is a small company that produces fabric-based wardrobe accessories (such as, handbags, scarves, and headbands) and home accessories (such as placemats, pillows, and window treatments).   The company keeps a limited number of popular items in stock, but primarily produces custom orders. Customers are able to choose from a wide selection of styles, sizes, and fabrics for each type of product. Most of the company’s customers are small boutiques, home décor shops, and home-decorators...

  • Experimental technique 5. [1pt] Which of the following statements are true for this experiment? E.g., enter...

    Experimental technique 5. [1pt] Which of the following statements are true for this experiment? E.g., enter AB. If none are true, enter N. You have 4 tries. Everyone must wear safety glasses. For each launch angle, the projectile range is measured for one speed setting. Never look into the barrel of the launcher when it is loaded. The launch angle θ measured using the plumb line is the angle of the launcher with respect to the vertical. The projectile is...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT