LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How sort array without using Sort 1d Array?

Anyone can help me how sort array without Sort 1d Array function? Wich sorting is easiest to make in VI and how start?

0 Kudos
Message 1 of 22
(9,797 Views)

Bubble sort? Swap value function?

0 Kudos
Message 3 of 22
(9,777 Views)
Take your pick. Bubble sort is basic and easy to implement. It was one that I remember from my intro to programming class. Sounds like you have to do the same in your class though you aren't using Fortran and an IBM 360 like I did.;-)
0 Kudos
Message 4 of 22
(9,769 Views)

I dont know how insert x' to Array[0] and y' to Array[1]. Some help?

0 Kudos
Message 5 of 22
(9,763 Views)

Replace Array Subset.

 

You may also find the In Place Element Structure more useful for manipulating the array elements.

0 Kudos
Message 6 of 22
(9,720 Views)

Why that doesnt work? ://

 

Download All
0 Kudos
Message 7 of 22
(9,688 Views)

You only coded the inner loop of a bubble sort where you bubbled the single largest value to the end.

 

There is another loop outside of that that works on ever smaller sections of the array.

0 Kudos
Message 8 of 22
(9,654 Views)

Ok i done. Anyone can tell me is ok?

Message 9 of 22
(9,641 Views)

Why don't you tell us if it is OK - put some test data in and see if it comes out sorted or not. You could even run your algorithm alongside the Sort 1D Array function and check you get the same result.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 10 of 22
(9,634 Views)