필터 지우기
필터 지우기

Error using fopen

조회 수: 2 (최근 30일)
med-sweng
med-sweng 2014년 8월 25일
댓글: Star Strider 2014년 8월 27일
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.

답변 (1개)

Star Strider
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
med-sweng
med-sweng 2014년 8월 27일
Thanks for your reply. Sorry, still the same issue.
Star Strider
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 CenterFile Exchange에서 Low-Level File I/O에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by