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

Hello,
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.

Answers (2)

In your MATLAB code, add the comment
%#function imresizemex

2 Comments

like this:
function var = name(input)
%#function imresizemex
I=imresize(im,0.5);
...CODE...
??
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.

Sign in to comment.

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

Asked:

on 30 Mar 2013

Answered:

on 16 Mar 2016

Community Treasure Hunt

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

Start Hunting!