how to convert matlab code to c with nonsuported functions for code generation

2 ビュー (過去 30 日間)
fs
fs 2019 年 3 月 24 日
回答済み: David Fink 2019 年 3 月 25 日
hello,
i am working on a recognition project on matlab.
i have finished it and trying to connect it to android studio so :
1-i tried to convert it to c language using matlab coder but there are some method that are not convertible.
2- i also tried to use simulnik and also failed too(maybe i am using it wrong this is my first time using it)
these methods are:
1-graythresh
2-cellfun
3-blockproc
4-dct2
5-arrayfun
6-array2table
how can i integrate it with android?knowing that i am not being able to write the nonconvertible methods from scratch
thank you
  1 件のコメント
Walter Roberson
Walter Roberson 2019 年 3 月 24 日
  1. graythresh calls otsuthresh to do the work, and otsuthresh can be deployed.
  2. replace cellfun with a loop.
  3. dct2 just calls dct twice. If you have the Signal Processing Toolbox, then dct can be deployed.
  4. replace arrayfun with a loop
  5. simple uses of blockproc are not difficult to replace with nested loops
  6. array2table could be a problem. It looks like table objects do not support code generation at this time. Consider replacing them with numeric arrays or cell arrays or nonscalar struct.

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

回答 (1 件)

David Fink
David Fink 2019 年 3 月 25 日
Please see Walter's comment, with one difference:
As of R2019a, arrayfun is supported for code generation, with limitations:
We've made an internal note of the other functions mentioned so we can look at supporting those for code generation in the future.

カテゴリ

Help Center および File ExchangeMATLAB Coder についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by