Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please solve using Matlab for a and b and I while submit another with c and d. Thanks OBJECTIVES: Understand the difference between interpolation and

image text in transcribedPlease solve using Matlab for a and b and I while submit another with c and d. Thanks
OBJECTIVES: Understand the difference between interpolation and curve fitting. Use polyfit for basic polynomial interpolation. Learn how to control end conditions with the spline function. Learn how to use the interpl function. Understand how spline interpolation is useful to reduce oscillations between data points. Learn how to formulate (by hand) Lagrange interpolating polynomials. . INSTRUCTIONS: Write a single MATLAB m-file that solves all problems below. Call external user-defined functions from your m-file where instructed as well as to minimize naming conflicts, organize your work and simplify debugging. For each problem, write the requested answers to ASCII data files with the exact filenames specified (e.g. "A3.dat"). Submit your main m-file and all associated function m-files to your instructor, submit the ASCII data files to the instructor by email. NOTE: You should be able to complete this entire assignment in a single mfile with no for loops or logic. Bessel functions arise in a variety of engineering and science applications. These functions are not amenable to straightforward evaluation so they are usually compiled in standard tables, for example: 1.8 2.0 2.2 0.5560 2.4 0.5202 2.6 0.4708 Jix) 0.5815 0.5767 Use this data to estimate the 1st order Bessel function corresponding to x - 2.13, namely J1(2.13) using a) A 4h order interpolating polynomial generated using MATLAB polyfit. Calculate the relative error (a) in this estimate. For the error calculation, determine the true value using the built-in function besselj See MATLAB help for syntax and more information about Bessel functions. The subscript 1 in Ji(x) indicates the order of the Bessel function (the nu input you see in the help documentation). b) A cubic spline with "not-a-knot" end conditions generated using MATLAB. Calculate the relative error (a) in this estimate as well. For the next two interpolations, formulate the interpolating polynomial by hand and simply write it into your m-file as an equation, or multiple equations if you want to break up the long equation for part (d) c) A 1st order Lagrange interpolating polynomial. Calculate the relative error (a) in this estimate d) A 2ad order Lagrange interpolating polynomial. Make sure to use the closest three data points. Calculate the relative error (a) in this estimate ANSWERS: For each part, save your estimate and & to a 2-element row vector and write to Aldat thru A4.dat for parts (a) through (d) respectively

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

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

More Books

Students also viewed these Databases questions

Question

2. What process will you put in place to address conflicts?

Answered: 1 week ago