11-14-2020 04:00 PM - edited 11-14-2020 04:34 PM
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.
Solved! Go to Solution.
11-14-2020 04:25 PM - edited 11-14-2020 04:27 PM
@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"?
11-14-2020 04:35 PM
I attached my files now.
11-14-2020 07:09 PM - edited 11-14-2020 07:10 PM
11-14-2020 07:16 PM - edited 11-14-2020 08:25 PM
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)
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!)
11-15-2020 02:07 AM
Thank you very much 🙂