How to check exist by function if a particular file to another folder in the directory ?
1 回表示 (過去 30 日間)
古いコメントを表示
Hello,
I would like to know how you could use the exist function to check whether a particular file in another folder or directory because of the way I do it gives me error and do not know if I 'm doing it right ... I could you help ?
matlab_dir = [ pwd filesep ] ;
cp = [ matlab_dir 'lib / '] ; % lib is the folder where the .wav files that I want to see if there are .
exist ( { [ cp ' example.wav '] , matlab_dir } )
thanks in advanced!
Undefined function ' exist ' for input arguments of type ' cell' .
1 件のコメント
Karan Gill
2016 年 7 月 6 日
編集済み: Karan Gill
2016 年 7 月 6 日
The curly brackets {} convert your input to a cell array. exist does not accept cell array input so you get an error. Instead, follow the syntax on the doc page: http://www.mathworks.com/help/matlab/ref/exist.html .
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で File Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!