|
12345678910111213141516171819 |
- function [matrix] = SaveIntMatrixToFile(fullFileName, matrix, numNodes)
-
- n = size(matrix,1);
- m = size(matrix,2);
-
- fileID = fopen(fullFileName,'w');
-
- if nargin >= 3
- fprintf(fileID,'%%Nodes\t%d\n',numNodes);
- end
-
- for i=1:n
- for j=1:m
- fprintf(fileID,'\t%d',matrix(i,j));
- end
- fprintf(fileID,'\n');
- end
-
- fclose(fileID);
|