MATLAB: Increasing floating point for cellfun function

cellfunfprintf

cellArray1_1 =
[1] [38.583118749173565] [32.905715386802711] [36] '36S' [1.000000830761463]
[1] [38.583118749173565] [32.905715386802711] [36] '36S' [1.000000830761463]
Name Size Bytes Class Attributes
cellArray1_1 10x6 7180 cell global
c=cellfun(@num2str,cellArray1_1,'un',0)
[n,m]=size(c)
form=[repmat('%s ',1,m) ' \r\n']
for k=1:n
fprintf(fileID, form, c{k,:});
end
fclose(fileID);
%These codes writes cellArray1_1 into doc but number of digits to the right of the decimal point is 4, like 38.5831. I need to increase the floating point like 8.

Best Answer

Why don't you just use %.8f instead of %s?????