Thread Subject:
BesselK, emlmex and Matlab Types

Subject: BesselK, emlmex and Matlab Types

From: Paul

Date: 27 Sep, 2011 18:59:31

Message: 1 of 1

Hello! I am having some trouble. I am trying to compile an eml file to a mex function in 7.10a which contains this:

function K=sbesselk(nu,Z) %#eml
K=repmat(sqrt(pi./(2*Z)),1,length(nu)).*besselk(nu+.5,Z);
end

emlmex throws an error, saying besselk has to be extrinsic. So i set it extrinsic by:

function K=sbesselk(nu,Z) %#eml
eml.extrinsic('besselk');
K=repmat(sqrt(pi./(2*Z)),1,length(nu)).*besselk(nu+.5,Z);
end

and now emlmex says that the variable getting returned is a mxArray, and not a double. I had this problem as well with tic/toc, which would return an mxArray when called as extrinsic. Is there any way around this? I have tried calling the besselmx file as an extrinsic but I get the same problem, namely an mxArray. This is a small part of a large program that I do not want to rewrite in C. Thanks for any help anyone can give!

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
emlextrinsic Paul Mark 27 Sep, 2011 15:04:31
bessel Paul Mark 27 Sep, 2011 15:04:31
emlmex Paul Mark 27 Sep, 2011 15:04:30
rssFeed for this Thread

Contact us