필터 지우기
필터 지우기

Undefined function or method 'CellToString' for input arguments of type 'cell'.

조회 수: 3 (최근 30일)
C Shen
C Shen 2011년 9월 20일
Hi All In a class of handle type. There is a method CelltoString() I could not understand what is wrong in the code below. Any idea will be appreciated.
Where CellToString is a function defined in the same .m file.
I also tried
function str=CellToString(obj, odata)
%.....
end
function str = ToString(d)
if iscell(d)
s = CellToString(d);
str = sprintf('[%s]',s);
else
if isnumeric(d)
str = num2str(d);
elseif ischar(d)
str = d;
end
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function str = CellToString(odata)
%do converting cell to string here,
end

답변 (1개)

Wayne King
Wayne King 2011년 9월 20일
Hi, What is CellToSTring? That is not a MATHWORKS' function. If that is a function you have written or somebody has given you, then make sure the folder (directory) that function is in is on the MATLAB search path.
Use addpath
or pathtool
to add the path.
  댓글 수: 1
C Shen
C Shen 2011년 9월 21일
CellToString() is a function I defined in the same .m file of calling function ToString()

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

카테고리

Help CenterFile Exchange에서 Search Path에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by