% Use fprintf to create a spreadsheet
% Minas Spetsakis, Sep. 2018

fd =fopen('handmade.csv','w');
% We can also write the contents of the matrix using
%     writematrix(A,'handmade.csv');
A = rand(4)
fprintf(fd,'%f, %f, %f, %f\n',A');
fclose(fd);
% We can read the contents of the file with:
%   AA = readmatrix('handmade.csv')