cancelar
Mostrando resultados para 
Pesquisar então 
Você quer dizer: 

y = mx + c

I am using LV6.0. Normally I take the data from the LV program and put it into an excel program to find the equation of the line, for example y = 2x + 10. Can labview find the equation of the line in the graph?
0 Kudos
Mensagem 1 de 7
5.589Exibições
I don't know if there is a function to do this, but you can write your own.  In the equation y=mx+c, m is the slope of the line and c is the y-intercept (the y value when x=0).  You can take any two data points, (X1,Y1) and (X2,Y2) to find the slope.  M = (Y2-Y1)/(X2-X1).  Now find a point where x=0, and c will be the y value of that point.  Now that you have m and c, you can make your equation into a string using string concat functions.
- tbob

Inventor of the WORM Global
Mensagem 2 de 7
5.575Exibições
Look for "linear fit" or "linear fit coefficients" in the "advanced..Mathematics..curve fitting" palette. One step! 🙂
Mensagem 3 de 7
5.562Exibições


@labview1958 wrote:
I am using LV6.0. Normally I take the data from the LV program and put it into an excel program to find the equation of the line, for example y = 2x + 10. Can labview find the equation of the line in the graph?

1958,

1) If you have the Full or Professional version of LV6, you will have "Linear Fit.vi"  (Functions>Math>Curve Fitting>Linear Fit).  If you have the Base package it won't be there, but ...

2) If you search this forum, you will find probably find a few VI's posted from a time when LV6.0 was new that do the same job which can be used with the Base package.  An v6.0.2 example is the one by Mikael Garcia here:
http://forums.ni.com/ni/board/message?board.id=170&message.id=26936&requireLogin=False

 

=====================================================
Fading out. " ... J. Arthur Rank on gong."
Mensagem 4 de 7
5.563Exibições
The regression function does exactly what you want. In LV7.1 it is located at Analyze >> Mathematics >> Curve Fitting >> Linear fit.vi. It should be in a similar location in LV 6. I did not take the time to launch 6 to check.

Lynn
Mensagem 5 de 7
5.559Exibições
LV 6.0 does have linear fit. But how to use it? I tried dragging "linear fit" to the graph but nothing happens. Anyway?
0 Kudos
Mensagem 6 de 7
5.525Exibições
you must wire it to the x and y values that you are using to plot your graph.  Not sure what you meant by dragging it to the graph, but it must be wired, the same as you did when you set up your graph.

Paul
Mensagem 7 de 7
5.521Exibições