How do I make DataBase after parse real time weather data in url ?
    4 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
    Jeong_evolution
      
 le 18 Oct 2016
  
    
    
    
    
    Réponse apportée : Walter Roberson
      
      
 le 18 Oct 2016
            Text like this
----------------------------------------
   <day1</day
   <temp13.1</temp
   <tmx23.3</tmx
   <tmn12.5</tmn
   <sky2</sky
   <pty0</pty
   <wfKor구름 조금</wfKor
   <wfEnPartly Cloudy</wfEn
   <pop10</pop
   <r120.0</r12
   <s120.0</s12
   <ws0.9</ws
   <wd0</wd
   <wdKor북</wdKor
   <wdEnN</wdEn
   <reh94</reh
   <r060.0</r06
   <s060.0</s06
----------------------------------------
To now, I make code is import string.
--------------------------------------------------------------------
url = 'http://www.kma.go.kr/wid/queryDFSRSS.jsp?zone=4146357000' ;
data = webread (url);
data(strfind(data, '>')) = [];
Key_1   = '<temp';
Index_1 = strfind(data, Key_1);
Value_1 = sscanf(data(Index_1(1) + length(Key_1):end), '%g', 1);
---------------------------------------------------------------------
value_1 = 13.1
But this data is changed three-hourly automatically.
So I want to make code that import value three-hourly automatically.
Please help me.
0 commentaires
Réponse acceptée
  Walter Roberson
      
      
 le 18 Oct 2016
        I recommend you leave the '>' in place, and that you use regexp() to find the information you need.
To import every three hours, use a timer() function.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
				En savoir plus sur String Parsing dans Help Center et File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!