Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tfocs_initialize bug #7

Closed
Martinchen2015 opened this issue May 4, 2017 · 3 comments
Closed

tfocs_initialize bug #7

Martinchen2015 opened this issue May 4, 2017 · 3 comments

Comments

@Martinchen2015
Copy link

When I run matrix completion solver on Matlab 2016b or newer, it gave the following error info:
Error using nargin
You can only call nargin/nargout from within a MATLAB function.

Error in tfocs_initialize (line 43)
if nargin < 1 || ( nargin ==1 && isstruct( smoothF ) )

Error in tfocs_AT (line 13)
tfocs_initialize

Error in tfocs (line 105)
[ varargout{1:max(nargout,1)} ] = feval( [ 'tfocs_', alg ], smoothF, affineF, projectorF, x0, opts );

Error in tfocs_SCD (line 118)
[ z, odata, opts ] = tfocs( smoothF, affineF, dualproxF, z0, opts );

Error in solver_sNuclearBP (line 82)
tfocs_SCD( prox, { A, -b }, proj_Rn, mu, x0, z0, opts, varargin{:} );

Error in P3 (line 20)
Xk = solver_sNuclearBP( {N,N,omega}, observations, mu );

However, the same code works well on version 2015b. I did not try version by version but the bug seems happen because the way Matlab platform identity script or function has changed in some newer release.

@matthewoshaughnessy
Copy link

matthewoshaughnessy commented Jun 21, 2017

I just ran into this same issue (using R2016b) and was able to solve it by adding tfocs_nargin = nargin; tfocs_nargout = nargout; immediately before tfocs_initialize is called in tfocs_AT.m, then replacing all instances of nargin with tfocs_nargin and nargout with tfocs_nargout in tfocs_initialize.m. That was enough to solve the issue for me, but maybe there are other places in the package that need a similar fix.

@stephenbeckr
Copy link
Collaborator

Thanks to both of you for noticing. Someone else noticed earlier and we actually pushed a fix to github in November, and the recent "2017 release" v1.4.1 .zip on github contains this fix, so download the most recent version of TFOCS should fix it. I did notice that our link to the zip file on cvxr.com is an old one (http://cvxr.com/tfocs/download/) that points to the buggy version, so I will update that link!

@matthewoshaughnessy
Copy link

Thank you Stephen!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants