MATLAB Answers

Antoine Keftes

.Net assembly and "Undefined function 'imresizemex' for input arguments of type 'double'".

Asked by Antoine Keftes
on 30 Mar 2013
Latest activity Answered by Xiaoyan Sheen
on 16 Mar 2016


I'm trying to create a .net dll in order to use my matlab code into an application in .Net.

In my matlab code I use the function imresize(X,0.5) without having any problem. But in C# I'm having this exception: MWMCR::: "Undefined function 'imresizemex' for input arguments of type 'double'". Can anyone help me on solving this error?

Thanks in advance.



No products are associated with this question.

2 Answers

Answer by Walter Roberson
on 30 Mar 2013

In your MATLAB code, add the comment

%#function imresizemex


like this:

function var = name(input)
%#function imresizemex


I tried that and I am having the same exception again about imresizemex... Have you tried that??

Also I found that imrezisemex is located in a private directory of Matlab (toolbox\images\images\private\imresizemex.mexw64) and the file's extension is .mexw64. Does any of them cause this problem?? I din't find the file in the MCR's directory.

Answer by Xiaoyan Sheen
on 16 Mar 2016

imresizemex.mexw32/64 is a compiled code that can be called by Matlab. You may have trouble direct calling it in C#.


Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

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

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!