How to work on fprintf in fopen?
1 次查看(过去 30 天)
显示 更早的评论
Hi team,
I am using following code
[ftxt,msg] = fopen([textpath keyword '_summary.txt' ],'w');
fprintf(ftxt, 'Summary sheet of %12s\n\n', TR);
and i am getting error as
Error using fprintf
Invalid file identifier. Use fopen to generate a valid file identifier.
Please help me solving this problem.
0 个评论
回答(1 个)
Wayne King
2013-12-23
What is msg? That is the system-dependent error message returned by fopen. I'm assuming the value of txt is -1 meaning the fopen() operation did not work.
2 个评论
Wayne King
2013-12-23
I'm afraid you need to provide us with more information than you have given. Are we supposed to know what textpath is or keyword?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Audio and Video Data 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!