how to transfer data
5 views (last 30 days)
Show older comments
Hai
I am new to matlab,I want to connect two computers in a matlab and want to send message (for example 'hai') from one system to another,can this be done,if yes please help me how to start with,i am new to matlab
[Information merged from second question]
I have a program compression and decompression of images,I have codes for it, i want to run compression on one computer and decompression on another computer, I am using matlab 7.10.0, is it possible to do, if so can u tell wat codes to add anf how to do it, I will greatful to u ,
Thanks in advance
0 Comments
Answers (2)
Walter Roberson
on 26 Nov 2011
Yes, it is possible.
You can send data between systems by using a serial port, or by using a parallel port, or by converting the data to audio signals and converting the audio back to data, or by connecting the two systems with a network cable and using UDP or TCP, or by installing WIFI on the systems and transferring the data wirelessly; or by other similar methods.
There are too many different possibilities for anyone to show sample code for each of the possibilities. You should narrow down your choices.
How far away will the systems be from each other? Is a physical cable between them practical? Does the environment have a lot of electromagnetic noise? Will there be a microwave oven operating nearby? What rate will the data transfer need to occur at? What is the maximum acceptable delay between the time that one system starts sending data and the time the data is available to MATLAB on the second system?
4 Comments
Daniel Shub
on 26 Nov 2011
The answer depends on a number of factors. Under MS Windows you can control MATLAB via activex: http://www.mathworks.co.uk/help/techdoc/matlab_external/brd0v3w.html You also might want to look at the distributed computing toolbox. You can also just launch MATLAB from MATLAB. Does your compression program need to talk to you decompression program?
There are also Java based solutions ...
3 Comments
Daniel Shub
on 28 Nov 2011
You can launch any system command with ! -- so to launch MATLAB you would do
!matlab
You can make MATLAB start a script/function with the -r flag, or you can launch in a directory that has a startup.m file that calls you function.
Deepu S S
on 5 Jan 2022
Hi ,how to tranfer stream of data from one matlab scrip to another, the two matlab scripts in a system. Is it posible?
Any demo available in MathWorks?
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!