The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Sorting the name field in dir commnad
Replies: 7   Last Post: Jul 17, 2013 9:43 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Steven Lord

Posts: 18,038
Registered: 12/7/04
Re: Sorting the name field in dir commnad
Posted: Jul 17, 2013 9:43 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Christopher Foy" <> wrote in message
> "Basim Kakakhel" wrote in message <iaqlb3$aks$>...
>> Hello
>> I have to upload CT images from my local drive. I am using the dir
>> command. In one of the data sets the OS is giving the names back in
>> random order and for my problem i need them to be sorted.
>> A=dir('C:/Documents and Settings/n6753388/My Documents/MATLAB/Gel_3')
>> Now if i do C=sort(

[~, indices] = sort({});
B = A(indices)

Steve Lord
To contact Technical Support use the Contact Us link on

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.