Mathematics - The MathWorks - #30

/ 316


catalogue search
P. 01
P. 02
P. 03
P. 04
P. 05
P. 06
P. 07
P. 08
P. 09
P. 10
P. 11
P. 12
P. 13
P. 14
P. 15
P. 16
P. 17
P. 18
P. 19
P. 20
P. 21
P. 22
P. 23
P. 24
P. 25
P. 26
P. 27
P. 28
P. 29
P. 30
P. 31
P. 32
P. 33
P. 34
P. 35
P. 36
P. 37
P. 38
P. 39
P. 40
P. 41
P. 42
P. 43
P. 44
P. 45
P. 46
P. 47
P. 48
P. 49
P. 50


See other catalogues for The MathWorks

Text version of the page
1 Linear Algebra
t = [0 .3 .8 1.1 1.6 2.3]';
y = [.82 .72 .63 .60 .55 .50]';
Try modeling the data with a decaying exponential function:
The preceding equation says that the vector y should be approximated by a linear combination of two other vectors, one the constant vector containing all ones and the other the vector with components e"*. The unknown coefficients, c1 and c2, can be computed by doing a least squares fit, which minimizes the sum of the squares of the deviations of the data from the model. There are six equations in two unknowns, represented by the 6-by-2 matrix:
E = [ones(size(t)) exp(-t)] E =
1.0000 1.0000
1.0000 0.7408
1.0000 0.4493
1.0000 0.3329
1.0000 0.2019
1.0000 0.1003
Usethebackslashoperatortoget theleast squaressolution:
c = E\y
c =
0.4760 0.3413
In other words, the least squares fit to the data is
y(f)= 0.4760 + 0.3412 e4
The following statements evaluate the model at regularly spaced increments in t, and then plot the result, together with the original data:
T = (0:0.1:2.5)';
1-20

pageCatalog pdf di En 2012-06-22-01