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

DEVAL bug when used with MCR #2

Open
Arrowstar opened this issue Mar 17, 2022 · 0 comments
Open

DEVAL bug when used with MCR #2

Arrowstar opened this issue Mar 17, 2022 · 0 comments

Comments

@Arrowstar
Copy link

Arrowstar commented Mar 17, 2022

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()).

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