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

1 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Fuzzy Logic Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by