ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

linear fit

At the end I want to obtain an array with the value of the slope and then with max min function I will isolate that values

0 Kudos
Message 11 of 22
(2,084 Views)

What's the meaning of "isolate"? Just the get the max and min value?

0 Kudos
Message 12 of 22
(2,083 Views)

Yes, yes I need before all the values of the slope and then only the max and the minimum values of the slope

0 Kudos
Message 13 of 22
(2,081 Views)

@Gquadro wrote:

Yes, yes I need before all the values of the slope and then only the max and the minimum values of the slope


 

"array min&max" will do that for you. Have you tried?

 

(Of course a good programmer will not need to keep all values first just to only keep the min&max at the end. One would do a running min/max. The memory requirements will be N times lower.)

 

 

0 Kudos
Message 14 of 22
(2,071 Views)

Could you help me with this part? 

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

0 Kudos
Message 15 of 22
(2,064 Views)

Hi all,

 

Attached you can find my .vi

I have two 1D arrays called "x" and "y".

I need to do a linear regression of 60 elements per time and determine the maximum and the minimum angular coefficient of the straight line.

The linear regression has to be done as follow:

1) linear regression for the data from #0 to #59, save the angular coefficient in a new array called "CA" in the position (0,0)

2) linear regression for the data from #1 to #60, save the angular coefficient  in the array "CA" in the position (1,0)

3) linear regression for the data from #2 to #61, save the angular coefficient  in the array "CA" in the position (2,0)

... till the end of the data into the 1D arrays.

 

Please Help ME

0 Kudos
Message 16 of 22
(2,063 Views)

Hi Gquadro,

 

what's the point to start a new thread for the very same topic?

 


@Gquadro wrote:

The linear regression has to be done as follow:

1) linear regression for the data from #0 to #59,

2) linear regression for the data from #1 to #60,

3) linear regression for the data from #2 to #61,


Use the PtByPt-DataQueue with a length of 60…

Best regards,
GerdW


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

could you show me how to do? 

0 Kudos
Message 18 of 22
(2,050 Views)

Sure:

check.png

Best regards,
GerdW


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

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

0 Kudos
Message 20 of 22
(2,042 Views)