Prev: ARX/ARMAX
Next: Segmentation violation due to MEX code
From: Gunnar Aronsen on 16 Sep 2009 04:32 This is how a web-query my company require inputdata from matlab. Then you get a string in return, but for obvious reason can I not supply URL and other parameters for testing. %% BUILDING THE QUERY STRING % Define the cell-array that will pass values to the query. param = cell(1,18); % COMMENT: Notice that parametername and values are given in pairs. % Give in the URL BaseURL = 'http://your.address.com'; % Give in parameters for username. param{1,1} = 'user'; param{1,2} = 'YourUserName'; % Give in parameters for password. param{1,3} = 'pass'; param{1,4} = 'YourPassword'; % Make the part which contain information about seriesname. for i=1:noseries if i == 1 seriesstring = upper(seriesname{1,i}); else seriesstring =[series char(44) seriesname{1,i}]; end end % Give in parameters for seriesname. param{1,5} = 'series'; param{1,6} = seriesstring; % Give in parameters for starttime. param{1,7} = 'start'; param{1,8} = 'StartTime in the format required by the query'; % Give in parameters for endtime. param{1,9} = 'end'; param{1,10} = 'EndTime in the format required by the query'; % Give in parameters for interval. param{1,11} = 'interval'; param{1,12} = ''hour; % Give in parameters for dataformat. param{1,13} = 'format'; param{1,14} = 'am'; % Give in parameters for emptydata treatment. param{1,15} = 'emptydata'; param{1,16} = 'yes'; % Give in parameters for fileformat, we support html and xml param{1,17} = 'fileformat'; param{1,18} = 'html'; %% READ OUT DATA varargout = urlread(URL,'get',param);
|
Pages: 1 Prev: ARX/ARMAX Next: Segmentation violation due to MEX code |