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
2018-12-6
there is double cd.
eval(sprintf('cdcd %s', cfileDir));
However, why do you use eval?
回答(2 个)
Walter Roberson
2018-12-6
0 个投票
your work directory name contains a space.
you should recode without eval()
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);
类别
在 帮助中心 和 File 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!