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

GPmat implementation of fcnchk overrides MATLAB's built-in function of the same name #13

Open
sdatkinson opened this issue Jan 11, 2017 · 0 comments

Comments

@sdatkinson
Copy link

If one adds GPmat to MATLAB's path, then this causes the GPmat implementation of fcnchk to replace MATLAB's provided function named fcnchk. This causes errors if one needs to use fminunc, for example.

The following example code:

addpath('/path/to/GPmat');
myfunc = @(x) x^2;
x0 = 1;
fOpt = fminunc(myfunc, x0);

...produces the following output:

Error using fcnchk
Too many output arguments.

Error in optimfcnchk (line 83)
    [funfcn, idandmsg] = fcnchk(funstr,lenVarIn); %#ok<DFCNCHK>

Error in fminunc (line 249)
   funfcn = optimfcnchk(FUN,'fminunc',length(varargin),funValCheck,gradflag,hessflag);

Using MATLAB R2016b.

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

1 participant