copyfileを用​いたファイルのコピー​にstrcatを用い​る方法

複数のフォルダに同一ファイルをコピーしようと考え、以下のプログラムを作成したところ無効なオプションです。といったエラーが発生しました。 どのように修正をすれば、複数のフォルダを指定できるでしょうか。
select = 1; %0 HysOnebit 1 ditherOnebit 2 ditherHysOnebit 3 ditherHysCansOnebit 4 ditherCansOnebit
dither_value =[1/4 1/8 1/16 1/32 1/64];
gain = 0;
parfor i =1:length(dither_value)
now_dither = dither_value(1,i);
ditherfoldername = strcat('select','_',num2str(select),'_gain',num2str(gain),'_',num2str(now_dither));
copyfile ad* myFolder ditherfoldername
copyfile Onebit* myFolder ditherfoldername
copyfile input* myFolder ditherfoldername
end

 采纳的回答

copyfile('ad*', fullfile(myFolder, ditherfoldername));

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by