Answer to Question #52284 in MatLAB | Mathematica | MathCAD | Maple for Stephen

Question #52284
In this part, you are going to create a MATLAB Graphical User Interface (GUI) using GUIDE.
The GUI you need to create uses the function written in 'Part 3 - Plotting Projectile Motion' (see below). It allows a user to input various values for inputs x0, y0, V0x and V0y, and then the user can press a 'redraw plot' button to update the figure of projectile motion on the GUI. Your GUI should use the following UI components:
- Edit Text
- Static Text
- Axes
- Push Button
Some components may be used several times.

'Part 3':
function projectile(x0,y0,V0x,V0y)
g = -9.8;

b = V0y;
a = g/2
c = y0;
t_flight = (-b-sqrt(b^2-4*a*c))/(2*a);

t = linspace(0,t_flight,100);
x = x0 + V0x.* t;
y = y0 + V0y.* t + (1/2) * g.* t.^2;
plot(x, y, 'b-', 'Linewidth', 3);
axis equal;
xlabel('Distance (m)');
ylabel('Height (m)');
title('Projectile Motion');
0
Expert's answer

Answer in progress...

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS