2

Im developing an application in Matlab and it calls a C# dll using NET.addAssembly to analyse files. I've created an structure in Matlab with some features about the kind of file to be analyse:

File = struct('Name','File Name','HeaderLines',14,'ColName','ID','ColIdx',[]...);

And I want to send this structure to my C# dll, that would read the file and fill some of the features of the structure and send it back to Matlab.

Is it possible to do that? Because at the moment Im getting errors: " No method 'xxx' with matching signature found.

Can you please confirm if Matlab structures are compatible in NET? Which is the more suitable object for this purpouse? Where can I find examples Matlab - NET Assembly?

1
  • Hello there, and welcome to StackOverflow! In this site, it is customary to vote up useful answers and possibly mark those that resolved your problem as accepted, mostly to help future Googlers find the most helpful answers. You seem to have asked already quite a few questions but there was no feedback on your part. Please consider reviewing answers to your previous questions and accept those that indeed proved to be useful. Commented Dec 20, 2012 at 14:42

2 Answers 2

1

if you want to send a structure from matlab to c#, you can declare it in your c# assembly. then you can create within matlab a new reference of this struct type, fill it, and send it to a c# function

Sign up to request clarification or add additional context in comments.

Comments

0

You can't pass MATLAB structures to methods of a .NET assembly. Store the relevant information in either MATLAB arrays or cell arrays, and design your C# to accept it in that form.

For examples of the use of .NET libraries from MATLAB, see the documentation section User's Guide->External Interfaces->Using .NET libraries from MATLAB, and particularly the sections Handling .NET Data in MATLAB and Using Arrays with .NET Applications, which cover how to pass data to and from .NET assemblies.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.