ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

find difference of values and slopes for a specified interval in X coordinates

Hi all,
Suppose i have a sine wave of 100hz freq with sampling freq of 1000hz. I want to plot two points on a X-axis and i want to find difference of corresponding y values and display it in the front panel. How do i go about finding the slope for the same. Any help would be appreciated.
Regards,
KM
0 Kudos
Message 1 of 3
(2,596 Views)
What do you mean plotting two points? You have the linear fit vi using that you can find the slope.
-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 3
(2,578 Views)
If you have the plot I will assume that you have arrays of X and Y values. For each of the X values:

1. Use the Threshold 1D Array function with the array of X values as the array input and your target X value as the scalar input. The output is a fractional index of where that X value falls in the array of X values.

2. Use the Interpolate 1D Array function with the array of Y values as the array input and the fractional index from the threshold operation as the index input. The result is the interpolated Y value at the specified fractional index.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 3
(2,564 Views)