Please help me code in MATLAB Consider a car of mass M that varies according to...
1. Suppose that a car weighing 4000 pounds is supported by four shock absorbers Each shock absorber has a spring constant of 6500 lbs/foot, so the effective spring constant for the system of 4 shock absorbers is 26000 lbs/foot.1. Assume no damping and determine the period of oscillation of the vertical motion of the car. Hint: g= 32 ft/sec22. After 10 seconds the car body is 1 foot above its equilibrium position and at the high point in its cycle....
1-/7 points 1. Suppose that a car weighing 2000 pounds is supported by four shock absorbers Each shock absorber has a spring constant of 6250 lbs/foot, so the effective spring constant for the system of 4 shock absorbers is 25000 lbs/foot. 1. Assume no damping and determine the period of oscillation of the vertical motion of the car. Hint: g- 32 ft/sec2 25000.32 2. After 10 seconds the car body is 1 foot above its equilibrium position and at the...
I have all of the answers to this can someone just actually
explain this matlab code and the results to me so i can get a
better understanding?
b)
(c) and (d)
%% Matlab code %%
clc;
close all;
clear all;
format long;
f=@(t,y)y*(1-y);
y(1)=0.01;
%%%% Exact solution
[t1 y1]=ode45(f,[0 9],y(1));
figure;
plot(t1,y1,'*');
hold on
% Eular therom
M=[32 64 128];
T=9;
fprintf(' M Max error \n' );
for n=1:length(M)
k=T/M(n);
t=0:k:T;
for h=1:length(t)-1
y(h+1)=y(h)+k*f(t(h),y(h));
end
plot(t,y);
hold on
%%%...