It stopped giving me the error and I didn't change anything. It was really weird, I just deleted a file that uses reshape but that it has nothing to do with the function I'm running and it's not even in the same folder. I don't know what happened but it's fine now.
Error using RESHAPE but I'm not using reshape
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
When executing one of my functions I'm getting:
Error using reshape To RESHAPE the number of elements must not change.
But my function doesn't even use reshape, any ideas of what is going on here? I mean, what other MATLAB function am I maybe using incorrectly that could be throwing this error?
5 Kommentare
Cedric
am 23 Jul. 2013
I don't think that Jan wanted to suggest that you were lying, but sometimes when we debug code, we check things out by e.g. commenting a few lines at different/random places, and we end up being unable of reproducing the bug when we want to ;-)
Akzeptierte Antwort
Sean de Wolski
am 22 Jul. 2013
dbstop if error
Then run your code. This will stop with the debugger on the offending line and you will be able to see what is happening.
1 Kommentar
per isakson
am 23 Jul. 2013
Make it a habit to use the debugger. It's good. Here are some links on debugging in Matlab
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Function Creation 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!