Question: MATLAB Write a program that asks the user to input the initial velocity and firing angle of an object, and then the program calculates the

MATLAB

Write a program that asks the user to input the initial velocity and firing angle of an object, and then the program calculates the maximum distance and maximum height that the object reaches. Look up the "parabolic shot" formulas to solve this problem. Use the "input" and "fprintf" commands to solve this problem.

Below is the code I made, my question is where I use the fprintf function?

clc

clear all

g=9.81;

v=input('Enter the object initial velocity: ');

a=input('Enter the shot angle of the object: ');

Max Height Reached=v^2*(sin(a))^2/(2*g)

Max Distance Reached=v^2*(sin(2*a))/g

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!