LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Linear Fit did not work - LABVIEW 2020

Solved!
Go to solution

Hello,

 

I need to do a simple program to read data from txt file and prompt it on graph with Linear Fit function ( y = ax + b), but in output of this function I don't have any data. On the XY graph there is only measurement points. I don't have any idea now how to deal with it.

 

 

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

@lukaszc331 wrote:

I don't have any idea now how to deal with it.


As a first step attach your VI and datafile. We cannot debug pictures. What is the error code of "linear fit"?

0 Kudos
Message 2 of 6
(1,752 Views)

I attached my files now. 

0 Kudos
Message 3 of 6
(1,742 Views)

@lukaszc331 wrote:

I attached my files now. 


Thanks.

0 Kudos
Message 4 of 6
(1,713 Views)
Solution
Accepted by topic author lukaszc331

Error was -20002, i.e. the x and y arrays have different size. Try this instead:

(I had to tweak the format to use comma as decimal delimiter)

 

altenbach_0-1605407049737.png

 

 

 

On a side note, ALWAYS wire an indicator to the error out. Sometimes it wants to tell you something.

(Also, please don't maximize front panel and diagram to the screen. Very annoying!)

Message 5 of 6
(1,710 Views)

Thank you very much 🙂

0 Kudos
Message 6 of 6
(1,673 Views)