Home Ordering numbers into array in Matlab without linked list.
Reply: 0

Ordering numbers into array in Matlab without linked list.

user731
1#
user731 Published in May 24, 2018, 11:23 pm

I want to order a series of data , the amount of data is from 1 to n. I build a matrix size data*data. In each matrix cell, there is the connection between the data in col and rows IJ. For example in 21, there is the connection between data(2) compared to data(1). If the number is negative it means that the data(2) is supposed to be before data(1) Example below: A is the matrix of the data: [ 0 -20449 0 ; 19689 0 -18705 ; 0 17667 0 ]

At first I recognize that the number in A(1,2) is negative, So that means that my series now is changed from 1-2-3 to 2-1-3. And so on, unfortunaley I can’t come up with a code that don’t mess this series.

Notice the final result should be 3-2-1

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.419047 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO