LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

gradient of xy graph at y intercept

Hi all,
Is there a way to find the gradient in a xy graph at the y intercept?
I can use the linear fit VI and plot only minimum data around the y intercept and find slope that way. Or is there a more elegant way people do this?

Any advice is welcomed, thanks!

0 Kudos
Message 1 of 4
(3,111 Views)

Why not just take the two X values surrounding zero and calculate dy/dx from those points? That would be the simplest way if you want the slope just at zero and don't care about the rest of the data.

If you want some form of smoothing with relation to the rest of the data, then you would need to use a fit curve.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 2 of 4
(3,103 Views)

That's the idea, except taking only 2 data points might be quite inaccurate. Hence, what I thought of doing is taking several point near the y-intercept. (basically same idea) and finding the linear fitted slope.
Was wondering if there is any way to find the tangent/slope at y-intercept which imo would be much more elegant.

0 Kudos
Message 3 of 4
(3,047 Views)

The Linear Fit.vi returns slope and intercept values. If the intercept is far from zero (the y intercept), then the points chosen for the fit process are probably not a representative set or the data curves too much for a linear fit to be a good model.

 

Linear Fit is quite elegant if your data can be modeled as a straight line near the intercept. If your data has a lot of curvature, choose a different, more appropriate model.

 

Lynn

0 Kudos
Message 4 of 4
(3,011 Views)