function writeColMajMat(filename, a) % function writeColMajMat(filename, a) % Write matrix / vector to column major format (to use with plapack) % 26.3.2003 Antti.Vanne@uku.fi fid = fopen(filename, 'w', 'l'); disp('Saving matrix'); fwrite(fid, size(a,1), 'int'); fwrite(fid, size(a,2), 'int'); fwrite(fid, a(:), 'double'); fclose(fid);