LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calculate a slope with a 1D Array instead of a 2D Array.

In this vi, I would like to calculate for every Y (50 different amplitudes and 60 different times) the slope of the Ys according to the amplitude differences: Y(i+1)-Y(i)/X(i+1)-X(i) (X is the amplitude). Y is a 2D Array, how could I do this if Y is a 1D Array?
Summer
0 Kudos
Message 1 of 3
(2,960 Views)
Wire both 1-d arrays into a for loop set to go N-1 iterations, disable
indexing, index out i and i+1, subtract, subtract and divide, then enable
indexing the output so it will form the output 1d array. Your result will
necessarily have one less point than your input arrays.

"summer" wrote in message
news:50650000000800000005690000-1031838699000@exchange.ni.com...
> In this vi, I would like to calculate for every Y (50 different
> amplitudes and 60 different times) the slope of the Ys according to
> the amplitude differences: Y(i+1)-Y(i)/X(i+1)-X(i) (X is the
> amplitude). Y is a 2D Array, how could I do this if Y is a 1D Array?
> Summer
0 Kudos
Message 2 of 3
(2,960 Views)
Hi Asimpleman,

Thanks a lot for your help. Well, I'm a simple woman who has got problems with Labview. I've tried to follow your explanations, but I must have done something wrong.
Summer
0 Kudos
Message 3 of 3
(2,960 Views)