Info
This question is closed. Reopen it to edit or answer.
position, velocity, acceleration
1 view (last 30 days)
Show older comments
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
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.
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!