Too many input arguments.

21 vues (au cours des 30 derniers jours)
silumpa arnu
silumpa arnu le 6 Déc 2018
% 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 commentaire
Kevin Chng
Kevin Chng le 6 Déc 2018
there is double cd.
eval(sprintf('cdcd %s', cfileDir));
However, why do you use eval?

Connectez-vous pour commenter.

Réponses (2)

Walter Roberson
Walter Roberson le 6 Déc 2018
your work directory name contains a space.
you should recode without eval()

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

Catégories

En savoir plus sur Write C Functions Callable from MATLAB (MEX Files) dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by