MATLAB: How to do transmission of jpeg file using bluetooth or wifi hotspot to another computer which also have an matlab software

bluetooth transmission

I am working on project in which we have to transmit an file through wireless communication either via bluetooth or by an wifi direct. Please help me to overcome from this problem

Best Answer

fid = fopen('NameOfImageFile.jpg', 'r'); %not 'rt' !
bytes = fread(fid, [1 inf], '*uint8');
fclose(fid)
Now bytes is a uint8 vector that can be transmitted.
On the destination end, read the bytes and write them to a file.
Related Question