Rank: 137 based on 434 downloads (last 30 days) and 18 files submitted
photo

Kevin Bartlett

E-mail
Company/University
University of Victoria
Lat/Long
48.4618, -123.3094

Personal Profile:
Professional Interests:
physical oceanography

 

Watch this Author's files

 

Files Posted by Kevin View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
26 Apr 2013 Screenshot Save and load Matlab "projects" in editor Saves and loads Matlab "projects" in editor (currently-open files, working directory, search path). Author: Kevin Bartlett editor, project, programming, tool, task management, ide 16 0
22 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 tcp, communications, network, tcpip, socket 225 39
  • 4.94118
4.9 | 17 ratings
30 Apr 2012 Screenshot Web-browser viewable GUI animations of .PNGs, .GIFs, etc. Creates javascript/html GUI-driven animation of still images (GIFs, JPEGs, etc.). Author: Kevin Bartlett gui, image processing, movie, animation, animated, javascript 12 2
  • 4.0
4.0 | 2 ratings
02 Apr 2012 Error-tolerant parsing of newline-delimited data Adaptive parsing of newline-separated data. Handles bad lines WITHOUT reading line-by-line. Author: Kevin Bartlett parse, parsing, newline, ascii, nmea, gps 1 0
07 Feb 2012 Screenshot Graphic depiction of timelines Makes horizontal timeline plot. Timelines can start and stop either once or multiple times. Author: Kevin Bartlett time, graphics, plot, timeline, project management 17 0
Comments and Ratings by Kevin View all
Updated File Comments Rating
19 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

@Qi--As near as I can tell, this is a bug with Java itself. I've added a description of the bug and the workaround to the program description above.

Thanks again for pointing this out.

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

@Qi--Thanks for the comment and especially for the test code. I'll see if I can replicate the error.

26 Feb 2013 A simple UDP communications application Sends/receives UDP packets using Matlab's Java interface. Author: Kevin Bartlett

@jawad--If you type "help judp" at the Matlab command line, you should see three simple examples that ought to work as a starting point. The third example is simplest because it uses 'localhost' as the destination for the udp packet; this means you can run both the 'receive' and 'send' judp commands from the same computer (in separate Matlab sessions). Just make sure the specified port, 21566, is open in your firewall.

05 Nov 2012 grep: a pedestrian, very fast grep utility a unix-like, very fast grep utility to find strings(s) in files of any type Author: us

I can't really rate this higher than a 4, because I've only used it in a single instance. That said, it did what I needed.

I'd also like to suggest that the documentation could be improved. It took me ages to figure out how to use a regular expression with grep.m, when a single example would have made it clear. For others who might be having the same problem, here is what I did:

[fl,p] = grep('-R','-s','Z.a5 0[04]',dataFileName);

'Z.a5 0[04]' is a regular expression (see "help regexp") that causes grep to search the specified file for the string 'Z' followed by any single character, followed by " 0", followed by "0" OR "4". p.match contains the matching line.

Incidentally, an explanation of the output arguments fl and p might be helpful. fl appears to contain the filename of the file searched, but I don't quite see the point of this, as the argument p contains the same information in one of its fields.

Don't take my criticisms in the wrong way, though--this program is much-needed and much-appreciated!

08 May 2012 Date Conversion Utility GUI A GUI utility to compute calendar date, GPS time, Julian day, and day of the week Author: Chad Webb

The time-conversion routines for GPS time look really useful, but I need to call them from within other programs, not via a GUI.

Have you considered creating a utc2gps() function that would take a Matlab-format time and convert it to GPS time? A gps2utc() companion function could convert back the other way. (files of these names already exist on FileExchange, but the author hard-coded leap seconds rather than using an algorithm, so it would have to be updated as years go by).

I would write this code myself, but

(a) I don't want to steal your thunder; and

(b) I'd rather somebody else did the work for me!

Comments and Ratings on Kevin's Files View all
Updated File Comment by Comments Rating
19 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 Bartlett, Kevin

@Qi--As near as I can tell, this is a bug with Java itself. I've added a description of the bug and the workaround to the program description above.

Thanks again for pointing this out.

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 Bartlett, Kevin

@Qi--Thanks for the comment and especially for the test code. I'll see if I can replicate the error.

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 Wang, Qi

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?

02 Mar 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 Michal

26 Feb 2013 A simple UDP communications application Sends/receives UDP packets using Matlab's Java interface. Author: Kevin Bartlett Bartlett, Kevin

@jawad--If you type "help judp" at the Matlab command line, you should see three simple examples that ought to work as a starting point. The third example is simplest because it uses 'localhost' as the destination for the udp packet; this means you can run both the 'receive' and 'send' judp commands from the same computer (in separate Matlab sessions). Just make sure the specified port, 21566, is open in your firewall.

Top Tags Applied by Kevin
communications, development, editor, gui, oceanography
Files Tagged by Kevin View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
26 Apr 2013 Screenshot Save and load Matlab "projects" in editor Saves and loads Matlab "projects" in editor (currently-open files, working directory, search path). Author: Kevin Bartlett editor, project, programming, tool, task management, ide 16 0
22 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 tcp, communications, network, tcpip, socket 225 39
  • 4.94118
4.9 | 17 ratings
30 Apr 2012 Screenshot Web-browser viewable GUI animations of .PNGs, .GIFs, etc. Creates javascript/html GUI-driven animation of still images (GIFs, JPEGs, etc.). Author: Kevin Bartlett gui, image processing, movie, animation, animated, javascript 12 2
  • 4.0
4.0 | 2 ratings
02 Apr 2012 Error-tolerant parsing of newline-delimited data Adaptive parsing of newline-separated data. Handles bad lines WITHOUT reading line-by-line. Author: Kevin Bartlett parse, parsing, newline, ascii, nmea, gps 1 0
07 Feb 2012 Screenshot Graphic depiction of timelines Makes horizontal timeline plot. Timelines can start and stop either once or multiple times. Author: Kevin Bartlett time, graphics, plot, timeline, project management 17 0

Contact us