Rank: 166 based on 314 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 14 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 123 49
  • 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 4 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 4 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 15 0
Comments and Ratings by Kevin View all
Updated File Comments Rating
05 Jun 2013 A simple UDP communications application Sends/receives UDP packets using Matlab's Java interface. Author: Kevin Bartlett

Sorry, Gabriel, I don't know how a multicast packet differs from a regular UDP packet. Can't you just receive them with judp() like a regular UDP packet?

24 May 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

@Geoffry Akien--I'm not able to duplicate your 2nd error (the one with jtcp_version01), so I'm not sure what to say about that. Your 1st error is really mysterious: a failed jtcp_request_connection() on my machine results in a "connect timed out" error, but the message you get says "Read timed out". I don't know the inner workings of Java well enough to understand why it should be attempting a read operation when you are requesting a connection, so I'm afraid I'm not going to be able to offer you any help here.

09 May 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

@Sally: You might use a try/catch block (if you're unfamiliar with these, type "doc try" on the command line).

08 May 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

@Sally: It may be possible to do what you want to do, but I don't know how. The only workaround I can think of is to simulate a longer timeout by repeatedly calling jtcp with a short timeout in a loop. You could then interrupt the attempt the normal way you interrupt a loop, i.e., using Ctrl-C, deleting a control file, a GUI callback, etc.

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.

Comments and Ratings on Kevin's Files View all
Updated File Comment by Comments Rating
05 Jun 2013 A simple UDP communications application Sends/receives UDP packets using Matlab's Java interface. Author: Kevin Bartlett Bartlett, Kevin

Sorry, Gabriel, I don't know how a multicast packet differs from a regular UDP packet. Can't you just receive them with judp() like a regular UDP packet?

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

Hi, thanks for this code. Can you submit a version that supports multicast? I am a novice user at this stuff but really need to read in a UDP multicast packet.

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

thanks very much for sharing this copy.

24 May 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

@Geoffry Akien--I'm not able to duplicate your 2nd error (the one with jtcp_version01), so I'm not sure what to say about that. Your 1st error is really mysterious: a failed jtcp_request_connection() on my machine results in a "connect timed out" error, but the message you get says "Read timed out". I don't know the inner workings of Java well enough to understand why it should be attempting a read operation when you are requesting a connection, so I'm afraid I'm not going to be able to offer you any help here.

23 May 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 Akien, Geoffrey

I want to use port 502 (I can't change this), but your code formally does not allow the user of ports <1025. I have a device which works just fine using tcpip in the instrument toolbox, but I was hoping to get rid of the dependency by using your code.

Naively changing this limit and using 2012bx64 on W7E I get the following:

>> j = jtcp('REQUEST', '10.10.10.4', 502)
Error using jtcp>jtcp_request_connection (line 293)
Java exception occurred:
java.net.SocketTimeoutException: Read timed out

at java.net.SocketInputStream.socketRead0(Native Method)

at java.net.SocketInputStream.read(Unknown Source)

at java.io.ObjectInputStream$PeekInputStream.read(Unknown Source)

at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown
Source)

at
java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown
Source)

at java.io.ObjectInputStream.readStreamHeader(Unknown Source)

at java.io.ObjectInputStream.<init>(Unknown Source)

Error in jtcp (line 230)
jTcpObj = jtcp_request_connection(host,port,timeout,serialize);

...but using the same approach with jtcp_version01 seems to work initially:

>> j = jtcp_version01('REQUEST', '10.10.10.4', 502)

j =

socket: [1x1 java.net.Socket]
remoteHost: '10.10.10.4'
port: 502
inputStream: [1x1 java.net.SocketInputStream]
dataInputStream: [1x1 java.io.DataInputStream]
outputStream: [1x1 java.net.SocketOutputStream]
dataOutputStream: [0 java.io.DataOutputStream]

...but then sending something gives this error:

jtcp_version01('WRITE', j, int8(c))
Error using jtcp_version01>jtcp_write (line 384)
Java exception occurred:
java.net.SocketException: Software caused connection abort: socket
write error

at java.net.SocketOutputStream.socketWrite0(Native Method)

at java.net.SocketOutputStream.socketWrite(Unknown Source)

at java.net.SocketOutputStream.write(Unknown Source)

at java.io.DataOutputStream.write(Unknown Source)

Error in jtcp_version01 (line 258)
jtcp_write(jTcpObj,mssg);

...although closing the connection seems to work without complaint.

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 14 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 123 49
  • 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 4 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 4 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 15 0

Contact us