直奔主题,需要保存处理图像的文件名(string)数组。本文只用作自己的实验记录,侵删。
搬运自matlab官网的代码:https://www.mathworks.com/matlabcentral/fileexchange/7601-cell2csv?s_tid=mwa_osa_a
以下为MATLAB cell array to csv的函数实现:
function cell2csv(filename,cellArray,delimiter)
% Writes cell array content into a *.csv file.
%
% CELL2CSV(filename,cellArray,delimiter)
%
% filename = Name of the file to save. [ i.e. 'text.csv' ]
% cellarray = Name of the Cell Array where the data is in
% delimiter = seperating sign, normally:',' (it's default)
%
% by Sylvain Fiedler, KA, 2004
% modified by Rob Kohr, Rutgers, 2005 - changed to english and fixed delimiter
if nargin<3
delimiter = ',';
end
datei = fopen(filename,'w');
for z=1:size(cellArray,1)
for s=1:size(cellArray,2)