Skip to content

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

@sdatkinson

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.

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