"Nick " <email@example.com> wrote in message news:firstname.lastname@example.org... > 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 R2013a.
> 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:
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.