Skip to content

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

Description

@sdatkinson

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions