Full Download MATLAB Curve Fitting Toolbox User S Guide The Mathworks PDF
Full Download MATLAB Curve Fitting Toolbox User S Guide The Mathworks PDF
com
https://textbookfull.com/product/matlab-curve-
fitting-toolbox-user-s-guide-the-mathworks/
https://textbookfull.com/product/matlab-econometrics-toolbox-user-s-
guide-the-mathworks/
textbookfull.com
https://textbookfull.com/product/matlab-bioinformatics-toolbox-user-s-
guide-the-mathworks/
textbookfull.com
https://textbookfull.com/product/matlab-mapping-toolbox-user-s-guide-
the-mathworks/
textbookfull.com
https://textbookfull.com/product/international-review-of-cell-and-
molecular-biology-1st-edition-kwang-w-jeon-eds/
textbookfull.com
Building Machine Learning Powered Applications Going from
Idea to Product 1st Edition Emmanuel Ameisen
https://textbookfull.com/product/building-machine-learning-powered-
applications-going-from-idea-to-product-1st-edition-emmanuel-ameisen/
textbookfull.com
https://textbookfull.com/product/modelling-nature-an-opinionated-
introduction-to-scientific-representation-roman-frigg/
textbookfull.com
https://textbookfull.com/product/the-history-of-gangster-rap-from-
schoolly-d-to-kendrick-lamar-the-rise-of-a-great-american-art-form-
soren-baker/
textbookfull.com
https://textbookfull.com/product/how-to-stay-human-in-a-f-cked-up-
world-mindfulness-practices-for-real-life-tim-desmond/
textbookfull.com
https://textbookfull.com/product/r-for-college-mathematics-and-
statistics-1st-edition-thomas-pfaff/
textbookfull.com
Curve Fitting Toolbox™
User's Guide
R2020a
How to Contact MathWorks
Phone: 508-647-7000
Getting Started
1
Curve Fitting Toolbox Product Description . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Key Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Interactive Fitting
2
Interactive Curve and Surface Fitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Introducing the Curve Fitting App . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Fit a Curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Fit a Surface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Model Types for Curves and Surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
Selecting Data to Fit in Curve Fitting App . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
Save and Reload Sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
v
Generating MATLAB Code and Exporting Fits . . . . . . . . . . . . . . . . . . . . . 2-15
Interactive Code Generation and Programmatic Fitting . . . . . . . . . . . . . 2-15
vi Contents
Exponential Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-28
About Exponential Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-28
Fit Exponential Models Interactively . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-28
Fit Exponential Models Using the fit Function . . . . . . . . . . . . . . . . . . . . . 4-30
vii
Custom Linear Fitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6
About Custom Linear Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6
Selecting a Linear Fitting Custom Fit Interactively . . . . . . . . . . . . . . . . . . 5-6
Selecting Linear Fitting at the Command Line . . . . . . . . . . . . . . . . . . . . . 5-7
Fit Custom Linear Legendre Polynomials . . . . . . . . . . . . . . . . . . . . . . . . . 5-8
viii Contents
Fit Postprocessing
7
Explore and Customize Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
Displaying Fit and Residual Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
Viewing Surface Plots and Contour Plots . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3
Using Zoom, Pan, Data Cursor, and Outlier Exclusion . . . . . . . . . . . . . . . . 7-4
Customizing the Fit Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5
Print to MATLAB Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-6
ix
Spline Fitting
About Splines
8
Introducing Spline Fitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
About Splines in Curve Fitting Toolbox . . . . . . . . . . . . . . . . . . . . . . . 8-2
Spline Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
Interactive Spline Fitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3
Programmatic Spline Fitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3
x Contents
Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
Types of Splines
10
Types of Splines: ppform and B-form . . . . . . . . . . . . . . . . . . . . . . . . . 10-2
Polynomials vs. Splines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2
ppform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2
B-form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2
Knot Multiplicity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3
xi
Constructing and Working with stform Splines . . . . . . . . . . . . . . . 10-28
Introduction to the stform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-28
Construction and Properties of the stform . . . . . . . . . . . . . . . . . . 10-28
Working with the stform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-29
Splines Glossary
A
List of Terms for Spline Fitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-2
xii Contents
Functions
12
Bibliography
B
xiii
1
Getting Started
Curve Fitting Toolbox provides an app and functions for fitting curves and surfaces to data. The
toolbox lets you perform exploratory data analysis, preprocess and post-process data, compare
candidate models, and remove outliers. You can conduct regression analysis using the library of
linear and nonlinear models provided or specify your own custom equations. The library provides
optimized solver parameters and starting conditions to improve the quality of your fits. The toolbox
also supports nonparametric modeling techniques, such as splines, interpolation, and smoothing.
After creating a fit, you can apply a variety of post-processing methods for plotting, interpolation, and
extrapolation; estimating confidence intervals; and calculating integrals and derivatives.
Key Features
• Curve Fitting app for curve and surface fitting
• Linear and nonlinear regression with custom equations
• Library of regression models with optimized starting points and solver parameters
• Interpolation methods, including B-splines, thin plate splines, and tensor-product splines
• Smoothing techniques, including smoothing splines, localized regression, Savitzky-Golay filters,
and moving averages
• Preprocessing routines, including outlier removal and sectioning, scaling, and weighting data
• Post-processing routines, including interpolation, extrapolation, confidence intervals, integrals and
derivatives
1-2
Curve Fitting Tools
• An interactive environment, with the Curve Fitting app and the Spline Tool
• A programmatic environment that allows you to write object-oriented MATLAB® code using curve
and surface fitting methods
To open the Curve Fitting app or Spline Tool, enter one of the following:
To list the Curve Fitting Toolbox functions for use in MATLAB programming, type
help curvefit
The code for any function can be opened in the MATLAB Editor by typing
edit function_name
help function_name
doc function_name
You can change the way any toolbox function works by copying and renaming its file, examining your
copy in the editor, and then modifying it.
You can also extend the toolbox by adding your own files, or by using your code in combination with
functions from other toolboxes, such as Statistics and Machine Learning Toolbox or Optimization
Toolbox software.
1-3
1 Getting Started
Curve Fitting
load hahn1
2 Open the Curve Fitting app. Enter:
cftool
3 In the Curve Fitting app, select X Data and Y Data.
Curve Fitting app creates a file in the Editor containing MATLAB code to recreate all fits and
plots in your interactive session.
For more information about fitting curves in the Curve Fitting app, see “Interactive Curve and
Surface Fitting” on page 2-2.
For details and examples of specific model types and fit analysis, see the following sections:
load hahn1
Create a fit using the fit function, specifying the variables and a model type (in this case rat23
is the model type).
To learn what functions you can use to create and work with fits, see: “Curve and Surface Fitting” on
page 3-2.
1-4
Curve Fitting
For details and examples of specific model types and fit analysis, see the following sections:
See Also
fit
Related Examples
• “Interactive Curve and Surface Fitting” on page 2-2
1-5
1 Getting Started
Surface Fitting
load franke
2 Open the Curve Fitting app. Enter:
cftool
3 In the Curve Fitting app, select X Data, Y Data and Z Data.
Curve Fitting app creates a file in the Editor containing MATLAB code to recreate all fits and
plots in your interactive session.
For more information about fitting surfaces in the Curve Fitting app, see “Interactive Curve and
Surface Fitting” on page 2-2.
For details and examples of specific model types and fit analysis, see the following sections:
load franke
2 Create a fit using the fit function, specifying the variables and a model type (in this case
poly23 is the model type).
plot(f, [x,y], z)
To learn what functions you can use to create and work with fits, see: “Curve and Surface Fitting” on
page 3-2.
For details and examples of specific model types and fit analysis, see the following sections:
1-6
Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
Surface Fitting
See Also
fit
Related Examples
• “Interactive Curve and Surface Fitting” on page 2-2
1-7
1 Getting Started
Spline Fitting
In this section...
“About Splines in Curve Fitting Toolbox” on page 1-8
“Interactive Spline Fitting” on page 1-8
“Programmatic Spline Fitting” on page 1-8
Using the Curve Fitting app or the fit function you can:
The toolbox also contains specific splines functions to allow greater control over what you can create.
For example, you can use the csapi function for cubic spline interpolation. Why would you use
csapi instead of the fit function 'cubicinterp' option? You might require greater flexibility to
work with splines for the following reasons:
• You want to combine the results with other splines, e.g., by addition.
• You want vector-valued splines. You can use csapi with scalars, vectors, matrices, and ND-arrays.
The fit function only allows scalar-valued splines.
• You want other types of splines such as ppform, B-form, tensor-product, rational, and stform thin-
plate splines.
• You want to create splines without data.
• You want to specify breaks, optimize knot placement, and use specialized functions for spline
manipulation such as differentiation and integration.
If you require specialized spline functions, see the following sections for interactive and
programmatic spline fitting.
1-8
2
Interactive Fitting
Fit a Curve
1 Load some example data at the MATLAB command line:
load census
2 Open the Curve Fitting app by entering:
cftool
The Curve Fitting app creates a default polynomial fit to the data.
4 Try different fit options. For example, change the polynomial Degree to 3 to fit a cubic
polynomial.
2-2
Interactive Curve and Surface Fitting
5 Select a different model type from the fit category list, e.g., Smoothing Spline. For information
about models you can fit, see “Model Types for Curves and Surfaces” on page 2-4.
The Curve Fitting app creates a file in the Editor containing MATLAB code to recreate all fits and
plots in your interactive session.
Tip For a detailed workflow example, see “Compare Fits in Curve Fitting App” on page 2-16.
To create multiple fits and compare them, see “Create Multiple Fits in Curve Fitting App” on page 2-
11.
Fit a Surface
1 Load some example data at the MATLAB command line:
load franke
2 Open the Curve Fitting app:
cftool
3 Select X data, Y data, and Z data. For more information, see “Selecting Data to Fit in Curve
Fitting App” on page 2-5.
2-3
Random documents with unrelated
content Scribd suggests to you:
Dunkirk, 32
Duquesne, Fr., 130–31
Echo, 41
L’Éclair, Fr. corvette, capture of, 126
Edgar, Gardner’s service in, 64–96;
court martial on board of, 73–4;
officers of, 90–6; 29, 39, 45, 52, 97, 108, 112, 118, 124, 157, 229,
233
Elephant, 227–8, 232
Endymion, 72–3
Etna, 12
Europa, 205, 222
Euryalus, 202
Fame, 11
Favorite, Fr. privateer, captured, 188;
in Portland Race, 189;
luxuries on board of, 200
Formidable, 182, 228
Fortitude, 104, 143
Foudroyant, 7, 29, 62, 117, 136
Française, Fr., 230
Ganges, 227, 229
Glebb, Russian, 184
Glorieux, French prize, lost, 26
Goliath, 25, 30, 226, 228, 234, 239
Gorgon, Gardner’s service in, 155–71;
goes ‘bump on shore,’ 156;
‘a noble sea boat,’ 157;
nearly runs on Bolt Head, 158;
runs amok at Spithead, ib.;
officers of, 170–1
Grafton, 11
Grampus, 51
Growler, brig, capture of, 95
Guadeloupe, 11
Hebe, 57, 65
Hector, French prize, lost, 26
Hector, guard-ship, 76
Hercules, Dutch prize, renamed Orestes, 56
Hercules, 80
Hermione, French prize, victualler, 22
Hermione recaptured, 176
Hind, 44, 176;
Gardner’s service in, 178–202;
captures smuggler, 181;
presses her crew, 181;
succession of gales, 182–185;
chased by Richery’s squadron, 185–7;
captures French privateer, 188;
officers put on shore in the mutiny, 192–3;
officers of, 201–2
Hindostan, store-ship, 229
Hope, transport, 37
Hope, 74
Illustrious, 131, 146
Impregnable, 14
Invincible, the old, lost on the Dean, 6;
the new, 11
Jamaica, 18
Janus, 233
Juno, frigate, 143
Languedoc, Fr., 74
Lark, 230
Lawrence, brig, 41
Leopard, 180
Leviathan, 78, 228
Lion, 62, 233
London, 12, 81;
mutiny at Spithead, 192
Lowestoft, 131
Lutine, 202;
loss of, 208
Macedonian, capture of, 95
Magnificent, 64
Majestic, 229
Marlborough, 8, 117
Mars, Dutch prize, renamed Pylades, 56
Mars, 5, 8
Medusa, 182, 192
Medway, 33
Melampus, 227, 229
Merlin, 41
Minerve, 66
Minotaur, 123, 125
Modeste, 155–6
Monmouth, 10, 136, 197, 243
Monsieur, 22–3
Montagu, 184
Naiad, 229
Namur, 197
Nassau, loss of, 213
Nemesis, 131
Néréide, 229
Orestes, a prize from the Dutch, 56;
Gardner’s service in, 56–63;
fire on board, 57;
loss of, 62;
officers of, 62–3
Orion, 229, 233
Overyssel, 203 n.
Pallas, formerly Minerva, 213
Panther, Gardner’s service in, 19–40;
messing on board, 20–21;
makes three prizes, 22;
in a gale, 25–6;
at Gibraltar, 27;
off C. Spartel, 29–32;
regrets at paying off, 33;
mutinous spirit of men, 37;
officers of, 38–40, 179
Pearl, 155–6
Pégase, 80, 88
Pelican, 230
Penelope, 62
Phæton, courts martial on captain and officers of, 73–4 n.
Pigmy, cutter, prize, 22
Powerful, 229, 232–3
Preston, 104, 147
Prince George, 10, 91, 188
Princess Amelia, song by a seaman of, 103–4
Princess Charlotte, accident at the launch of, 238–9
Princess Royal, 11–13, 80, 129, 213, 228, 247
Proselyte, court martial on master of, 41
Proserpine, capture of, 116
Pylades, 56
Quebec, 244
Queen, Gardner’s service in, 121–5;
officers of, 123–5, 82, 87
Queen Charlotte, 98
Raisonnable, 21, 29
Ramillies, 12, 13
Rattler, sloop, 94
Raven, 230
Recovery, 22
Renown, 74
Resolution, 229
Ripon, 22
Robust, 229
Romney, 102
Rose, transport, 37
Rover, sloop, lost, 8
Royal George, loss of, 23–4; 8, 52, 99
Royal Louis, Fr., 30
Royal Oak, 11
Royal Sovereign, 13
Royal William, 24, 29, 158
Ruby, 29, 151
Russell, 11
Sabina, Spanish frigate, 66
St. Fiorenzo, 155–6
St. George, loss of, 113, 129, 145
St. Michael, prize, 27
Salisbury, Gardner’s service in, 41–52;
Hell afloat, 41, 75;
dogs on board, 42;
fog off Newfoundland, 42;
in a gale, 43;
logged 296 k. in 24 hours, 43;
much bullying on board, 43–6;
feud with Grampus, 50, 51;
officers of, 52–5; 68, 114–116, 120, 175–7
Sandwich, 23
Sans Culotte, Fr., renamed l’Orient, 145
Sans Pareil, 114, 227–8
Santa Leocadia, 41
Saturn, 81
Scipio, 65
Solebay, 97
Solitaire, Fr., capture of, 151
Speedwell, smuggling lugger, capture of, 181
Speedy, brig, 131
Spencer, 228
Standard, 203
Stately, 99
Suffolk, 22
Sultan, 11
Superb, 38
Surveillante, Fr., 244
Temeraire, 228
Terpsichore, 116
Terrible, 145
Theseus, 229
Thisbe, 41, 229
Thorn, 41
Thunderer, lost, 50
Tonnant, Fr., 147 n.
Topaze, heavy death-roll, 230; 155–6
Tremendous, 198
Trent, 196, 229
Trimmer, 65
Tromp, 206 n.
Trusty, 242
Union, 29
Unité, 131
Valiant, 98, 148
Vanguard, 229
Vengeance, 25, 28–9, 227, 229–30, 233
Victory, lost on the Casquets, 100 n.;
carries Howe’s flag, 25, 29;
Gardner’s service in, 172–6;
officers of, 176–7; 54, 66, 99, 126, 148, 152, 158
Vigilant, 22
Ville de Paris, lost, 26
Warrior, 229
Weasel, 191
Weymouth, store-ship, 206
William Tell, 62
Woolwich, store-ship, 171
Zealous, 229, 233
Shirley, lieutenant, 133–4, 136, 152
Shirt in the rigging, 163 and n.
Shovell, Sir Clowdisley, his last moorings, 158
Shuldham, Lord, vice-admiral, 32
Silence in working ship, 108 & n.
Silva, Emanuel, midshipman, 94, 118
Simmers, Mr., his dog, 5–6
Simmonds, Mr., formerly of the Panther, 179
Simmonds, Richard, lieutenant, ‘Gentleman Jack,’ 114
Simmonds, Samuel, midshipman, sees ghost, 36; 39
Simmonds, Richard, midshipman, 117, 177
Simonton, Robert, captain, 21, 28, 38
Skene, midshipman, 18
Skerret, Robert, midshipman, 40, 54
Skinner, Stephen, midshipman, 116
Skynner, Launcelot, captain, his ship lost, 208
Slade, James, midshipman, 93
Slops, list of, 46;
‘served out at the gangway,’ 111 n.
Smith, Charles, gunner, 53
Smith, Sir Sidney, burns ships at Toulon, 145 n.
Smith, Walter, lieutenant of marines, 13
Smock frock, mention of, 46 & n.
Smollett, his monument, 143 n.
Snow-eaters, 51
Soap-suds, a pedantic lieutenant so called, 109
Songs and Verses:—
Prologue, 1
To my veteran friends, 3
‘Don’t you see the ships a-coming?’ 16
Commodore Gale, 69
On asking for leave, 72
‘There’s nothing like grog,’ 77
‘When first they impressed me,’ 84
On washing the decks, 88
The battle on the Dogger Bank, 103–4
‘Billy the cook got drunk,’ 104
On General Dundas, 148
Bryan O’Lynn, 168–9
On two lubberly pilots, 211
On Fegan’s impressment, 214–15
A Baltimore wedding, 215–216
Eileen Aroon, 222
‘Jolly tars, have you heard the news?’ 235
‘On Newgate Steps,’ 242
On Venables and Penn, 245
Spence, David, midshipman, 95
Spencer, Earl of, first lord of the admiralty, 44, 174–6
Spicer, Robert, midshipman, 119
Stack, Thomas, his yarns, 50; 55
Stamp, mayor of Queensborough and pilot, 180
Stephens, George Hopewell, captain, 226–7, 229, 231, 233–4, 236,
243, 246–7
Sterne, his Sentimental Journey, 143 n.
Stevens, midshipman, 61, 63;
complimented by Sir Roger Curtis, 61;
made a gunner, 63
Stevens, John, mate, 91
Stevenson, captain, keeps the Blue Peter flying, 222–3
Steward sewed up in a bullock’s hide, 135
Stewart, Charles, lieutenant, 151
Stiles, John, lieutenant, 45, 52, 68–9, 91
Stocker, Charles Maurice, lieutenant, killed in action, 114
Storace, musical composer, song by, 72
Strahan, Sir Richard, captures Dumanoir’s squadron, 201
Street, James, purser, 62
Strico, Anthony, his sign, 128
Sturges, Robert, midshipman, killed in action, 30;
his ghost walks, 36; 39
Suckling, William, 132 n.
Sumner, Dr., headmaster of Harrow, his death, 259 n.
Surgeon of Orestes violently mad, 57–8
Susan, Black-eyed, 36
Swanson, Jacob, gunner, 9
Swiney, Noel, midshipman, 125
Vagg, Henry, surgeon’s mate, runs amok with the snuffers, 149; 154
Valobra, James, midshipman, encounter with Turks, 133;
at Leghorn, 139; 153
Vansittart, Henry, midshipman, 177
Venables, his capture of Jamaica, 245
Ventriloquist, tricks of a, 84–5
Verses—see Songs
Vincent, Richard Budd, midshipman, 54;
lieutenant, 175–6
Vosper, William, Gardner’s schoolfellow, midshipman, 17, 72, 94,
142, 152