4.25

4.2 | 8 ratings Rate this file 195 Downloads (last 30 days) File Size: 1.25 KB File ID: #11802
image thumbnail

MATLAB TCP/IP - code example

by Steven Kolak

 

26 Jul 2006 (Updated 13 Dec 2006)

MATLAB with TCP/IP - code example

| Watch this File

File Information
Description

MATLAB supports TCP/IP communication using the Instrument Control Toolbox.

This MATLAB code example shows you how to exchange data with a remote application using TCP/IP. This example is taken from a MATLAB Digest technical article written by Edward J. Mayhew from George Mason University.

Learn more about using MATLAB with TCP/IP communication at:
http://www.mathworks.com/tcpip

Required Products Instrument Control Toolbox
MATLAB release MATLAB 7.2 (R2006a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (13)
29 Jul 2006 Bill O'Shea

This is a "starter" example, but it does show you how to easily transfer data with MATLAB using TCP/IP.

14 Sep 2006 Hideaki Okazaki  
05 Dec 2006 Nhan Nguyen  
24 Feb 2007 Filipe Ieda Fazanaro  
27 Oct 2007 savita sheoran  
28 Jan 2008 Gundi Can

Hi,

I build a socket communication with Matlab and VS2003. My question is, if I send data from VS (server) to Matlab-Client, the fscanf operation needs a lot of time. I have to terminate the server programm. In Matlab Command window prompts the warning:Warning: A timeout occurred before the Terminator was reached.
Error in ==> icinterface.fscanf at 196
   out = fscanf(igetfield(obj, 'jobject'), totalSize);

Error in ==> scope_mod at 33
    rcvData = fscanf(t);

Does somebody have any suggestion?

Thanks a lot!

20 Jul 2008 ibrahim adnan

wonderfullllllllllllllllll

18 Mar 2009 Christian

Hi,

has anyone an example which communicates with the Visual Studio (c#, Vb.Net,...)?

22 Apr 2009 Ricardo Correia

Hello! Can i transfer data on matlab, from one session to other?
Is it possible with this code? I want to transfer a wav file from a server to a client (on matlab).
Thanks for your help.
Ricardo

25 Nov 2009 Anuradha

Can somebody pls let me know whether this "Instrumentation tool box" or "tcpip" function in MAtlab can be ued to read data received by the ethernet port?

Thank you.
Anuradha

27 May 2010 Benea Catalin

Question: How can I send data from matlab simulink with instrument control toolbox tcp/ip send/receive blocks , between 2 computers. What do I need to configure actually receive something on the remote computer

27 May 2010 ibrahim khalil

I have tried to use this example too but it didn't work. Try to write your own S-Function with a Client or a Server.

19 Nov 2010 Avinash Parnandi

Very good program for beginners.

Please login to add a comment or rating.
Updates
07 Aug 2006

Updated description

21 Aug 2006

Updated description

13 Dec 2006

Updated description

Tag Activity for this File
Tag Applied By Date/Time
external interface Steven Kolak 22 Oct 2008 08:33:32
lan The Instrument Control Team 05 Nov 2008 15:27:15
tcpip The Instrument Control Team 08 Nov 2008 14:34:50
udp The Instrument Control Team 08 Nov 2008 14:34:50
tcpip example The Instrument Control Team 08 Nov 2008 14:36:07
lan Steven Kolak 06 Jan 2009 11:20:08
udp Ali Mohammad Razeghi 27 May 2009 13:10:03
tcpip seven zhao 28 Mar 2011 08:28:04
tcpip Benjamin 07 Jun 2011 09:34:39
external interface rvv 17 Jun 2011 06:44:05
tcpip example saranga menike 29 Jun 2011 14:16:32
external interface nik nok 22 Aug 2011 07:04:09
external interface wana 14 Oct 2011 18:38:01

Contact us at files@mathworks.com