필터 지우기
필터 지우기

I have problem with empty string B in this code

조회 수: 1 (최근 30일)
wissa amer
wissa amer 2013년 6월 24일
if true
[a1,a2]=unique(c');%c is two dimension array
[d1 idx]=sort(a2);
a1=a1(idx);
for ii=1:length(a1)
B{1,ii}=a1(ii);
[r c]=find(a==a1(ii));
for jj=1:length(r)
B{jj+1,ii}=['(',num2str(r(jj)),',', num2str(c(jj)),')'];
end
end
end
end
when i want to store B in text file error empty string why ?
  댓글 수: 2
Jan
Jan 2013년 6월 24일
Please post the complete error message. "When I want to store B in a text file" does not allow to understand, what you are doing exactly.
Image Analyst
Image Analyst 2013년 6월 24일
Give a small example of c so we can run your code. My guess is that you are never entering the for loop to assign B, however in that case it should say that B is undefined, not empty. How are you doing the write to the file? With fprintf()???

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by