if ~ischar(fileName)
return;
end
fileID = fopen(fullfile(filePath, fileName), 'w');
cellArray=
'p.4004''p.4005''p.4007' cellArray 3x1 cell global
matrix=[1 2 3;4 5 6;7 8 9]
%I can write these values separetely into word like this;
fprintf(fileID,'%47f %f \n',matrix') fprintf(fileID,'%s\n',cellArray{:})
%but I need to write them together into microsoft word like this;
p.4004 1 2 3 p.4005 4 5 6p.4007 7 8 9
Best Answer