필터 지우기
필터 지우기

what is the difference between dir and ls

조회 수: 19 (최근 30일)
John
John 2016년 5월 4일
답변: Adam 2016년 5월 4일
Is there a difference between dir and ls?

채택된 답변

Adam
Adam 2016년 5월 4일
Using the syntax
list = ls(...)
vs
list = dir(...)
gives a very different result. The former just gives you a character array of the names, the latter gives you a struct which contains information about the date modified, byte size and whether or not the particular element of the listing is a folder.
When used without return type both just give a listing of folder/file names within the given folder and no further information.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by