Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: help with char
Replies: 2   Last Post: Jan 1, 2014 8:23 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Jonathan Allan

Posts: 115
Registered: 12/7/04
help with char
Posted: Dec 20, 2013 3:46 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi,
I am trying to generate a script that can automatically download NDBC wave buoy data from their website.

My script so far is as follows:

clear all
mth={'Jan' 'Feb' 'Mar' 'Apr' 'May' 'Jun' 'Jul' 'Aug' 'Sep' 'Oct' 'Nov' 'Dec'};
dir={'http://www.ndbc.noaa.gov/data/stdmet/'}
cd ('C:\GetGnuWin32\bin')

for i=8
dum=[char('wget '),char(dir(:,1)),char(mth(:,i)),char('/')]
dum=sprintf(dum)
dum2=sprintf('46050%d2013.txt.gz',i);
command=sprintf(dum,dum2)
dos(command);
end

the goal is for:
command = wget http://www.ndbc.noaa.gov/data/stdmet/Aug/4605082013.txt.gz

I can't seem to figure out what I'm doing wrong.
Any help would be great.
Cheers
Jon



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.