susanex2texas
Computer
- May 6, 2009
- 1
Hello, everyone! Just a quick question. Here is some code:
fprintf(fid, '# BEGIN OUTPUT r (submodular) matrix\n');
dlmwrite('bdc', r, '-append', 'delimiter', '\t');
fprintf(fid, '# END OUTPUT r matrix\n');
fprintf(fid, '# BEGIN OUTPUT mother matrix\n');
dlmwrite('bdc', mother, '-append', 'delimiter', '\t');
fprintf(fid, '# END OUTPUT mother matrix\n');
Unfortuneatly, this code prints out:
# BEGIN OUTPUT r (submodular) matrix
# END OUTPUT r matrix
# BEGIN OUTPUT mother matrix
# END OUTPUT mother matrix
2
.... (data of r matrix and then mother matrix)
I'm not sure what is happening here... any ideas? dlmwrite doesn't lock until it finishes? dlmwrite does not transfer the file position information to the file handle?
Any ideas? This is just curious! Thank you!
Susan
fprintf(fid, '# BEGIN OUTPUT r (submodular) matrix\n');
dlmwrite('bdc', r, '-append', 'delimiter', '\t');
fprintf(fid, '# END OUTPUT r matrix\n');
fprintf(fid, '# BEGIN OUTPUT mother matrix\n');
dlmwrite('bdc', mother, '-append', 'delimiter', '\t');
fprintf(fid, '# END OUTPUT mother matrix\n');
Unfortuneatly, this code prints out:
# BEGIN OUTPUT r (submodular) matrix
# END OUTPUT r matrix
# BEGIN OUTPUT mother matrix
# END OUTPUT mother matrix
2
.... (data of r matrix and then mother matrix)
I'm not sure what is happening here... any ideas? dlmwrite doesn't lock until it finishes? dlmwrite does not transfer the file position information to the file handle?
Any ideas? This is just curious! Thank you!
Susan