Why do I get the error message : "??? Index exceeds matrix dimensions" when trying to change directories?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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.
Akzeptierte Antwort
MathWorks Support Team
am 27 Jun. 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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!