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,944
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
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




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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.