Why do I get the error message : "??? Index exceeds matrix dimensions" when trying to change directories?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
When I try to change my current directory by using the MATLAB Current Directory Field in the desktop toolbar or by using the CD function at the Command Line, I receive the following error :
??? Index exceeds matrix dimensions.
Respuesta aceptada
MathWorks Support Team
el 27 de Jun. de 2009
This enhancement has been incorporated in Release 14 Service Pack 2 (R14SP2). For previous product releases, please read below for any possible workarounds:
We have verified that there is a bug in MATLAB 7.0.1 (R14SP1) in the way that directories are changed when there is a variable defined in the workspace with the name 'cd'.
To work around this issue, rename the 'cd' variable and then clear it from the workspace using the following commands:
cd1 = cd;
clear cd;
You can now access the data that was in the 'cd' variable using 'cd1' and you can successfully change directories.
To avoid this error in the future, use variable names that are not same as function names.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Matrix Indexing 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!