The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: eigs display error
Replies: 1   Last Post: Mar 27, 2013 5:24 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
Steven Lord

Posts: 18,038
Registered: 12/7/04
Re: eigs display error
Posted: Mar 27, 2013 5:24 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Nick " <> wrote in message
> It looks like there is a typo in the eigs function (I'm using R2012a on
> windows7)
> From line 1349: innerstr =
> getString(message('MATLAB:eigs:PrintTimingsComputeAX',sprinf('%f',cputms(3))));
> It says "sprinf" rather than "sprintf".
> An error occurs when running the following code, specifically with display
> level 2
> A=rand(900); A=A'*A;
> opts.disp=2; opts.v0 = ones(size(A,1),1);
> [V,D]=eigs(A,[],1,'lm',opts);
> This is the output:
> Iteration 1: a few Ritz values of the 20-by-20 matrix:
> 0
> Undefined function 'sprinf' for input arguments of type 'char'.
> Error in eigs/printTimings (line 1349)
> innerstr =
> getString(message('MATLAB:eigs:PrintTimingsComputeAX',sprinf('%f',cputms(3))));
> Error in eigs (line 415)
> printTimings;
> Has anyone else experienced this issue and know how to fix it?

Yes, this is a typo in the EIGS function. It has been fixed in release

> I tried modifying the eigs.m source file but it wouldn't allow me (said
> access denied).

That suggests to me that you're using a central installation maintained by
your IT staff. If that is the case, ask your IT staff to add the missing 't'
to that line of eigs.m or to give you file access permission to modify that
file so you can fix it, then execute this command in MATLAB so the toolbox
cache is updated to reflect the fix:

rehash toolboxcache

Other solutions include turning down the display level to level 1 (if you
don't need the timing information) or (involving _slightly_ more work :)
upgrading to release R2013a.

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 at NCTM 1994-2018. All Rights Reserved.