MATLAB Answers


using C# functions in matlab

Asked by Barinder
on 10 Feb 2012
Latest activity Edited by Matt J
on 12 Oct 2013

Hi, I wanted to use functions from a c# dll in matlab. How would I do this using version 2010a

Thanks Barinder




No products are associated with this question.

2 Answers

Answer by Kaustubha Govind
on 13 Feb 2012
Edited by Kaustubha Govind
on 19 Nov 2012

Is it a .NET library? If yes, see Using .NET Libraries from MATLAB.


Kaustubha Govind
on 14 Feb 2012

Sorry, I don't have any experience with .NET assemblies, but you might be able to find something by searching on the web. Does your DLL load a third-party assembly called EZ_B? Looks like that DLL (or one of its depedencies) could not be loaded. You probably need to register all those DLLs also with GAC, or add it to the system path:

on 15 Nov 2012

The suggestion to see "Using .NET Libraries from MATLAB" looked primising, but the link is broken.

Kaustubha Govind
on 19 Nov 2012

Thanks for pointing that out, John! Fixed the link.

Answer by Walter Roberson
on 10 Feb 2012

See loadlibrary() . You will need a .h file for the dll .


Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!