MATLAB: Error using RESHAPE but I’m not using reshape

errorMATLAB

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?

Best Answer

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.
Related Question