Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
|
|
Re: spdiags() “Index exceeds mat rix dimensions.”ask for help??
Posted:
Nov 18, 2012 11:53 PM
|
|
"dfd ssss" <herosyl@126.com> wrote in message news:k8b9n2$6hd$1@newscl01ah.mathworks.com... > I just want to form a block tridiagonal matrix(DOWN is sub M in the > middle,UP is sup),however, every time I used spdiags() ,it gave me a > message ?Index exceeds matrix dimensions.?,I don't know why and I'm a > beginner of matlab,hopefully, someone can give me a hand,thank you very > much!
Set an error breakpoint then run your code. MATLAB will stop on the line where the error occurs. Look at all the variables into which you're indexing on that line and the indices you're using and see which indices are too large.
http://www.mathworks.com/help/matlab/matlab_prog/debugging-process-and-features.html
*snip code*
-- Steve Lord slord@mathworks.com To contact Technical Support use the Contact Us link on http://www.mathworks.com
|
|
|
|