Question about ECG example: ex_ecg_sigprocessing

This example opens a simulink file. When I try to run it, it fails saying, "This requires the Fixed-Point Designer License." Specifically, it fails on the functions bitsll and bitsra. However, I can execute these functions from a Matlab commmand window. In addition, if I copy the code for the main function called by this example, QRSDetection.m, which calls bitsll and bitsra, the function runs without any problem.
If anyone has any ideas as to why this is occurring, I would appreciate your advice.
Thanks

 採用された回答

Walter Roberson
Walter Roberson 2015 年 12 月 31 日

0 投票

There is an oddity in the licensing for those functions.
You need the Fixed-Point Designer license in order to generate code that uses those functions, and generating code is done if you use Rapid Accelerator Mode (and possibly one of the other modes) or if you deploy the code.
However, I see hints from previous questions that for at least one of the modes of use of the functions, the functions can be used in interpreted mode, because some of the modes look like they are built in. So if you were to run the model unoptimized you might possibly not need the license.

3 件のコメント

Allan Moser
Allan Moser 2015 年 12 月 31 日
Thank you for your quick reply!
Your explanation makes a lot of sense. I didn't realize that Simulink automatically generates code. My use of Matlab dates back to the 80's, and unfortunately, my understanding of how it works also dates back to the 80's!
Optimization doesn't make a difference since I was already running it unoptimized. I've been running Simulink from the Simulink window (rather than using 'sim' in the Matlab window), and I couldn't find a simple way to turn compilation off. I would have thought there would be an option in configuration parameters under "Code Generation," but if there is, I can't find it.
However, I did find a work around for the problem. I made a local copy of the file and replaced all of the bit shifting functions by multiplication by powers of 2. Not a very efficient way to do it, but it works.
Again, thanks for your help.
[I am also puzzled as to why these functions (bitsll and bitsra), which are in the Fixed-Point Designer Toolbox, even run in interpreted mode. But, that's not an issue I'd complain about!]
Walter Roberson
Walter Roberson 2015 年 12 月 31 日
Running the code in interpreted mode is required for software testing.
Pooja
Pooja 2020 年 2 月 22 日
Hi, I face a different problem when i type this command "ex_ecg_sigprocessing". Says "Undefined function or variable 'ex_ecg_sigprocessing'.
What should i do?

サインインしてコメントする。

その他の回答 (1 件)

nikita teggi
nikita teggi 2016 年 4 月 12 日

0 投票

I wanted to know that in which version this example opens. Thanks

カテゴリ

質問済み:

2015 年 12 月 31 日

コメント済み:

2020 年 2 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by