Skip to content

DEVAL bug when used with MCR #2

@Arrowstar

Description

@Arrowstar

There's a bug in the implementation of RKN1210's deval() function. If users are running the code from the MATLAB Compiler Runtime (MCR) environment, line 52 of the original function will fail because the MCR uses a slightly different path structure for the MATLAB implementation of deval. That line needs to be changed to read something like this:

        try
            cd(fullfile(matlabroot, 'toolbox', 'matlab','funfun')); %works if running MATLAB normally
        catch
            cd(fullfile(matlabroot, 'mcr', 'toolbox', 'matlab','funfun')); %works if running MATLAB via MCR: mcr\toolbox\matlab\funfun
        end

You could also replace the try/catch with a test for deployment (isdeployed()).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions