Thread Subject: Matlab & C/c++ Interface

Subject: Matlab & C/c++ Interface

From: Suyog Tapaswi

Date: 6 Nov, 2009 15:38:01

Message: 1 of 5

Hi,

I want to access some functions/data from C or C++ into Matlab.
So, is there any way apart fromthe Mex Files to do the interfacing with Matlab & C/C++.
Can you pls.give any suggestions.

Thanks & Regards,
Suyog.

Subject: Matlab & C/c++ Interface

From: James Tursa

Date: 6 Nov, 2009 16:00:20

Message: 2 of 5

"Suyog Tapaswi" <suyog.tapaswi@yahoo.com> wrote in message <hd1fsp$2h5$1@fred.mathworks.com>...
> Hi,
>
> I want to access some functions/data from C or C++ into Matlab.
> So, is there any way apart fromthe Mex Files to do the interfacing with Matlab & C/C++.
> Can you pls.give any suggestions.
>
> Thanks & Regards,
> Suyog.

Sure. You can write files out (mat or text or binary) in C/C++ and read them in on the MATLAB side. But what is wrong with the mex file approach?

James Tursa

Subject: Matlab & C/c++ Interface

From: Suyog Tapaswi

Date: 6 Nov, 2009 16:08:01

Message: 3 of 5

"James Tursa" <aclassyguy_with_a_k_not_a_c@hotmail.com> wrote in message <hd1h6k$pun$1@fred.mathworks.com>...
> "Suyog Tapaswi" <suyog.tapaswi@yahoo.com> wrote in message <hd1fsp$2h5$1@fred.mathworks.com>...
> > Hi,
> >
> > I want to access some functions/data from C or C++ into Matlab.
> > So, is there any way apart fromthe Mex Files to do the interfacing with Matlab & C/C++.
> > Can you pls.give any suggestions.
> >
> > Thanks & Regards,
> > Suyog.
>
> Sure. You can write files out (mat or text or binary) in C/C++ and read them in on the MATLAB side. But what is wrong with the mex file approach?
>
> James Tursa

Hi,
As per the site mex Files should be avoided as far as possible.
So, trying to find out any possible alternative.

Regards,
Suyog.

Subject: Matlab & C/c++ Interface

From: James Tursa

Date: 6 Nov, 2009 19:30:19

Message: 4 of 5

"Suyog Tapaswi" <suyog.tapaswi@yahoo.com> wrote in message <hd1hl1$pci$1@fred.mathworks.com>...
> "James Tursa" <aclassyguy_with_a_k_not_a_c@hotmail.com> wrote in message <hd1h6k$pun$1@fred.mathworks.com>...
> > "Suyog Tapaswi" <suyog.tapaswi@yahoo.com> wrote in message <hd1fsp$2h5$1@fred.mathworks.com>...
> > > Hi,
> > >
> > > I want to access some functions/data from C or C++ into Matlab.
> > > So, is there any way apart fromthe Mex Files to do the interfacing with Matlab & C/C++.
> > > Can you pls.give any suggestions.
> > >
> > > Thanks & Regards,
> > > Suyog.
> >
> > Sure. You can write files out (mat or text or binary) in C/C++ and read them in on the MATLAB side. But what is wrong with the mex file approach?
> >
> > James Tursa
>
> Hi,
> As per the site mex Files should be avoided as far as possible.
> So, trying to find out any possible alternative.

Huh? Can you point me to the link that says mex files should be avoided? I use them all the time and they work fine, as long as one knows how to code properly.

James Tursa

Subject: Matlab & C/c++ Interface

From: Suyog Tapaswi

Date: 9 Nov, 2009 16:49:02

Message: 5 of 5

"James Tursa" <aclassyguy_with_a_k_not_a_c@hotmail.com> wrote in message <hd1tgb$iid$1@fred.mathworks.com>...
> "Suyog Tapaswi" <suyog.tapaswi@yahoo.com> wrote in message <hd1hl1$pci$1@fred.mathworks.com>...
> > "James Tursa" <aclassyguy_with_a_k_not_a_c@hotmail.com> wrote in message <hd1h6k$pun$1@fred.mathworks.com>...
> > > "Suyog Tapaswi" <suyog.tapaswi@yahoo.com> wrote in message <hd1fsp$2h5$1@fred.mathworks.com>...
> > > > Hi,
> > > >
> > > > I want to access some functions/data from C or C++ into Matlab.
> > > > So, is there any way apart fromthe Mex Files to do the interfacing with Matlab & C/C++.
> > > > Can you pls.give any suggestions.
> > > >
> > > > Thanks & Regards,
> > > > Suyog.
> > >
> > > Sure. You can write files out (mat or text or binary) in C/C++ and read them in on the MATLAB side. But what is wrong with the mex file approach?
> > >
> > > James Tursa
> >
> > Hi,
> > As per the site mex Files should be avoided as far as possible.
> > So, trying to find out any possible alternative.
>
> Huh? Can you point me to the link that says mex files should be avoided? I use them all the time and they work fine, as long as one knows how to code properly.
>
> James Tursa

Hi James,
The data which i will be acessing is dynamically changing. it contains some kind of Time Series Data. So, how do i handle this with mex files?
Do, i have to change the code everytime the data changes..

Regards

Tags for this Thread

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.

rssFeed for this Thread

Contact us at files@mathworks.com