[fileName, filePath] = uiputfile('*.doc', 'Create a file:')if ~ischar(fileName)return;endfileID = fopen(fullfile(filePath, fileName), 'w');dx=100 %global
formatSpec = 'dx(m) '; %char
formatSpec2=0.005; %globalformatSpec2=num2str(formatSpec2) %charformatSpec2_2=100; %globalfprintf(fileID,'%3s %20s %30f\n',formatSpec,formatSpec2,formatSpec2_2)cellArray= 'p.4004' 'p.4005' 'p.4007' 'p.4009' cellArray 4x1 1240 cell global
%how can I write this cellArray into microsoft word as they appear?
fclose(fileID)
Best Answer