From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to calculate slope of XY curve?

Solved!
Go to solution

Hi all,

 

I want to calculate the slope of a X-Y curve, for example, amplitude v.s. position. I was trying to use the derivative method but failed. Could anyone help me with this problem? The example vi. is attached.

 

 

 

Regards,

Nicky.

Message 1 of 10
(13,089 Views)
Solution
Accepted by Nicky87

Like this

Tim
GHSP
Message 2 of 10
(13,083 Views)

Dang it, too slow...

 

Try the Linear Fit VI

Message 3 of 10
(13,082 Views)

Although it involves a Rube method as compared to Linear Fit, the attached vi teaches what a slope really is.

 

- tbob

Inventor of the WORM Global
Message 4 of 10
(13,014 Views)

Can you post the same solved example with labview 8.2?

0 Kudos
Message 5 of 10
(12,691 Views)

Here is an 8.0 version.

Tim
GHSP
0 Kudos
Message 6 of 10
(12,674 Views)

Hey

Attached is the Vi.

Could you please help me if I want to find the slope and I want to stop the loop and measurement when the maximum slope has been attained.

Help will be very much appreciated.

 

 

0 Kudos
Message 7 of 10
(12,646 Views)

How are you defining "maximum slope".  Is it a simple threadhold (stop when slope >= a set value) or are you looking for the inflection point (calculating on the fly the maximum slope and stopping when it is reached)?  The threshold is a simple comparison.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 10
(12,641 Views)

No it is infection point, as in after getting the measurement value , finding the slope and stopping when the slope is highest as in it has maximum deviation from the previous value.

0 Kudos
Message 9 of 10
(12,639 Views)

You should be having a Max limit value so that you can compare on the fly and stop if the max slope is achieved. Check the attached example and also keep it in a single thread

 

Slope max.png

 

Good luck 

 

-----

The best solution is the one you find it by yourself
0 Kudos
Message 10 of 10
(12,613 Views)