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 comentario

Kevin Chng
Kevin Chng el 6 de Dic. de 2018
there is double cd.
eval(sprintf('cdcd %s', cfileDir));
However, why do you use eval?

Iniciar sesión para comentar.

Respuestas (2)

Walter Roberson
Walter Roberson el 6 de Dic. de 2018

0 votos

your work directory name contains a space.
you should recode without eval()
Image Analyst
Image Analyst el 8 de Ag. de 2022

0 votos

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

Categorías

Más información sobre Write C Functions Callable from MATLAB (MEX Files) en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 6 de Dic. de 2018

Respondida:

el 8 de Ag. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by