How to incorporate positive and negative theta while plotting graph for Range vs theta in projectile motion

3 vues (au cours des 30 derniers jours)
I am trying to write a code to plot a graph for Range vs theta for projectile motion and using it in LABVIEW. I don't know how to incorporate θ as positive and negative when above and below the horizontal. Below is the code I have written for LABVIEW's MATLAB script
v
g = 9.8
H
V = v.*v
G = 2.*g
theta = linspace(0,90,91)
a = 2.*theta
b = sin(a)
c = b.*b
d = V/G
e = 8.*g.*H /V
A = sqrt((sin(a)).^2+e.*(cos(theta)).^2)
R = d.*[a+A]

Réponse acceptée

Image Analyst
Image Analyst le 7 Sep 2017
linspace can take negative values, you know.
My projectile demo is attached.
  6 commentaires
Steven Lord
Steven Lord le 7 Sep 2017
No, in that context 'b*-' is a line specification. Specifically it tells plot to plot a blue (b) solid line (-) with asterisks (*) as markers.
Peter Walt
Peter Walt le 7 Sep 2017
thank you very much for your effort in answering it. Got the correct one.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Mathematics dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by