Resume script despite HTTP response code errors

I have a script that will attempt to read a set of URLs via webread() function. Some will result in HTML errors (404, 301, etc) which stop the script. How can I modify webread() or other functions to make it continue despite the errors, perhaps returning a simple empty matrix if encountered.

 採用された回答

Walter Roberson
Walter Roberson 2016 年 2 月 1 日

0 投票

Use try/catch/end

その他の回答 (1 件)

Merrick
Merrick 2016 年 2 月 2 日

0 投票

Seems to work so far. Thanks!

製品

質問済み:

2016 年 2 月 1 日

回答済み:

2016 年 2 月 2 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by