How to covert .fis to .c

38 ビュー (過去 30 日間)
Prawee Pongsing
Prawee Pongsing 2022 年 8 月 1 日
編集済み: Walter Roberson 2023 年 11 月 5 日
Hello everyone,
I need to know method for converting fuzzy logic file (.fis) to c language (.c) in matlab, preliminary I try matlab coder but ilke it does not support non .m or .mlx.
Please help guide me.

回答 (3 件)

Walter Roberson
Walter Roberson 2022 年 8 月 1 日
https://www.mathworks.com/help/fuzzy/getfiscodegenerationdata.html
convert the fis to a structure . save the structure .
In new code, load the structure and call evalfis() with the structure and data . Now use MATLAB Coder on that code to produce C or C++ code to evaluate the (converted) fis.
  3 件のコメント
Walter Roberson
Walter Roberson 2022 年 8 月 1 日
To expand slightly: readfis is not supported for code generation, but evalfis is supported for converted fis. So you use two stages, one to readfis and convert and save , and you do this in interactive matlab. Then the second stage in a different function loads the saved data and evalfis, and you do code generation for this .
You might have been hoping for an easy way to build code that could read fis files and evaluate them . There does not appear to be any easy way to do that . You would have write your own code that did the equivalent of readfis and generate the converted structure. It might be possible, but not simple .
Prawee Pongsing
Prawee Pongsing 2022 年 8 月 1 日
I am new to this kind of startup and know it is not going to be easy way, your expanding has helped me to understand more.
Thank you again for your answers and warnings, I will remember it well.

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


Juan Camilo Gómez Cadavid
Juan Camilo Gómez Cadavid 2022 年 9 月 13 日
編集済み: Walter Roberson 2023 年 11 月 5 日

Mohamad Reza Samiee
Mohamad Reza Samiee 2023 年 11 月 4 日
hi
i used getfiscodegenerationdata and converted my fis file to struct and yet i get this error
what else i can do?
i can use application compiler on my entire code but evalfis.
  2 件のコメント
Walter Roberson
Walter Roberson 2023 年 11 月 4 日
I cannot tell which MATLAB version you are using? R2022b is needed for full support.
Mohamad Reza Samiee
Mohamad Reza Samiee 2023 年 11 月 5 日
it's 2019a but i tried it on a 2022b too. i generated a homogeneous structure in 2019a and used it in 2022b matlab coder. may it cause a problem?

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by