NO CELL PHONES, HEADPHONES/BUDS, NO CALCULATORS. SAVE FREQUENTLY. SAVE BEFORE PUBLISHING!!!
ONLY MATLAB MAY BE ACTIVE ON YOUR COMPUTER. Acrobat may only be open at the end, when you are ready except for publishing and actively looking at exam1q1.pdf, exam1q2.pdf, or exam1q3.pdf with it.
VARIABLE NAMES MUST BE APPROPRIATE AND CLEARLY SHOW WHAT VARIABLE IT IS OR A 50% CREDIT REDUCTION IS APPLIED.
After translation into mathematics, only Matlab may be used to solve the full problem as posed. Use the appropriate procedures as covered in the lectures.
“Open notes: print-outs of lectures and homeworks allowed. You can also use your own homework .m files.”
Astronomia NovaKepler derived the following equation to find the position of celestial bodies in orbit around other bodies:
Create a function file Kepler.m that will accept
,
and
as input arguments and that can be used by fzero to find
.
Next use this function file to find
in two cases. Both have
, but the first has
and the second
.
(Note that Kepler's equation is trivial whenever
is a whole
multiple of
.)
First, in a single plot, plot the output of your function file
against
for
for both cases. Use a grid and a
legend.
Based on the plot find the two values for
using fzero.
In both cases, use the interval method. The end points of your
intervals should be integers or half integers and the interval
should be no longer than half a unit. Print the results out as
For e = 1.123 and M = 1.12345, E = 1.12345 (interval [1.123 1.123]).Absolutely no data values inside the FORMATSTRING.
rng('default')
fVals=sin(xVals)+0.1*randn(size(xVals));
where xVals is an array of 50 equally spaced The quintic fit has a maximum error 1.12E12Absolutely no data values inside the FORMATSTRING.
Next plot the exact
as well as its derivative
as
black broken lines, the noisy data as black circular symbols, and
the fitted quintic and its derivative as blue lines, all in a single
plot. Use a grid. Use a horizontal axis from
to
and a horizontal axis from -1.2 to 1.2.
| (1) |
ODE.m. Note that the
independent variable here is called
Next use ode45 to find the solution of this system from
to
. In particular, make ode45 find the unknowns at at
least 100
values between 0 and 4. The initial conditions at
are that
and
are zero there and
.
Now plot
along the vertical axis and
along the
horizontal axis in a plot.
Congratulations. You have just found and plotted the velocity
profile of the famous Blasius
solution for flow of a
viscous substance like air or water along a flush, semi-infinite
plate. The coordinate
is the distance from the plate and
the velocity component parallel to the plate.
Add an appropriate title and axis labels to the plot.
Solutions without credit distribution.
Solutions with credit distribution.