Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Construction of Temperature Profiles by Least Squares Polynomials ) Among the important inputs in weather forecasting models are data sets consist - ing of temperature
Construction of Temperature Profiles by Least
Squares Polynomials Among the important inputs
in weather forecasting models are data sets consist
ing of temperature values at various parts of the
atmosphere. These values are either measured dir
ectly using weather balloons or inferred from remote
soundings taken by weather satellites. A typical set
of RAOB weather balloon data is given next. The
temperature T in kelvins may be considered as a
function of p the atmospheric pressure measured in
decibars. Pressures in the range from to decibars correspond to the top of the atmosphere, and those
in the range from to decibars correspond to the
lower part of the atmosphere.
a Enter the pressure values as a column vector p
by setting p: and enter the tem
perature values as a column vector T To find
the best least squares fit to the data by a linear
function cxc set up an overdetermined sys
tem VcT The coefficient matrix V can be
generated in MATLAB by setting
Vp ones
or alternatively, by setting
Avanderp;VA;:
Note For any vector xxxdots,xnT
the MATLAB command vanderx generates
a full Vandermonde matrix of the form
xnxncdots,xxnxncdots,xvdotsxnnxnncdots,xn
For a linear fit, only the last two columns of
the full Vandermonde matrix are used. More
information on the vander function can be
obtained by typing help vander. Once V
has been constructed, the least squares solu
tion c of the system can be calculated using the
MATLAB operation.
b To see how well the linear function fits the data,
define a range of pressure values by setting
q::;
The corresponding function values can be de
termined by setting
zpolyvalcq;
We can plot the function and the data points with
the command
c Let us now try to obtain a better fit by us
ing a cubic polynomial approximation. Again
we can calculate the coefficients of the cubic
polynomial
cxcxcxc
that gives the best least squares fit to the data
by finding the least squares solution of an over
determined system VcT The coefficient
matrix V is determined by taking the last four
columns of the matrix A vanderp To see
the results graphically, again set
zpolyralcq
and plot the cubic function and data points, us
ing the same plot command as before. Where do
you get the better fit, at the top or bottom of the
atmosphere?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started