Path priority in compiled application
1 回表示 (過去 30 日間)
古いコメントを表示
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:

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:


This is NOT the case when we compile the code in ML2018b:


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
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で MATLAB Compiler についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!