Thread Subject: How to build m-file including built-in function into dll?

Subject: How to build m-file including built-in function into dll?

From: dai

Date: 9 Jun, 2009 09:36:01

Message: 1 of 2

Hi. Now I wish to build some m-files into dll for accelerating my programs. But one of my m.file is including a matlab built-in function 'log'. Then it turn out to be wrong in my c++ programs called:'Undefined function or method 'log' for input arguments of type 'int32'.'

please give me some help to solve this problem.

Subject: How to build m-file including built-in function into dll?

From: Steven Lord

Date: 9 Jun, 2009 21:34:10

Message: 2 of 2


"dai " <279711585@qq.com> wrote in message
news:h0lae1$evf$1@fred.mathworks.com...
> Hi. Now I wish to build some m-files into dll for accelerating my
> programs. But one of my m.file is including a matlab built-in function
> 'log'. Then it turn out to be wrong in my c++ programs called:'Undefined
> function or method 'log' for input arguments of type 'int32'.'
>
> please give me some help to solve this problem.

The LOG function isn't defined for variables of class int32. Convert the
data you're passing into LOG into a data type that LOG accepts (single or
double precision) or implement your own LOG function for variables of class
int32. The former is going to be easier than the latter [what's
log(int32(5))? It should probably be an integer, but log(int32(5)) is not
an integer value, so you'll need to determine how you want to do this.]

--
Steve Lord
slord@mathworks.com

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
builtin function dai zhengguo 9 Jun, 2009 05:39:02
rssFeed for this Thread

Contact us at files@mathworks.com