LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ploat a hyperbola

Solved!
Go to solution

Hi!

 

I wan't to plot x^2-y^2=1

How is it possibe in labview?

 

Thanks: Koli 

0 Kudos
Message 1 of 18
(6,428 Views)
Here is a simple vi to plot ax^2 - by^2 = c.  To keep it simple I take advantage of the fact that LV won't plot NaN.  However, if you look closely you will see a small gap near y = 0.  If this bugs you, you can either increase the number of points, or change the VI to join the proper segments of the two curves.
0 Kudos
Message 2 of 18
(6,388 Views)

Sometimes it is easier to graph it as a parametric curve, e.g. as follows:

 

Message Edited by altenbach on 07-22-2009 10:07 PM
Download All
Message 3 of 18
(6,373 Views)

Hi!

 

I don't understand why, but it dosent plot anything for me... 

What i need to write into the parameters?

forum.JPG

Thanks:Kolos 

0 Kudos
Message 4 of 18
(6,362 Views)

Because an error is generated Smiley Mad ?!?

But why making it so complicated ?

 

You know the formula : y = sqrt (x^2 - 1)

So generate some x data and calculate corresponding y values.

Something Altenbach already showed you in another way.

So I used his vi as a start and complete it with the above formula Smiley Surprised 

I hope he doesn't mind Smiley Indifferent

 

 

@ Altenbach : Can you please explain why you add two "NaN" constants into the arrays?

 

 

0 Kudos
Message 5 of 18
(6,358 Views)

Alain S wrote:

 

@ Altenbach : Can you please explain why you add two "NaN" constants into the arrays?

 

 


Just try it without... the plots will be connected, and that's not really what you want.

 

0 Kudos
Message 6 of 18
(6,348 Views)

Alain S wrote:

@ Altenbach : Can you please explain why you add two "NaN" constants into the arrays?


Well, as Dan_u already said, the NaN creates a gap in a line graph. Since you are using a graph with points, it does not matter. Try with a plot style that uses interpolation like in my example and you'll see the difference as shown below. 😉

 

Message Edited by altenbach on 07-23-2009 07:32 AM
0 Kudos
Message 7 of 18
(6,329 Views)

dan_u wrote:

Just try it without...


I did Smiley Happy......................but there is no difference Smiley Surprised

Since the plotstyle is set to dots, no lines Smiley Very Happy

 

Anyway thanks for the trick with the "NaN", I'll keep it in mind!

 

 

EDIT: Altenbach is better in LV programming and faster in typing than me Smiley Sad

Message Edited by Alain S on 07-23-2009 04:34 PM
0 Kudos
Message 8 of 18
(6,323 Views)

hmm

I am very bad at math...

I have two point. "A" and "B". "A" is for example at (-2,0) and "B" is at (2,0) point.

I have a point called "C". I know that CA - CB = 3 . (CA means the distance between C and A). I want to plot where can C be. (it will be a hyperbola).

How can i plot it?

 

0 Kudos
Message 9 of 18
(6,318 Views)

It's also quite easy in polar coordinates because we can use complex numbers for the xy graph.

 

(Even simpler would be to do y=1/x switch to polar, and decrement theta by pi/4 :D)
Message Edited by altenbach on 07-23-2009 08:07 AM
Download All
0 Kudos
Message 10 of 18
(6,305 Views)