l14 curve fitting
DESCRIPTION
L14 Curve Fitting. Homework Curve Fitting – least squares Curve Fitting - optimization Summary. H13 prob 6.5. Beware: some problems don’t need solving! f ( x )=0, when x = 0!. H13 Prob 6.9. Prob 6.9 RJE sol’n. Prob 3.33. Why is this formulation better?. Prob 3.33 cont’d. Report #1. - PowerPoint PPT PresentationTRANSCRIPT
L14 Curve Fitting
• Homework• Curve Fitting – least squares• Curve Fitting - optimization• Summary
1
Prob 3.33
50:
1.0:0:
4.0:4/:
)2(:..
2)(min
6
5
4
3
2332
1
tgtgRgRg
ltERπPg
πRtPgts
ρlπRtf x
Why is this formulation better?
Worksheet Modifications
• Naming cells• Inserting shapes• Inserting MS Equation “object”• Recording macros• Attaching a macro to a shape• Creating a SOLVER hot button• Visual basic, tools/references/solver
10
Minimize sum of all errors?
13
n
iii
ii
baxyz
baxybaxyz
eee
baxyxfy
1
2
222
211
23
22
21
)(
)()(
zerrorssquared theofsum zlet
)(line?straight a todataFit
NC for Unconstrained z(a,b)
14
0
0
0)(2)(
0)(2)(
:conditions necessaryusing),(min
1
2
1
11
2
11
2
n
iiiii
n
iii
n
iii
n
iii
n
iiii
n
iii
yxbxax
ybax
baxybaxybb
z
baxyxbaxyaa
zz
baz0
Straight Line Least Squares
15
b!&a : unknowns2in equations 2
rulevedistributi use
111
2
11
n
iii
n
ii
n
ii
n
ii
n
ii
yxxbxa
ybnxa All numbers
Mathematical method that works for straight lines!
Another way? Especially for non-linear curve fits?
Types of curves
16
xa
a
eaxf
xaxf
xaxaxaaxf
xaxaaxf
xaaxf
7
5
6
4
33
2210
2210
10
)(lexponentia
)(power
)(cubic
)(quadratic
)(linear
Need to find the parameters ai Another way? Especially for non-linear curve fits?
i
iii
i xfyez 22 )]([)( minimize a