MATLAB Answers

Translated by

このページのコンテンツは英語から自動翻訳されています。自動翻訳をオフにする場合は「<a class="turn_off_mt" href="#">ここ</a>」をクリックしてください。

0

Why is the Matlab R2015a Coder not able to generate code from resample function - but Matlab 2016b Coder is?

Daniel Burger さんによって質問されました 2018 年 3 月 1 日
最新アクティビティ Daniel Burger さんによって 編集されました 2018 年 3 月 20 日
Hi everybody, I try to generate C++ Code from my function but I cant use the resample function (it always ends with err "coder.const could not reduce this expression to a constant: Time out exceeded.") although I declare each input as a constant and i have licensed the USP System Toolbox ( license checkout signal_blocks == true). Also I ran the same code with the Matlab 2016b Coder and generated my C++ Code without any problem. So where is the difference? Best regards
My code looks like this:
Q=1000000;
% P=floor(Resampling_Faktor*Q); % floor: rounds to the nearest integer
P = 500000; % for testing
Input=1:0.1:20; % for testing
Input = resample(Input,P,Q,5,20);

  0 件のコメント

サインイン to comment.

2 件の回答

回答者: Venkata Siva Krishna Madala 2018 年 3 月 20 日
 採用された回答

Hello Daniel,
Try to increase Constant Folding Timeout value.This can be done in two ways:
1. At the command line, create a configuration object for code generation. Set the property ConstantFoldingTimeout to the value that you want, like 400000:
c = coder.confi;
c.ConstantFoldingTimeout = 4e5;
2. In the Project Settings dialog box, on the All Settings tab, set the field Constant folding timeout to the value that you want.
Regards,
Krishna Madala

  0 件のコメント

サインイン to comment.


回答者: Daniel Burger 2018 年 3 月 20 日
編集済み: Daniel Burger 2018 年 3 月 20 日

Dear Krishna, thanks for your advice. So do you mean that the failing code generation doesnt depend on my MATLAB version but instead on the system? Since I used two differend machines with different performance to run both MATLAB versions i mentioned above and therefore on the slower machine the time ran out before code generation was successful?
Regards, Daniel

  0 件のコメント

サインイン to comment.



Translated by