Error using fopen
1 回表示 (過去 30 日間)
古いコメントを表示
Hi,
I'm using the following command in a for-loop:
imwrite(x,strcat('L_',num2str(c),'_m.bmp'),'bmp');
And, getting the following error:
Error using fopen
File name must be a vector of type char.
Error in imwrite (line 453)
fid = fopen(filename, 'a');
Error in fuzzycmeans (line 83)
imwrite(x,strcat('L_',num2str(c),'_m.bmp'),'bmp');
Why is that? How can I fix this issue?
Thanks.
0 件のコメント
回答 (1 件)
Star Strider
2014 年 8 月 25 日
As a troubleshooting step, run this line:
flnm = strcat('L_',num2str(c),'_m.bmp')
just before your imwrite call and see what the result is.
2 件のコメント
Star Strider
2014 年 8 月 27 日
What does ‘flnm’ produce? Is it ‘a vector of type char’?
If you do:
cn = class(flnm)
what is the result?
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!