Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is a MATLAB question. Will give thumbs up for correct answers. III. Implement your Procedure Now that you've planned out a procedure, it is

This is a MATLAB question. Will give thumbs up for correct answers.
image text in transcribed
image text in transcribed
III. Implement your Procedure Now that you've planned out a procedure, it is time to implement it. Create a new MATLAB script and include the following information at the top: % Your Name % Today's Date % Lab 3: Input and Output Statements in MATLAB clear;home:close all Once you have this header set up, write MATLAB code to implement the procedure you've defined. As a reminder, there are two main input statements in MATLAB Input statement var input ('Message') Menu statement var-menu 'Message','Option 1','Option 2",...); Use input statements to ask the user for exit velocity and firing angle in degrees. Convert the firing angle to radians. YOU MUST USE RADIANS IN ALL CALCULATIONS! Use a menu statement to determine which planet to use. Remember the return from a menu statement is a number. Define a vector of gravity values in the same order as your planets. Use the planet number and the vector of gravities to determine the proper value of gravity to use for your problem. planet = a value from 1 to 9 from the menu statement g = [3.59 8.87 9.81 3.77 25.95 11.08 10.67 14.07 0.42]; planet-g = g (planet); In addition, there is one main output statements in MATLAB fprintf statement fprintf ('Formatted Message',vars) i You must use fprintf statement(s) to print to the screen the values of time to impact, maximum height and total distance III. Implement your Procedure Now that you've planned out a procedure, it is time to implement it. Create a new MATLAB script and include the following information at the top: % Your Name % Today's Date % Lab 3: Input and Output Statements in MATLAB clear;home:close all Once you have this header set up, write MATLAB code to implement the procedure you've defined. As a reminder, there are two main input statements in MATLAB Input statement var input ('Message') Menu statement var-menu 'Message','Option 1','Option 2",...); Use input statements to ask the user for exit velocity and firing angle in degrees. Convert the firing angle to radians. YOU MUST USE RADIANS IN ALL CALCULATIONS! Use a menu statement to determine which planet to use. Remember the return from a menu statement is a number. Define a vector of gravity values in the same order as your planets. Use the planet number and the vector of gravities to determine the proper value of gravity to use for your problem. planet = a value from 1 to 9 from the menu statement g = [3.59 8.87 9.81 3.77 25.95 11.08 10.67 14.07 0.42]; planet-g = g (planet); In addition, there is one main output statements in MATLAB fprintf statement fprintf ('Formatted Message',vars) i You must use fprintf statement(s) to print to the screen the values of time to impact, maximum height and total distance

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

Advances In Spatial And Temporal Databases 10th International Symposium Sstd 2007 Boston Ma Usa July 2007 Proceedings Lncs 4605

Authors: Dimitris Papadias ,Donghui Zhang ,George Kollios

2007th Edition

3540735399, 978-3540735397

More Books

Students also viewed these Databases questions