Question: function [ x , y ] = projectilePosition ( v _ o , theta _ 0 , t ) % Constants g = 9 .
function x y projectilePositionvo theta t Constants g ; gravity constant ms Calculate x and y coordinates x vo cosdtheta t; y vo sindtheta t g t; end Define function to print results function printResultsx y fprintfProjectile Position:
; fprintfx f meters
x; fprintfy f meters
y; end Initialize variables vo ; initial velocity ms theta; angle of departure degrees t ; time s Calculate projectile position x y projectilePositionvo theta t; Print results printResultsx y;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
