Вопрос

I want to use Fuzzy Logic Toolbox in C#. To do this, I created a NET-library using deploytool, but it does not include the file fuzzy.m, which I need to work. And in the log mccExcludedFiles.log the following information:

This file contains the list of various toolbox functions that are not included in the CTF file. An error will be thrown if any of these functions are called at run-time. Some of these functions may be from toolboxes that you are not using in your application. The reason for this is that these toolboxes have overloaded some methods that are called by your code. If you know which toolboxes are being used by your code, you can use the -p flag with the -N flag to list these toolboxes explicitly. This will cause MATLAB Compiler to only look for functions in the specified toolbox directories in addition to the MATLAB directories. Refer to the MCC documentation for more information on this.

C:\Program Files\MATLAB\R2010b\toolbox\fuzzy\fuzzy\fuzzy.m called by D:\MyFolder\VNTU\bakal\matlabAndCs\ShowFuzzyDesigner.m (because of toolbox compilability rules)

How do I include this excluded fuzzy.m file in the compilation?

Это было полезно?

Решение

The command fuzzy launches the Fuzzy Inference Systems editor, a GUI supplied with Fuzzy Logic Toolbox. Compilation of Toolbox GUIs with MATLAB Compiler is typically not supported, and as detailed in the documentation for MATLAB Compiler, this is true of the GUIs within Fuzzy Logic Toolbox.

I must say, I think the message you're getting in the mccExcludedFiles.log file is mostly misleading - all of those things could cause a file to have been excluded, but in this case the only relevant bit is at the end, "(because of toolbox compilability rules)".

Другие советы

You might want to look into how to build a fuzzy system using the line code functions supplied with the fuzzy toolbox, and not the GUI. This walkthrough gives you a pretty good handle on building a Mamdani inference system using the line code tools. I am not positive how these translate into C# code, but I think there should be equivalent libraries therein.

If you cannot find a natural way to implement the MATLAB routines in C#, then you could look at this discussion which links some free fuzzy libraries for C#. I think one of the links is broken, but the other three load just fine.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top