Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The problem is to create a program in MATLAB in GUI or GUIDE to simulate a basketball shooting game. The question now is to edit

The problem is to create a program in MATLAB in GUI or GUIDE to simulate a basketball shooting game. The question now is to edit the code to show the parabola of the ball to determine whether it goes in or not.

I already have the following

function parabola() fprintf ('WELCOME TO THE GAME '); fprintf ('Choose distance of the basket: '); fprintf ('1. 25m 2. 40m '); distance = input('Enter 1 or 2: '); u = input('Enter the initial velocity of the basketball: '); a = input('Enter the angle at which you want to shoot: '); % calculate the range R = (u*u)*sin(2*a); R = R/9.8; if (R == distance) fprintf (' You have won!'); else fprintf (' Sorry, better luck next time.'); end end

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

The Structure Of The Relational Database Model

Authors: Jan Paredaens ,Paul De Bra ,Marc Gyssens ,Dirk Van Gucht

1st Edition

3642699588, 978-3642699580

More Books

Students also viewed these Databases questions

Question

Were all members comfortable brainstorming in front of each other?

Answered: 1 week ago

Question

5. What information would the team members need?

Answered: 1 week ago