COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Socket Programming using C++ in Matlab

• Email
• Follow

I have a C++ code for doing the socket programming. I need to know how to compile the C++ file in Matlab. In the help file I came across the need for converting that as a mex file. I tried to execute the sample .cpp files given as examples but I keep getting the error "Matlabroot\R2008A\BIN\MEX.PL: Error: 'mexcpp.cpp' not found."

Can Someone brief me what I can do to implement socket programming in Matlab.

Thanks,

Jai

 0

See related articles to this posting

"Jaianand " <jaianand@coolvirgo.com> wrote in message <hr7eo9$mho$1@fred.mathworks.com>...
> I have a C++ code for doing the socket programming. I need to know how to compile the C++ file in Matlab. In the help file I came across the need for converting that as a mex file. I tried to execute the sample .cpp files given as examples but I keep getting the error "Matlabroot\R2008A\BIN\MEX.PL: Error: 'mexcpp.cpp' not found."
>
> Can Someone brief me what I can do to implement socket programming in Matlab.

I think you need to just get a simple mex routine running first, *then* worry about moving on to other things. What, exactly, did you type at the prompt when attempting to compile your test mex routine?

James Tursa

 0

 I think you need to just get a simple mex routine running first, *then* worry about moving on to other things. What, exactly, did you type at the prompt when attempting to compile your test mex routine?
>
> James Tursa

I used the command mex mexcpp.cp That is the command given in the help file to compile the code.

 0

2 Replies
803 Views

Similar Articles

12/6/2013 5:28:03 PM
page loaded in 64782 ms. (0)

Similar Artilces:

Hallo, I have made a small microcontroller based on microblaze, with a Spartan 3 starter board. At power on, I would load bitstream into fpga and my software into board ram. I have programmed using impact the board flash rom with file: download.bit (generated with edk). (49% occupied). Before uploading I have updated it with bootloader (it should be loaded into block ram). When I power on the board, now the fpga is configured by itself. Now I should copy my software into flash rom. Bootloader, at boot, should copy it into board ram and execute, but I'm not able. I have tried with Program Flash Memory tool, without obtaining any result. It writes: Processor started. Type "stop" to stop processor And I can't write like into xmd consolle. What could I do? Many Thanks Marco "Marco" <marcotoschi@nospam.it> wrote in message news:def8gn$711$1@news.ngi.it... > Hallo, > I have made a small microcontroller based on microblaze, with a Spartan 3 > starter board. > > At power on, I would load bitstream into fpga and my software into board > ram. > > I have programmed using impact the board flash rom with file

using SQLalchemy
We have a very chaotic database (on MySql) at the moment, with for example table names used as keys to query other tables (but that's just an example). We are going to redesign it but first I still have to replace the perl+vbscript system with only one Python program, so I still have to deal with the current state. I'm trying to use SQLalchemy and it looks absolutely great, but in general as a policy we don't use external dependencies.. To try to do an exception in this case: - are there any problems with SQLalchemy on Windows? - are there any possibly drawbacks of using SQLalchemy instead of the MySqlDB interface? For the second point I guess that we might have a bit less fine tuning, but the amount of data is not so much and speed is also not a bit issue (also because all the queries are extremely inefficient now). Any other possible issue? Thanks, Andrea

Using const?
In this code I am trying to make a const instance of class B in main. But I get the error: test.c++: In function �int main()�: test.c++:34: error: uninitialized const �b� Why should it be initialized? And how do I initialize an object? #include <iostream> class A { public: void foo() { printf("non-const method\n"); } void foo() const { printf("const method\n"); } }; class B { public: A a; void callfoo() { a.foo(); } void callfoo() const { a.foo(); } }; int main() { const B b; return 0; } desktop wrote: > In this code I am try

Using a Helpfile
Hi, another problem that I can't solve: How can I call a helpfile (*.chm) from my exe programm over a menueitem (for instance)?

using rtti
hi all, i want to get the name of the class of an object during run-time. the problem is when i'm using the rtti mechanism of name(), the name is preceded by the length. So, i get something like 3abc (instead of abc). could someone shed some light on this. thanx "MoCha" <mohitchakraborty@rediffmail.com> wrote in message news:7d7757a7.0311252016.67d94e13@posting.google.com... | i want to get the name of the class of an object during run-time. the | problem is when i'm using the rtti mechanism of name(), the name is | preceded by the length. So, i get something like 3abc (instead of | abc). | could someone shed some light on this. The string returned by a typeid's name() member function is implementation-defined. It could embed information about the namespace that contains the class in various ways, and any other information. So you have two choices with the current C++ standard: - Use rtti, and unmangle the returned string in a platform-specific way. - Add a virtual function to your class, which will return a name that you can define as needed. Regards, Ivan -- http://ivan.vecerina.com

Using tocloft.....

Using reflection
How do you obtain on object refrence using reflection. I need the reference to the actual object not the class. Basically I want to have a server send a message to a client, the client will run the message, which will,using reflection set an Arraylist in the client to the same value as the arrayList that was sent with the message from the client. How do I do that? Thanks Check out the Class object. http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Class.html Create an instance using the newIntance() method - http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Class.html#newInstance() One thing to note: the class you are using reflection on must have a no argument constructor. hth, Brock On 9 Dec 2004 19:39:54 -0800, <brock57@hotmail.com> wrote: > Check out the Class object. > > http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Class.html > > Create an instance using the newIntance() method - > http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Class.html#newInstance() > > One thing to note: the class you are using reflection on must have a no > argument constructor. This is only true if Class#newInstance is used. You can create

using libusb
address those: The thing that's brought into your code by using #include is called a header file, not a library file. The fact that the compiler can't open that file has nothing to do with the library. When your code gets linked, you will have to tell the compiler the correct location where it can find the corresponding library file, but this compilation has failed before that question has even come up. There's a list of locations that the compiler is supposed to search when you use #include <lusb0_usb.h> That list of locations can, in principle, be quite different for each implementation of C, but it always includes whatever location the standard headers are stored in (even if they're not stored in a directory). That's why you should use #include <> for standard headers. For the particular compiler you're using, the default list of locations apparently does not include whichever directory you've currently got lusb0_usb.h in. If you were to use #include "lusb0_usb.h" there might or might not be a different list of locations your compiler will search for the file - that's up to your compiler. However

Using MPI...
Hi, I have a application that allows you to hook up external DLL for functionality. I want to create an external DLL that uses MPI. So, is it possible for me to call MPI_Init inside the dll as opposed to the main application. This would be equivalent to me calling a function inside the application. It can be executed multiple times: int my_mpi_function () { MPI_Init....(); } Never mind, found that you can only call MPI_Init once and only once Hi, On Wed, 14 Nov 2007 09:12:07 -0800 A.Financial.Engineer@gmail.com wrote: > Never mind, found that you can only call MPI_Ini

Using CreateObject
Hi, Sometimes CreateObject() creates a blank DOS Win and others does not. For exemple: oExcel := CreateObject( "Excel.Application" ) doesn�t creates a blank DOS Win. oVc := CreateObject( "Vouch32.Vouch.1" ) always creates a blank DOS Win. How to do to don�t create this win when executes CreateObjetct() I use xhb and wvw and winxp. Portuguese: �s vezes CreateObject() cria uma janela DOS vazia e outras n�o. Exemplo: oExcel := CreateObject( "Excel.Application" ) n�o cria uma janela DOS vazia. oVc := CreateObject( "Vouch32.Vouch.1" ) sempre cria u