HOW to import data to MATLAB

Hello Guys ....
I have question for you guys today.. so if you ready let's begin.
i have this website and i want to import the temperature for today in my city which is "VIENNA", and save my data ( temperature) to file in my computer.
my sincerely

1 件のコメント

Jan
Jan 2012 年 11 月 14 日
Please avoid double posting, because it wastes the time of the voluntary helpers. See http://www.mathworks.com/matlabcentral/answers/53476-how-to-getting-data-from-url.

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

 採用された回答

Thomas
Thomas 2012 年 11 月 12 日

0 投票

try this
syt=urlread('http://weather.yahoo.com/austria/vienna/vienna-551801/');
startvalue=strfind(syt,'day-temp-current temp-f');
temperature=syt(startvalue+26:startvalue+27)

5 件のコメント

sese
sese 2012 年 11 月 13 日
編集済み: sese 2012 年 11 月 13 日
Thank you so much Thomas, but 1- how can i save it to a file on my computer? 2- what is startvalue+26 & 27 ?
sincerely
Jan
Jan 2012 年 11 月 13 日
"startvalue+26" is the number you get, when 26 is added to the value of "startvalue". "startvalue" itself is the position of the string 'day-temp-current temp-f' inside the contents of the webpage.
We cannot gues how you can save "it". Please explain, what you want to save in which format.
sese
sese 2012 年 11 月 13 日
編集済み: sese 2012 年 11 月 13 日
thanks a lot Jan, but could you pls tell me how to get the Humidity and the wind speed how to get it?
sincerely
Jan
Jan 2012 年 11 月 14 日
You are welcome, sese. Please show what you have tried so far to get the Humidity and explain, which problems occurred. It should be possible to modify Thomas' example.
Rainaire Hansford
Rainaire Hansford 2020 年 9 月 8 日
Excuse me guys but I try to use this code and i didnt get any values. Also the website doesn't seem to work. Can this work on google weather?

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeData Import and Analysis についてさらに検索

質問済み:

2012 年 11 月 12 日

コメント済み:

2020 年 9 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by