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
(267 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"?


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 2 of 6
(257 Views)

I attached my files now. 

0 Kudos
Message 3 of 6
(247 Views)

@lukaszc331 wrote:

I attached my files now. 


Thanks.


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 4 of 6
(218 Views)
Solution
Accepted by 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!)


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
Message 5 of 6
(215 Views)

Thank you very much 🙂

0 Kudos
Message 6 of 6
(178 Views)