Too many input arguments.

% 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 日

0 投票

your work directory name contains a space.
you should recode without eval()
Image Analyst
Image Analyst 2022 年 8 月 8 日

0 投票

Don't use eval. Try it this way:
cfileDir = fullfile(workDir, 'ElasticMeasure', 'DanEllis');
cd(cfileDir);
mex dpcore.c;
cd(workDir);

カテゴリ

ヘルプ センター および File ExchangeWrite C Functions Callable from MATLAB (MEX Files) についてさらに検索

質問済み:

2018 年 12 月 6 日

回答済み:

2022 年 8 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by