LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

linear fit

Hi Gquadro,

 


@Gquadro wrote:

but i can't connect my array with ptbypt data queue


Maybe because PtByPt-DataQueue expects scalar values?!

 

When you already have your data as a 1D array then you could use a loop (without autoindexing) and ArraySubset to read subsets of 60 elements: basic array handling as taught in the Training resources. Did I mention the Training resources before?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 21 of 22
(342 Views)

@Gquadro wrote:

Could you help me with this part? 

There is a ptbypt version of array min&max, so use that. Note that the first slope is NaN (because we only have 1 value!), so you need to initalize on the second iteration. Also note that you might want to ignore the first results, because they don't rely on a full set of values, so initialize min&max if e.g. i=59 or similar.

 

This will give you the slope, not the "angle", so add a little trigonometry. I trust you can do that.

 

 

altenbach_0-1580746543473.png

 


@Gquadro wrote:

Then I would like to write these values (max and min) in an external file. 


There are millions of ways to write two values to a file. What have you tried?

 

 

0 Kudos
Message 22 of 22
(320 Views)