# Curve Fitting and Interpolation

Core Topics

Curve fitting with a linear equation (6.2).

Curve fitting with nonlinear equation by writing the equation in linear form (6.3).

Curve fitting with quadratic and higher order polynomials (6.4).

Interpolation using a single polynomial (6.5).

Lagrange polynomials (6.5.1).

Newton's polynomials (6.5.2).

Piecewise (spline) interpolation (6.6).

Use of MATLAB built-in functions for curve fitting and interpolation (6.7).

Complementary Topics

Curve fitting with linear combination of nonlinear functions (6.8).

## 6.1 BACKGROUND

Many scientific and engineering observations are made by conducting experiments in which physical quantities are measured and recorded. The experimental records are typically referred to as data points. For example, the strength of many metals depends on the size of the grains. Testing specimens with different grain sizes yields a discrete set of numbers (d – average grain diameter, σy – yield strength) as shown in Table 6-1.

Table 6-1: Strength-grain size data. Sometimes measurements are made and recorded continuously with analog devices, but in most cases, especially in recent years with the wide use of computers, the measured quantities are digitized and stored as a set of discrete points.

Once the data is known, scientists and engineers can use it in different ways. Often the data is used for developing, or evaluating, ...

Get Numerical Methods for Engineers and Scientists 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.
{"ft_lang_label":"__label__en","ft_lang_prob":0.9122354,"math_prob":0.9486248,"size":1585,"snap":"2021-43-2021-49","text_gpt3_token_len":335,"char_repetition_ratio":0.11764706,"word_repetition_ratio":0.0,"special_character_ratio":0.21198738,"punctuation_ratio":0.14776632,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.97081584,"pos_list":[0,1,2],"im_url_duplicate_count":[null,3,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-12-07T06:54:43Z\",\"WARC-Record-ID\":\"<urn:uuid:dd59799d-95c4-4898-b77b-7584c86b0196>\",\"Content-Length\":\"44397\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:0a90529d-e6d3-4875-b1db-7d875fa08369>\",\"WARC-Concurrent-To\":\"<urn:uuid:cebadab1-780e-4932-ae3b-4ae3ae0481da>\",\"WARC-IP-Address\":\"184.85.23.145\",\"WARC-Target-URI\":\"https://www.oreilly.com/library/view/numerical-methods-for/9781118554937/12_chapter-06.html\",\"WARC-Payload-Digest\":\"sha1:KGLP6XBYSS7ZMGNTL74EZQ2ED6PJ6W37\",\"WARC-Block-Digest\":\"sha1:3K73CZHMFQK7AXISCT6O4MYSBZEL76UY\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-49/CC-MAIN-2021-49_segments_1637964363336.93_warc_CC-MAIN-20211207045002-20211207075002-00117.warc.gz\"}"}