f



Conversion from MATLAB to C/C++ using MATLAB compiler

I am working on conversion of .m files to c/c++. I am using the
MATLAB compiler version 3.0 and MATLAB version 6.5.1. There seem to
be a few functions which do not seem to get converted.

The error i got while using functions like TRAIN, NETWORK and INIT
(all neural-networks related functions used in the general neural
network programs, newpnn.m etc) is

The MATLAB compiler does not currently support MATLAB object oriented
programming and the functions TRAIN , NETWORK and INIT would produce
a run-time error.

Could anyone please tell me as to how i can circumnavigate this
problem or solve this problem or as to whether i can use any higer
version of the compiler which can solve this problem.

thanking you

lavanya janardhanan
0
lavanya (3)
8/13/2004 7:02:31 AM
comp.soft-sys.matlab 211266 articles. 25 followers. lunamoonmoon (257) is leader. Post Follow

4 Replies
1076 Views

Similar Articles

[PageSpeed] 32

Can I ask why are you converting the M files to C/C++?

Stuart
"lavanya janardhanan" <lavanya@pmail.ntu.edu.sg> wrote in message
news:eee5e70.-1@webx.raydaftYaTP...
> I am working on conversion of .m files to c/c++. I am using the
> MATLAB compiler version 3.0 and MATLAB version 6.5.1. There seem to
> be a few functions which do not seem to get converted.
>
> The error i got while using functions like TRAIN, NETWORK and INIT
> (all neural-networks related functions used in the general neural
> network programs, newpnn.m etc) is
>
> The MATLAB compiler does not currently support MATLAB object oriented
> programming and the functions TRAIN , NETWORK and INIT would produce
> a run-time error.
>
> Could anyone please tell me as to how i can circumnavigate this
> problem or solve this problem or as to whether i can use any higer
> version of the compiler which can solve this problem.
>
> thanking you
>
> lavanya janardhanan


0
stuartm (472)
8/13/2004 5:02:57 PM
Compiler 4.0 can handle MATLAB objects, which will allow you to compile many
of the functions in the Neural Net toolbox. However, you will not be able to
deploy Neural Network training functions (train, for example), because these
types of functions are "design-time", and Compiler 4.0 does not support the
deployment of design time functions. You can deploy an application that uses
a trained neural network, but you cannot deploy an application that trains a
neural network.

"lavanya janardhanan" <lavanya@pmail.ntu.edu.sg> wrote in message
news:eee5e70.-1@webx.raydaftYaTP...
> I am working on conversion of .m files to c/c++. I am using the
> MATLAB compiler version 3.0 and MATLAB version 6.5.1. There seem to
> be a few functions which do not seem to get converted.
>
> The error i got while using functions like TRAIN, NETWORK and INIT
> (all neural-networks related functions used in the general neural
> network programs, newpnn.m etc) is
>
> The MATLAB compiler does not currently support MATLAB object oriented
> programming and the functions TRAIN , NETWORK and INIT would produce
> a run-time error.
>
> Could anyone please tell me as to how i can circumnavigate this
> problem or solve this problem or as to whether i can use any higer
> version of the compiler which can solve this problem.
>
> thanking you
>
> lavanya janardhanan


0
pwebb (443)
8/13/2004 5:18:09 PM
hi Peter,

 Thanks for the reply. But let me get this clear. The train functions
have to be coded in C/C++ directly.

But is there any other way out instead of having to code the program
hands-on. It is a bulky and voluminous MATLAB code and the basic
training code is very necessary.

Thanking You

Lavanya Janardhanan

Peter Webb wrote:
>
>
> Compiler 4.0 can handle MATLAB objects, which will allow you to
> compile many
> of the functions in the Neural Net toolbox. However, you will not
> be able to
> deploy Neural Network training functions (train, for example),
> because these
> types of functions are "design-time", and Compiler 4.0 does not
> support the
> deployment of design time functions. You can deploy an application
> that uses
> a trained neural network, but you cannot deploy an application that
> trains a
> neural network.
>
> "lavanya janardhanan" <lavanya@pmail.ntu.edu.sg> wrote in
message
> news:eee5e70.-1@webx.raydaftYaTP...
>> I am working on conversion of .m files to c/c++. I am using the
>> MATLAB compiler version 3.0 and MATLAB version 6.5.1. There
seem
> to
>> be a few functions which do not seem to get converted.
>>
>> The error i got while using functions like TRAIN, NETWORK and
> INIT
>> (all neural-networks related functions used in the general
neural
>> network programs, newpnn.m etc) is
>>
>> The MATLAB compiler does not currently support MATLAB object
> oriented
>> programming and the functions TRAIN , NETWORK and INIT would
> produce
>> a run-time error.
>>
>> Could anyone please tell me as to how i can circumnavigate this
>> problem or solve this problem or as to whether i can use any
> higer
>> version of the compiler which can solve this problem.
>>
>> thanking you
>>
>> lavanya janardhanan
>
>
>
0
lavanya (3)
8/14/2004 2:08:23 AM
"lavanya janardhanan" <lavanya@pmail.ntu.edu.sg> wrote in message
news:eee5e70.2@webx.raydaftYaTP...
> hi Peter,
>
>  Thanks for the reply. But let me get this clear. The train functions
> have to be coded in C/C++ directly.
>
> But is there any other way out instead of having to code the program
> hands-on. It is a bulky and voluminous MATLAB code and the basic
> training code is very necessary.

I think your best bet is to get a trial of Compiler 4.0 and see how far it
gets you. The Neural Net toolbox functions that WILL NOT compile are:

nndemos
nncontrol
nnobsolete
nnet/@network/init.m
nnet/@network/adapt.m
nnet/@network/gensim.m
nnet/@network/train.m
nnet/init*.m
nnet/learn*.m
nnet/newgrnn.m
nnet/newlind.m
nnet/newpnn.m
nnet/newrb.m
nnet/newrbe.m
nnet/nnt2*.m
nnet/srch*.m
nnet/train*.m
nnutils/calcgrad.m
nnutils/calcgx.m
nnutils/calcjejj.m
nnutils/calcjx.m
nnutils/competsl.m
nnutils/gen*.m
nnutils/nnguitools.m
nnutils/train*.m

If you intend to deploy code that uses these functions, you will have to
write replacements for them in C or C++.


0
pwebb (443)
8/31/2004 3:20:27 PM
Reply: