MATLAB Answers

Undefined function or variable 'getFISCod​eGeneratio​nData'

5 ビュー (過去 30 日間)
kushal sharma
kushal sharma 2020 年 2 月 5 日
回答済み: kushal sharma 2020 年 2 月 12 日
I am trying to perform a simulation which uses fuzzy approach, I created the fuzzy system using the fuzzy logic designer, and i'm using it in two places within a for loop which runs fro around 15k rounds, after applying the fuzzy logic the code only gives about 12 iterations per minute, So to increase the speed I read about ambedding the fuzzy code at " https://in.mathworks.com/help/fuzzy/generate-code-for-fuzzy-system-using-matlab-coder.html "
but when i use the command : fis = getFISCodeGenerationData(fisObject);
I get the error " Undefined function or variable 'getFISCodeGenerationData'" and
codegen('evaluatefis1','-args',{coder.Constant(fis),[0 0]},'-config:mex') gives an error of access denied, I am using windows 10 and Matlab 2018a.
Help would be greatly appreciated I dont want to sit at the PC for 15hrs straight for one run.

  0 件のコメント

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

採用された回答

Darshan Ramakant Bhat
Darshan Ramakant Bhat 2020 年 2 月 6 日
From the below documentation is see that the function "getFISCodeGenerationData" is supported from R2018b (release is mentioned at the bottom of the page):
The second error may be related to the first one or else you may be trying the codegen command in a un-writable directory.

  4 件のコメント

表示 1 件の古いコメント
kushal sharma
kushal sharma 2020 年 2 月 9 日
Thank you Darshan,
I downloaded the latest trial version an this error was solved, but once again as you mentioned codegen is trying to write in an un-writable directory:
codegen('evaluatefis1','-args',{coder.Constant(fis),[0 0]},'-config:mex')
on reading the help section for codegen we can use " -d DIR " to specify directory but this doesn't accepts any path I provide
This is the error:
Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other
syntax error. To construct matrices, use brackets instead of parentheses.
This is the code I entered:
codegen('evaluatefis1','-args',{coder.Constant(fis),[0 0 0]},'-config:mex') -d K:\MATLABBB
Darshan Ramakant Bhat
Darshan Ramakant Bhat 2020 年 2 月 10 日
Please try below way :
codegen('evaluatefis1','-args',{coder.Constant(fis),[0 0 0]},'-config:mex','-d','K:\MATLABBB')
The options should be inside the ()
Darshan Ramakant Bhat
Darshan Ramakant Bhat 2020 年 2 月 12 日
Did you able to generated the code ? Please accept the answer if it was helpful to you :)

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

その他の回答 (1 件)

kushal sharma
kushal sharma 2020 年 2 月 12 日
This worked like a charm thank you so much I was stuck on this for days.

  0 件のコメント

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

カテゴリ

Community Treasure Hunt

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

Start Hunting!

Translated by