Borrar filtros
Borrar filtros

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

6 visualizaciones (últimos 30 días)
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?

Respuestas (1)

Hagar Mahmoud
Hagar Mahmoud el 3 de Dic. de 2019
Hello Tomasz
Im facing the same issue but with Omnet.
Can you share with me if you done with this, how it was done ?

Categorías

Más información sobre Fuzzy Logic Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by