Borrar filtros
Borrar filtros

cd funtion

7 visualizaciones (últimos 30 días)
Suzzie
Suzzie el 6 de Abr. de 2011
when you use cd funtion and the message you get is MCC use of cd funtion is problematic, what do you do?
  1 comentario
Laura Proctor
Laura Proctor el 6 de Abr. de 2011
Could you include the original code and error message?
MCC indicates that you are trying to use MATLAB Compiler. If that's the case, when you use CD, often you will want to use fully qualified path names when using CD.

Iniciar sesión para comentar.

Respuesta aceptada

Laura Proctor
Laura Proctor el 6 de Abr. de 2011
From Loren Shure's Blog on Writing Deployable Code by guest-blogger Peter Webb:
Don't rely on the current directory (cd) or changes to the MATLAB path (addpath) to control the execution of M-files. The path of a deployed application is determined at compiled time, and remains forever fixed. The current directory is never on the path in a deployed application. In the code below, cd-ing to the stringFcns directory does not make stringFcns/add shadow mathFcns/add. The order of these functions at runtime depends on what their order was at compile time. This causes errors.
  3 comentarios
Suzzie
Suzzie el 6 de Abr. de 2011
this is the code
Aurelien Queffurust
Aurelien Queffurust el 7 de Abr. de 2011
From your example , avoiding the CD function is easy
dir accepts a directory as input argument:
r = dir(imgdir);
do the same with the save function and destdir folder

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Environment and Settings en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by