LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Projectile Motion/Mathscript

I am trying to make a program in which the physics of a projectile can be reflected on an xy graph, but my graph is not truly reflecting the outcome of the equation. Attached you will find my vi.

 

the equation is R = V^2/(2*g) [ sin(2*theta) + sqrt( sin^2(2*theta) + 8*g*h*cos^2(theta)/v^2)]

0 Kudos
Message 1 of 5
(1,587 Views)

ebarrios95

 

What specifically does it mean that it is not reflecting the outcome?

 

What is this application for?

Dane S.
Product Support Engineer
National Instruments
0 Kudos
Message 2 of 5
(1,535 Views)

This is a LabVIEW Forum.  Stop thinking about MatLab, eschew Mathscript.  

 

You have an equation with variables R (undefined), V (also undefined), g (assumed to be the acceleration due to gravity at the Earth's surface), theta (undefined), and h (undefined).  I:n usual math/physics notation, R and theta are polar coordinates.  You talk about an X-Y Graph, but there are no X nor Y.  You are talking about a projectile, so I'm assuming that time is involved -- is "time" in your equation?  What is the difference between V (undefined) and v (also undefined)?

 

 

You need to formulate your problem more carefully.  You probably want to let "t" (time) run from 0 to some final time (how will you calculate the final time?).  You probably want the total time to be divided into N equal (time) intervals.  How many times does that require?  [Hint -- the answer is not N].  What LabVIEW Structure is ideal for generating the (however many different times you need)?  [Hint -- it is not the Framed Sequence].

 

Bob Schor

0 Kudos
Message 3 of 5
(1,508 Views)

Here's what I ended up with.

 

Hope it helps

-Hec

0 Kudos
Message 4 of 5
(1,469 Views)

@Hecnev wrote:

Here's what I ended up with.

 

Hope it helps

-Hec


As Bob_Schor said, this is a LabVIEW forum. Here is how the equation would look using native LabVIEW functions.

 

Since I'm probably doing someone's homework for them, I am only posting a picture of the Block Diagram. So you will have to do a little work on your own to create the VI. 

 

Equation.JPG

Message 5 of 5
(1,455 Views)