TCP/IP Socket Communications in MATLAB using Java Classes
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
Cita come
Rodney Thomson (2025). TCP/IP Socket Communications in MATLAB using Java Classes (https://www.mathworks.com/matlabcentral/fileexchange/25249-tcp-ip-socket-communications-in-matlab-using-java-classes), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Compatibilità della piattaforma
Windows macOS LinuxCategorie
- MATLAB > Data Import and Analysis > Data Import and Export > Hardware and Network Communication > TCP/IP Communication >
- Test and Measurement > Instrument Control Toolbox > Interface-Based Instrument Communication >
Tag
Riconoscimenti
Ispirato da: TCP/IP Socket Communications in MATLAB
Ispirato: TraCI4Matlab, jtcp(actionStr,varargin)
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
Versione | Pubblicato | Note della release | |
---|---|---|---|
1.0.0.0 |