キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

Processing array elements

I would like to calculate the least-squares slope and intercept of a 2d array of numbers during a continuous analog input measurement, in order to scale that input.

If I extract the x and y arrays using 'Index Array' and then use the 'Linear Fit Coefficients.vi', I can get the slope and intercept, but if I subsequently change the array elements, no recalculation of the slope and intercept occurs.

Alternatively, if I place the 'Linear Fit Coefficients.vi' etc inside an event structure inside a while loop, the slope/intercept are calculated when the array is changed, but not when the VI is first executed.

How can I process the array as soon as the VI commences AND when the array is changed?
0 件の賞賛
メッセージ1/2
2,520件の閲覧回数
How about putting the array processing in a loop outside the event
structure and using e.g. a notifier to tell the loop when to repeat?
0 件の賞賛
メッセージ2/2
2,520件の閲覧回数