LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you calculate the slope of a line

I am trying to calculate the slope of a line between two distinct points (4 deg/sec and 298 deg/sec).  I am using a Threshold 1D array to intiate the calculation at 4 deg/sec but I don't know how to stop the calcuation at 298 deg/sec.  I have attached the VI and an example of the text file I running through it.  Any help would be greatly appreciated.  Thanks.

Download All
0 Kudos
Message 1 of 6
(3,040 Views)

Just use anothe threshold array wired into a split array split array


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 6
(3,032 Views)

Do another threshold at 298 and use it to calculate the lenght input for "array" subset.

 

 

(Of course you would probably need a little bit mode code to deal with pathological data....)

Message 3 of 6
(3,031 Views)

Smiley Surprised

a BUG?  Christian I'm shocked!

(change the value of the dbl from 296 to 298 and round up)


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 6
(3,025 Views)

Got it!  Thank you, I have literally spent hours trying to figure this out.  I'm obviously quite a LabVIEW rookie:)

0 Kudos
Message 5 of 6
(3,016 Views)

Not a bug, just a typo. 😄

 

We get fractional indices anyway and there are plenty of points, so I did not worry about rounding or precision (I doubt one point would dramatically change the slope). Nothing a +1 or -1 here or there cannot fix if needed. 😄

 

Message 6 of 6
(3,015 Views)