Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 66985

Comparing elements of array with previous ones and insert index of elements where v[i+1]

$
0
0

Hi,

i'm new to Labview. I'd like to get some helps to solve this kind of problem. I've got an array of integer in input and i must compare every element with previous one. If the element in i-th position is less than previous(i-1 th) then i must insert index of this element in another array in output, else if the element in i-th position is greather than previous(i-1 th) then i must insert zero in output array.

 

Example

Array in input=[1,36,2,3,43,6,8,1]

Array in output=[0,2,0,0,5,0,7]

 

 

Any helps would be kindly appreciated. Thank you so much.


Viewing all articles
Browse latest Browse all 66985

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>