How can I convert a .fis file (fuzzy) into a .m file?

8 Ansichten (letzte 30 Tage)
Pedro
Pedro am 30 Apr. 2013
Kommentiert: wonde Tessema am 3 Jul. 2023
I need to convert the file so that I can take the .m file and convert into C code to program a dsp whith a fuzzy controller.
thanks!
  1 Kommentar
Iman Ansari
Iman Ansari am 30 Apr. 2013
Bearbeitet: Iman Ansari am 30 Apr. 2013
It's a text file, you can open it with matlab editor or notepad. It's for defining your fuzzy system (Inputs, Outputs, Membership Functions, rules, ...), nothing more.

Melden Sie sich an, um zu kommentieren.

Antworten (4)

Shahar
Shahar am 29 Aug. 2013
Bearbeitet: Shahar am 29 Aug. 2013
You can convert the fis struct to .m code with gencode function from filexchange, at http://www.mathworks.com/matlabcentral/fileexchange/24447-generate-m-file-code-for-any-matlab-variable.
If your code looks something like
myg = readfis('FisFile.fis');
then use
strx = gencode(myg);
fid = fopen('c:\scriptFis.m','w');
fprintf(fid, '%s\n', strx{:});
fclose(fid);
and then you can run scriptFis from command line to load variable myg.
  3 Kommentare
Walter Roberson
Walter Roberson am 4 Jul. 2017
Did you install the noted File Exchange Contribution?
Asif Shah
Asif Shah am 20 Mär. 2020
easily to convert from .fis to .m file see this video https://www.youtube.com/watch?v=xLkLsyzn2fk

Melden Sie sich an, um zu kommentieren.


Hagar Mahmoud
Hagar Mahmoud am 3 Dez. 2019
Hello
I'm trying the same thing, however the posted example on file exchange for converting .fig file not .fiS files.
I have added the files and run, but I got the follwoing error meesge in scriptFis.m file
warning('myg: No code generated for object of class mamfis.')
Any help ??
  2 Kommentare
Asif Shah
Asif Shah am 20 Mär. 2020
easily to convert from .fis to .m file see this video https://www.youtube.com/watch?v=xLkLsyzn2fk
wonde Tessema
wonde Tessema am 3 Jul. 2023
Error in gencode (line 40)
tag = input_name(1);
how to i solve this problem?

Melden Sie sich an, um zu kommentieren.


Lokesh Srivastava
Lokesh Srivastava am 10 Jan. 2022
Can I change the parameters of .fis file in .m file or I can do this only in Fuzzy Logic App Designer?
Because In App Designer every time I change the parameter I have to Save new file and then run the model and if I can do these changes in .m file then just by run the file I can create a updated .fis.
I have tried the above mentioned method to change .fis to .m but on run it gives error :-
'' Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses "
What to do pls help.

wonde Tessema
wonde Tessema am 3 Jul. 2023
how to convert text file into FIS file

Kategorien

Mehr zu Fuzzy Logic Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by