Info

This question is closed. Reopen it to edit or answer.

position, velocity, acceleration

1 view (last 30 days)
blake brandt
blake brandt on 5 Dec 2019
Closed: Rena Berman on 6 May 2021
This question was flagged by Rik
function [x] = my_lost_package(t)
%UNTITLED Summary of this function goes here
% Detailed explanation goes here
syms t
g = 9.8;
t = input("please enter a time") %input for time
x = .5*g*t.^2 % distance travel i meters.
fplot(my_lost_package,'-r')
hold on
velocity = diff(x)
plot(velocity, '--r')
hold on
acceleration = diff(velocity)
plot(acceleration)
axis([0,60,0,1800])
xlabel('time (s)')
ylabel('distance(m)')
title('falling object')
  2 Comments
Walter Roberson
Walter Roberson on 6 Dec 2019
Is that broken up into different files? Because at the moment it looks like you are calling my_lost_package recursively.
It is not clear why you are asking the user to enter a time.
Raj
Raj on 6 Dec 2019
What is the question here?

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!