how to get the string inside exist ?
古いコメントを表示
Hi, I wanted to search the file names sequentially inside a directory (Note:I haven't included its logic here). Right now my concern is how to read the string '1.png' inside the command 'exist'. so that fname will return a 0 or 2. Thank you.
%%%%%%%%%
val=1;
tmp=strcat(num2str(val),{'.png'});
% now how do i read this tmp inside exist. when i tried as shown below, i get: Undefined function 'exist' for input arguments of type 'cell'.
fname=exist(strcat(num2str(val),{'.png'}),'file');
%%%%%%%%%
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で File Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!