Rank: 74860 based on 0 downloads (last 30 days) and 0 file submitted
photo

Qi Wang

E-mail

Personal Profile:

 

Watch this Author's files

 

Comments and Ratings by Qi Wang View all
Updated File Comments Rating
10 Apr 2013 TCP/IP Communications in Matlab Sends/receives TCP packets using Matlab's Java interface. Now handles matrices and cell arrays, etc. Author: Kevin Bartlett

Hi Kevin,

Your great script is exactly what I was looking for. However after playing with it for sometime, I found a problem. I use it to transmit a lot of data between two matlab processes. After a certain among of data has been transmitted, there will be an error happened as follow:

Error using jtcp>jtcp_write (line 373)
Java exception occurred:
java.lang.OutOfMemoryError: Java heap space

Error in jtcp (line 234)
jtcp_write(jTcpObj,mssg);

How much data can be transmited before the error happen depends on the java heap size setting in matlab. It seems the data was never cleared in the matlab java heap memory.

here is the code I use for testing:
%%%%%%%%%%%%%%%%%%%%%%%%
jTCPObj = jtcp('ACCEPT', 3000,'TIMEOUT',30*60*1000);
cnt = 0;
while 1
cnt = cnt + 1;

data = [];
while isempty(data)
data = jtcp('READ', jTCPObj);
end
disp(['data packet: ' num2str(cnt) ' received']);
end

%%%%%%%%%%%%%%%%%%%%%%%%
jTCPObj = jtcp('REQUEST','localhost',3000,'TIMEOUT',2000);
cnt = 0;
while 1
cnt = cnt + 1;
disp(['data packet: ' num2str(cnt)]);
data = rand(1024*1024, 1);
jtcp('WRITE', jTCPObj, data);
end

I am not familiar with java. I don't know it is I made some mistake or there is a problem related to java in your functions?

23 Aug 2011 NVIDIA CUDA-based bilinear (2D) interpolation Incredible speed boost in comparison to the Matlab implementation. (interp2) Author: Gerald Buchgraber

Please correct me if I am wrong.

In "bilininterp_speed_test.m", cudainterp2 and matlab's interp2 generate a output matrix, however bilininterp only interpolate one point in each loop. That is why it gets faster when the matrix getting bigger.

The input to bilininterp should be same like interp2 to have the same output dimension. And if it is done correctly, bilininterp's speedup is ~5 compared to cudainterp2's speedup of ~8 on my GTX460.

Contact us