Too many input arguments.

조회 수: 21 (최근 30일)
silumpa arnu
silumpa arnu 2018년 12월 6일
답변: Image Analyst 2022년 8월 8일
% compile a c file
cfileDir = fullfile(workDir, 'ElasticMeasure', 'DanEllis');
eval(sprintf('cdcd %s', cfileDir));
mex dpcore.c;
eval(sprintf('cd %s', workDir));
Command window:
Error using cd
Too many input arguments.
Help me please.
  댓글 수: 1
Kevin Chng
Kevin Chng 2018년 12월 6일
there is double cd.
eval(sprintf('cdcd %s', cfileDir));
However, why do you use eval?

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

답변 (2개)

Walter Roberson
Walter Roberson 2018년 12월 6일
your work directory name contains a space.
you should recode without eval()

Image Analyst
Image Analyst 2022년 8월 8일
Don't use eval. Try it this way:
cfileDir = fullfile(workDir, 'ElasticMeasure', 'DanEllis');
cd(cfileDir);
mex dpcore.c;
cd(workDir);

카테고리

Help CenterFile Exchange에서 Write C Functions Callable from MATLAB (MEX Files)에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by