How to build .Net application based on fuzzy logic controller from fuzzy logic toolbox?

2 ビュー (過去 30 日間)
Tomasz Wysmyk
Tomasz Wysmyk 2016 年 7 月 6 日
回答済み: Hagar Mahmoud 2019 年 12 月 3 日
I’m trying to make a .NET application in visual studio using a fuzzy logic controller created in fuzzy logic toolbox (MATLAB). I’ve created MATLAB function:
function output = ostateczny( input1, input2, input3, input4 )
input 5 (structure) initialization
output=evalfis([input1; input2; input3; input4], input5);
end
I’ve compiled it to a .net assembly library (using Library Compiler as shown in https://www.youtube.com/watch?v=ZeY4_9IPvyA), and added a reference in visual studio to compiled DLL file. Then I’ve written code:
Class1 test = null;
test = new Class1();
object output = test.ostateczny((object)1, (object)200, (object)200, (object)30);
I’ve managed to create object successfully, but calling a method from this object ends with error:
... MWMCR::EvaluateFunction error ... The first input must be a defined DOUBLE matrix
Error in => somename.m at line 816.
... Matlab M-code Stack Trace
...
at
file C:\Users\...\AppData\Local\Temp\...\mcrCache8.5\ostate0\toolbox\fuzzy\fuzzy\evalfis.m, name evalfis, line 83.
at
file C:\Users\...\AppData\Local\Temp\...\mcrCache8.5\ostate0\somename\ somename.m, name somename, line 816.
Is it correct to pass 4 arguments separately in .NET, and then merged them into a matrix in MATLAB source code? Any other tips?

回答 (1 件)

Hagar Mahmoud
Hagar Mahmoud 2019 年 12 月 3 日
Hello Tomasz
Im facing the same issue but with Omnet.
Can you share with me if you done with this, how it was done ?

カテゴリ

Help Center および File ExchangeFuzzy Logic in Simulink についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by