Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The projectile motion equations are, wherex and yare the current position at time t, xo and yo are the projectile's initial position, vo is the

image text in transcribed

The projectile motion equations are, wherex and yare the current position at time t, xo and yo are the projectile's initial position, vo is the projectile's initial speed, 0 is the initial firing angle of the projectile, and g is the gravitational acceleration which is -9.81 m/s2 near Earth's surface. The user (me) will input the initial x-position (m), y position (m), speed (m/s), the firing angle (in degrees) in cells F2-F5 on Sheet2. Create a run button that executes a macro named problem2. This macro solves the following problem: Obtain the input data from cells F2-F5. Using a Do While loop (not a For loop nor a Do Until loop), calculate the x-and y-position of the projectile every 0.1 seconds and output the time, x-position, and y- position to columns A, B, and Cuntil the projectile hits the ground. The first entries for the time, x-position, and y position should be in cells A2, B2, and C2. For example, if the initial x-position is 10 m, the initial y position is 20 m, the initial speed is 100 m/s and the firing angle is 300, the first five lines of output should similar to the data below: 10 20 x0 (m) 0.1 18.66 24.95 0.2 29,80 27.32 34.56 ngle (degrees 39.22 If the last y-position output to the workbook is negative, remove the data from that entire row (the projectile will not enter the ground). mportant Clear all data in columns A-Cbefore using the Do While loop. If you don't, you may have a lot of extra data on your screen after running your program. For example, try running your program with an initial speed of 100 m/s. Then lower the initial speed to 25 m/s and rerun the program. If you do not clear your data from the previous run, there will be a lot of extra lines of output leftover One way to clear the data: First check if no data exists in A2. This can be accomplished by checking if A2 does not equal two double quotes If there is data in A2, determine the number of rows with values, use a For loop to clear out those values one row at a time (assign a pair of double quotes to all cells with data in them), then jump back up to A2. Another way to clear the data: The following line of code will clear the contents of all cells in the range of A2

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

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

ISBN: 0782125395, 9780782125399

More Books

Students also viewed these Databases questions