Code covered by the BSD License  

Highlights from
TCP/IP Socket Communications in MATLAB using Java Classes

5.0

5.0 | 2 ratings Rate this file 35 Downloads (last 30 days) File Size: 3.35 KB File ID: #25249

TCP/IP Socket Communications in MATLAB using Java Classes

by Rodney Thomson

 

07 Sep 2009

A simple example TCP/IP server and client using a helper Java class

| Watch this File

File Information
Description

Provides an example Server / Client written in MATLAB that utilises the ability to call Java to perform message communication using TCP/IP.

Similar to my previous example (http://www.mathworks.com/matlabcentral/fileexchange/21131) but allows for much more efficient data transmission by using a helper Java class to minimise function call overhead.

To use the example:

- Start 2 instances of MATLAB
- in the first execute the following:
  message = char(mod(1:1000, 255)+1);
  server(message, 3000, 10)
- in the second execute the following:
  javaaddpath('<path to where the .class file is located>');
  data = client('localhost', 3000)

For more details see:
http://iheartmatlab.blogspot.com/2009/09/tcpip-socket-communications-in-matlab.html

MATLAB release MATLAB 7.8 (R2009a)
Other requirements Although I have developed it in MATLAB 2009a, it should work on versions as far back as R14.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
16 Nov 2009 Kevin Bartlett  
19 Jan 2012 Ueli Rutishauser  
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
tcp Rodney Thomson 08 Sep 2009 12:53:22
ip Rodney Thomson 08 Sep 2009 12:53:22
socket Rodney Thomson 08 Sep 2009 12:53:22
tcp Paul Andrews 05 Jan 2010 12:14:53

Contact us at files@mathworks.com