Ok, thanks to Walter Roberson advice to use mat2str Matlab function, I manage to obtain what I was looking for.
One of the first thing it that if the fields are separated with tabs \t, then the file things are saved into has to be .tsv and not a .csv like I was trying to do.
Second, mat2str is pretty neat. Here is the minimal code I used:
datafilename='Data.tsv';% output file that we want
meanmatfiles = dir('mean*NEW.mat');%I am looking for particular files in this directory
fileID=fopen(datafilename,'w');%create the output file and opens it
for file = meanmatfiles'
ifile=ifile+1;
fname=meanmatfiles(ifile).name;disp(fname);%get the name of the current file
load(fname)
%% do something that computes the array 'times'
fileID=fopen(datafilename,'a');%append on each new line of the output file
videoname=[fname(strfind(fname,'2019'):strfind(fname,'4x_')+5),'.nd2'];%cropping the proper range of characters in the fname
fprintf(fileID,'%s\t%d\t%s\n',videoname,fps,mat2str(round(times)));%write the next line with the proper format
end
fclose(fileID)%close the output file
I left a couple lines that take advantage of a couple nice Matlab function which I believe would be usefull to some reader.
Hope this helps, and again, thank you Walter Robinson for your quick reply!