Question

In: Physics

MatLab Bouncing ball When a ball is dropped from 2 m, it only has potential energy...

MatLab

Bouncing ball

When a ball is dropped from 2 m, it only has potential energy initially. When it hits the ground all that energy is converted to kinetic energy. Write a program that will calclate the position of the ball (y) as a function of time. Calculate y when the ball is always higher than 0.5 m. Note that every time the ball hits the ground it loses 10% of the total energy. Plot y vs. t. The mass of the ball is 10 kg. Other helpful information:  KE = ½ mv2  PE = mgh  Use the equation we have been using for the y position of the ball

i need this done in matlab

Solutions

Expert Solution

dt = 0.001;
g = 10; % Gravitational acceleration in m/s^2
h = 2; % Initial height in meter
i = 1;
for itr = 1:30
flag = 0;
t = 0;
while flag == 0 % Falling down from maximum height
y = 0.5*g*t^2;
y = h - y;
Y(i) = y;
t = t + dt;
i = i+1;
if t > sqrt(2*h/g)
flag = 1;
end
end
t = 0;
while flag == 1 % Moving upward
u = sqrt(2*g*h*0.9); % Initial velocity (after collision)
y = u*t - 0.5*g*t^2;
Y(i) = y;
t = t + dt;
i = i+1;
if t > u/g
flag = 0;
h = u^2/(2*g); % Maximum height
end
end
end
n = length(Y);
time = 0:dt:(n-1)*dt;
plot(time,Y);
xlabel('t'); ylabel('y(t)');

p = input('Enter the time in second ');
if p > max(time)
disp(['Please enter time < ',num2str(max(time))]);
else
ind = find(time == p);
disp(Y(ind));
end


Related Solutions

a)derive the equation of motion of a bouncing ball dropped from rest (with air resistance )...
a)derive the equation of motion of a bouncing ball dropped from rest (with air resistance ) b) trajectory-- time it take to stop step by step please .
a 2.00 kg ball is dropped from a height of 1.23 m and when it hits...
a 2.00 kg ball is dropped from a height of 1.23 m and when it hits the ground it receives an upward impulse of 15.7N*s. To what height does the ball bounce?
Question 2: (2pts) Prediction of Gravitational, Kinetic and Total energy for a bouncing ball. Based on...
Question 2: (2pts) Prediction of Gravitational, Kinetic and Total energy for a bouncing ball. Based on your predictions of position and velocity vs time, explain how the energy changes during the motion of the ball. (a) Where on your position vs. time graph is the Gravitational Potential Energy at a maximum during each bounce? Where is it a minimum? What is the velocity when the gravitational potential energy is maximum? What about when the gravitational potential energy is minimum? Explain...
A ball of mass 0.120 kg is dropped from rest from a height of 1.25 m....
A ball of mass 0.120 kg is dropped from rest from a height of 1.25 m. It rebounds from the floor to reach a height of 0.600 m. What impulse was given to the ball by the floor? magnitude? direction? upward or downward
A 200-g ball is dropped from rest from a height of 1.4 m. It bounces and...
A 200-g ball is dropped from rest from a height of 1.4 m. It bounces and returns to the same position.   a) What is the change in momentum between the two points? b) If the ball is in contact with the floor for 10-3 s, what impulse does the floor impart to the ball?   In these cases remember vectors.
5. A ball is dropped from the top of the building whose height is 60 m....
5. A ball is dropped from the top of the building whose height is 60 m. At the same time, another ball is thrown up from the ground with a velocity of 25 m/s. i) At what distance from the top do the balls cross each other? ii) How much time does the two balls take to cross each other? iii) What is the maximum height does the second ball reach?
An 59.4-g tennis ball is dropped from rest from a height of 1.25 m. It rebounds...
An 59.4-g tennis ball is dropped from rest from a height of 1.25 m. It rebounds to a height of 0.62 m. (a) Calculate the amount of the mechanical energy lost in the process. (b) What occurs to the lost mechanical energy? (c) Calculate the work done by the gravitational force on the ball (including its sign) in case (i) the tennis ball drops from 1.25 m to the ground, (ii) rebounds to a height of 0.62 m? F1 F2...
2) A ball is dropped from rest at the top of a high cliff. It takes...
2) A ball is dropped from rest at the top of a high cliff. It takes 10.00 seconds for the ball to reach the ground below. Find: a) the height of the cliff, b) the velocity of the ball hitting the ground below, c) the time it takes for the ball to fall half of the cliff's height, and d) the velocity at this halfway point. (Remember acceleration due to gravity is -9.800 m/s^2).
A 0.05kg bouncy ball is dropped from height 9m and loses 20% of its energy upon...
A 0.05kg bouncy ball is dropped from height 9m and loses 20% of its energy upon impact each time it bounces. Assume that there is no air resistance. a) What is the kinetic energy of the ball before the impact? b) What is the kinetic energy of the ball after the first bounce? c) What is the kinetic energy of the ball after the second bounce? d) How high does the ball bounces after the second impact? e) How many...
A soft tennis ball is dropped onto a hard floor from a height of 1.70 m...
A soft tennis ball is dropped onto a hard floor from a height of 1.70 m and rebounds to a height of 1.17 m. (Assume that the positive direction is upward.) (a) Calculate its velocity just before it strikes the floor. m/s (b) Calculate its velocity just after it leaves the floor on its way back up. m/s (c) Calculate its acceleration during contact with the floor if that contact lasts 3.50 ms. m/s2 (d) How much did the ball...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT