Plotting trajectory of ball

6 views (last 30 days)
Benjamin Mero
Benjamin Mero on 17 Feb 2019
Commented: Jan on 18 Feb 2019
hello,
i’m trying to plot the trajectory of a ball given an initial velocity, height, and angle. i only seem to get a downward trajectory starting at 0. attached is a photo of my code because mathworks wont let me paste my code from my mobile device. any help is appreciated.
6345A6E4-DEDB-46FC-8974-FF86AD03ED9E.png
  2 Comments
Image Analyst
Image Analyst on 17 Feb 2019
Edited: Image Analyst on 17 Feb 2019
No rush on our part. We'll just wait until you can post code from a regular computer.
See attached demo in the meantime.
Jan
Jan on 18 Feb 2019
@Benjamin Mero: As for your other question, it is more useful to post code instead of a picture. You cannot expect the readers in te forum to re-type your code to suggest modifications.

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 17 Feb 2019
sin() expects radians.
  1 Comment
Image Analyst
Image Analyst on 17 Feb 2019
Add "d" for arguments in degrees: sind(), cosd(), tand().

Sign in to comment.

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!