summaryrefslogtreecommitdiffstats
path: root/SD-VBS/common/matlab/writeMatrix.m
blob: ec2bbaedea68c758ec5fca88e9c142094a677bb0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function writeMatrix(input, inpath)

file = [inpath '/expected.m'];
disp(file);
fd = fopen(file, 'w');

[rows, cols] = size(input);

for j=1:rows
    for i=1:cols
        fprintf(fd, '%d\t', input(j,i)-1);
    end
    fprintf(fd, '\n');
end
fclose(fd);

end