how to sort push button
Show older comments
i have 10 number of folders. when i run the main.m file the folders shows like 10 number of push buttons. the push button having the names of that folder. now i need to sort the push buttons by folder created date, please help me. thanks in advance
Accepted Answer
More Answers (2)
Jan
on 17 Jul 2013
0 votes
- Obtain the creation date of the folders by dir. The replied field datenum is the best value to sort for.
- Let sort find the wanted order.
- Set the strings according to this order.
If you need a more explicit implementation, show us, what you have done so far and ask more explicitly for a specific problem.
3 Comments
Jan
on 17 Jul 2013
Where did you get these names from? I guess you use the DIR command, and then you can use the .datenum field directly for sorting also. Please provide the relevant part of the code, because we cannot guess how you create this list of names.
win
on 18 Jul 2013
Categories
Find more on Shifting and Sorting Matrices in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!