Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Thread Subject:
ls lists the contents of current folder

Subject: ls lists the contents of current folder

From: imagevision

Date: 14 Sep, 2012 10:08:08

Message: 1 of 2

Dear All,
Please suggest something on the ls command of matlab in windows and unix.

list = ls(name) returns the files and folders in the current folder that match the specified name to list.
as shown in

Output Arguments
1)On UNIX platforms, list is a character row vector of names separated by tab and space characters.
2)On Microsoft Windows platforms, list is an m-by-n character array of names—m is the number of names and n is the number of characters in the longest name. MATLAB pads names shorter than n characters with space characters.

how i can get
list = ls(name)
similar to that of windows?

and advance thanks

Subject: ls lists the contents of current folder

From: Bruno Luong

Date: 14 Sep, 2012 12:33:07

Message: 2 of 2

Use functions such as "ispc islinux computer" to know the system, then convert your data appropriately.

Also take a look at "dir" command.


Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us