In learning how to use webread the matlab examples and other api endpoints do not work, and an error code is not generated. I am not using a proxy. A direct link to the example in the browser works fine but webread does not seem to work with any api. Is there a product add on I need to buy or something else.
Below is the example code used.
url = 'http://heritage.stsci.edu/2007/14/images/p0714aa.jpg';
rgb = webread(url);
whos rgb
matlab error report on live code: Attempt to execute SCRIPT webread as a function
The matlab function urlread() works fine when tested.
Thank you in advance

 採用された回答

Stalin Samuel
Stalin Samuel 2017 年 9 月 1 日

0 投票

  • i Think you have saved your file name as "webread.m"
  • If so ,Kindly rename the file

3 件のコメント

E Jackson
E Jackson 2017 年 9 月 1 日
Thanks that worked. What made you suspect the file name ?
Stephen23
Stephen23 2017 年 9 月 1 日
編集済み: Stephen23 2017 年 9 月 1 日
The error message: the inbuilt webread is a function, but if there is a script in your local directory with the same name then that will get called instead. The error message tells us that a script got called. Thus a very likely cause is that you have a script called webread.
Tip: always use which to check names before you use them.
E Jackson
E Jackson 2017 年 9 月 1 日
Thanks once again, and have a great one.

サインインしてコメントする。

その他の回答 (0 件)

製品

タグ

質問済み:

2017 年 9 月 1 日

編集済み:

2017 年 9 月 1 日

Community Treasure Hunt

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

Start Hunting!

Translated by