Path priority in compiled application

1 view (last 30 days)
Nicola Carrer
Nicola Carrer on 22 Mar 2019
Hello,
I have some code that works differently in the workspace and in a compiled application. The code uses the finantial toolbox but we re-implemented holidays.m to avoid using the default NYSE definition without passing the alternative non-banking days in all the calls to the financial toolbox date-related functions. Our version of holidays.m sits on a path that has higher priority than the standard path. The code below can be used as a simple example:
which('holidays');
dt = datenum('19.02.2018', 'dd.mm.yyyy'); % President's day
disp(['Is ' datestr(dt) ' a business day? ' num2str(isbusday(dt))]);
dt = datenum('16.03.2019', 'dd.mm.yyyy'); % Saturday
disp(['Is ' datestr(dt) ' a business day? ' num2str(isbusday(dt))]);
dt = datenum('18.03.2019', 'dd.mm.yyyy'); % Normal monday
disp(['Is ' datestr(dt) ' a business day? ' num2str(isbusday(dt))]);
The result on the workspace (ML2018b) is:
2019-03-22_12h19_26.png
It should be notices that using the ML2015b compiler the code works in the same way, once you include the specific implementation of holidays.m in the "Files required" as shown below:
2019-03-22_12h36_49.png
2019-03-22_12h38_29.png
This is NOT the case when we compile the code in ML2018b:
2019-03-22_12h44_13.png
2019-03-22_12h46_38.png
In the ML2015b compiler the "required files" have precedence over the toolbox functions with the same name. In ML2018b it's not the case.
Is it a bug in ML2018b? Is there a workaround (e.g. a MCC option to specify the path priority)?
Any help on this question would be greatly appreciated.
Best regards,
Nicola

Answers (0)

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!