Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: spdiags() “Index exceeds matrix dimensions.”ask for help??
Replies: 1   Last Post: Nov 18, 2012 11:53 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Steven Lord

Posts: 17,945
Registered: 12/7/04
Re: spdiags() “Index exceeds mat
rix dimensions.”ask for help??

Posted: Nov 18, 2012 11:53 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"dfd ssss" <herosyl@126.com> wrote in message
> 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


*snip code*

Steve Lord
To contact Technical Support use the Contact Us link on

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum 1994-2015. All Rights Reserved.