Professional Documents
Culture Documents
(a) Determine the exponential function that best fits the data. Use the function to estimate the
population in 1980. Make a plot of the points and the function.
(b) Curve-fit the data with a third-order polynomial. Use the polynomial to estimate the population
in 1980. Make a plot of the points and the polynomial.
(c) Fit the data with linear and spline interpolations. Estimate the population in 1975 with linear
and spline interpolations. Make a plot of the data points and curves made of the interpolated points.
In each part make a plot of the data points (circle markers) and the fit curve or the interpolation
curves. Note that part (c) has two interpolation curves.
The actual population of the world in 1980 was 4453.8 million.
clear, clc
year=[1750 1800 1850 1900 1950 1980 1990 2000 2009];
pop=[0.791 0.980 1.26 1.65 2.52 4.4538 5.27 6.06 6.8];
t=-50:10:350;
P=11.55./(1+18.7*exp(-0.0193*t));???
plot(t+1800,P,year,pop,'*')
title('World Population')
legend('Model','Census Data','location','NorthWest')
xlabel('Date, years')
ylabel('Population, billions')
At=A0*exp(k*t)
k=(1/t1)*log(A1/A0
k=(1/1950)*log(2.52/0.791)
At=0.791*exp(k*1975)... ????
11-31 Damped free vibrations can be modeled by a block of mass m that is attached to a spring
and a dashpot as shown. From Newton’s second law of motion, the displacement x of the mass as
a function of time can be determined by solving the differential equation:
𝑑2𝑥 𝑑𝑥
𝑚 2
+𝑏 + 𝑘𝑥 = 0
𝑑𝑡 𝑑𝑡
where k is the spring constant and b is the damping coefficient of the dashpot. If the mass is
displaced from its equilibrium position and then released, it will start oscillating back and forth.
The nature of the oscillations depends on the size of the mass and the values of k and b.
For the system shown in the figure, m=10 kg and k=28 N/m. At time t=0 the mass is displaced to
x=0.18 m and then released from rest. Derive expressions for the displacement x and the velocity
v of the mass, as a function of time. Consider the following two cases:
(a) b= 3 (N s)/m.
(b) b= 50 (N s)/m.
For each case, plot the position x and the velocity v versus time (two plots on one page). For case
(a) take 0 ≤ 𝑡 ≤ 20 𝑠, and for case (b) take 0 ≤ 𝑡 ≤ 10 𝑠.
a)
clear all
syms x t
% Part a
disp('Part a:')
disp('Displacement x as a function of time:')
xs=dsolve('10*D2x+3*Dx+28*x=0','x(0)=0.18','Dx(0)=0')
%xs2=subs(xs,t,2)
subplot(2,1,1)
ezplot(xs,[0,20])
axis([0,20,-0.2,0.2])
xlabel('Time (s)')
ylabel('Position (m)')
disp('Velocity v as a function of time:')
v=diff(xs)
subplot(2,1,2)
ezplot(v,[0,20])
xlabel('Time (s)')
ylabel('Velocity (v)')