Arranging Data based on relationship different columns
显示 更早的评论
Hi, I have two set of data that I am trying to "merge". To "merge" them, I have to take into consideration, two columns in one of the set, and one column in the other set. Let's say in Data set 1, I have column A and column C. In the second set of data, I have column B. I want to arrange the data into one so that the numbers in each of the row of column B is less or equal to the numbers in each row of column A, and more than the numbers in each row of column C: ColumnA< ColumnB< ColumnC.
I was wondering if there was a function in Matlab that would help me with that. It is kind of complicated.
Thank you.
回答(1 个)
dpb
2014-6-25
X=sort([A B C],2,'ascend');
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!