No License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Rewrites of urlread and urlwrite

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

5.0 | 2 ratings Rate this file 7 Downloads (last 30 days) File Size: 5.06 KB File ID: #8474 Version: 1.0

Rewrites of urlread and urlwrite



13 Sep 2005 (Updated )

Adding TIMEOUT to both url functions.

| Watch this File

File Information

Two days ago, on MATLAB Newsgroup, I found Greggory asking something about "urlread" which is lack of TIMEOUT capability. And such a deficiency often leads to an embarrassing and horriable situation that main function gets freezed easily when the network is busy or abnormal.

At the beginning, I tried to follow the asker by using a timer, but it failed finally. The reason I thought is that timer can not interrupt the
 task being busy at all and yet MATLAB doesn't have a scheme for using multi-threads so far. Fortunately, I discovered another hope that a part of urlread is written in JAVA. So I tried to modify the urlread function by adding a "timeout" parameter, enabling it to automatically stop the request at a time the user specified.


This file inspired Urlread2.

MATLAB release MATLAB 7.0.4 (R14SP2)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
24 Oct 2007 Dimitri Shvorob

..Following up on Christian's comment, has TMW done so?

30 Aug 2006 Christian Schwarzbauer

A very useful modification of the original Matlab functions urlread.m and urlwrite.m! I hope Matlab will include it in their next release.

Contact us