Using wildcard character in system command

I'm using 2012b Release & having problem with using wildcard symbol(*) with a system command.
eg:
>> [status ,out]=system('dir *.mat')
status =
1
out =
Directory of C:\Users\sample\Documents\MATLAB
File Not Found
Similarly the inbuilt matlab function has the same error
dir('*.mat')
'*.mat' not found.
However it works When the *. portion is removed

답변 (1개)

Star Strider
Star Strider 2014년 8월 7일

0 개 추천

Both:
[status ,out]=system('dir *.mat')
and:
A = dir('*.mat')
work in R2014a. Without the ‘*.’ wildcard, it fails in both.

카테고리

도움말 센터File Exchange에서 Functions에 대해 자세히 알아보기

제품

질문:

2014년 8월 7일

답변:

2014년 8월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by