parfor + loop problem

1 次查看(过去 30 天)
Farz Tak
Farz Tak 2016-11-8
Hi ,
I am trying to run this code to download data from ftp server. It says "too many argument even if I put the inter-loop inside a function. Any idea why this is happening? Thanks.
clc;clear all;close all;clear classes;
ftpobj = ftp('arthurhou.pps.eosdis.nasa.gov','farzaneh_takbiri@yahoo.com','farzaneh_takbiri@yahoo.com');
year={'2015'};
month={'01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'};
day = eomday(2015, 1:12);
path_V1=['/gpmdata/',year{1}];
outputt1 = ['/mnt/lustre2/efoufoula/takbi001/GPROF/',year{1}];
name = ['2A.GPM.GMI.GPROF*','.V04A.HDF5'];
parfor j=2:size(month,2);%%
path_V2=[path_V1,'/',month{j}];
outputt2 =[outputt1,'/',month{j}];
for k=1:day(j)
path_V = [path_V2,'/',sprintf('%02.0f', k),'/','gprof','/'];
outputt = [outputt2,'/',sprintf('%02.0f', k),'/'];
mkdir(outputt);
cd(ftpobj2,path_V);
pasv(ftpobj2);
mget(ftpobj2,name,outputt);
end
% ftp_get(day, path_V2, outputt2, name, ftpobj, j) ;
end

回答(1 个)

Walter Roberson
Walter Roberson 2016-11-8
You use
cd(ftpobj2,path_V);
but you do not define ftpobj2.

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by