Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 11 The Database For Big Data And Analytics

Authors: Cristian Molaro, Surekha Parekh, Terry Purcell, Julian Stuhler

1st Edition

1583473858, 978-1583473856

More Books

Students also viewed these Databases questions

Question

=+Where does the focus of labor relations lie? Is it collective

Answered: 1 week ago

Question

=+With whom does the firm have to negotiate?

Answered: 1 week ago