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
(10,497 Views)

Bubble sort? Swap value function?

0 Kudos
Message 3 of 22
(10,477 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
(10,469 Views)

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

0 Kudos
Message 5 of 22
(10,463 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
(10,420 Views)

Why that doesnt work? ://

 

Download All
0 Kudos
Message 7 of 22
(10,388 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
(10,354 Views)

Ok i done. Anyone can tell me is ok?

Message 9 of 22
(10,341 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
(10,334 Views)