parallel function commputing error

2 views (last 30 days)
Muhammad Usman Saleem
Muhammad Usman Saleem on 15 Aug 2016
I have 17 excel files in my folder i am trying to read them one by one and trying to use Kendall Test , i am calling this function in my code below
file=dir('*.xlsx');
thisfile=sort({file.name});
mkdir('MK');
Unme=pwd;
newdirof1=[Unme,'\MK'];
for kk=15%length(thisfile)
infile1=thisfile{kk};
whichfile1 = sscanf(infile1, '%c%c%c%c');
mydata=xlsread(infile1);
%yourdata=mydata(:,3);
datain=mydata.';
alpha=0.05;
wantplot=1;
[taub tau h sig Z S sigma sen n senplot CIlower CIupper D Dall C3 nsigma] = ktaub(datain, alpha, wantplot)
preparewell=char(strrep(infile1(1:4), '-', ''));
TileName=['SEN SLOPE ON ',' ',preparewell,' ', 'hPa'];
title(TileName,'fontweight','bold','fontsize',16)
thisname=char(strrep(newdirof1(end-4:end),'\',''));
%thisName=myName(end-1:end);
finalname1=[thisname,preparewell];
print(finalname1,'-dtiff','-r300');
yname=strcat(finalname1,'.tif');
movefile(yname,newdirof1);
finalname2=[char(strrep(newdirof1(end-4:end),'\','')),char(strrep(infile1(1:4), '-', ''))];
myheader={'taub','tau' ,'h', 'sig', 'Z', 'S' ,'sigma', 'sen', 'n','senplot','CIlower', 'CIupper' ,'D' ,'Dall','C3', 'nsigma'};
xlswrite(finalname2,myheader,'Sheet1','B1');
xlswrite(finalname2,taub,'Sheet1','B2');
xlswrite(finalname2,tau,'Sheet1','C2');
xlswrite(finalname2,h,'Sheet1','D2');
xlswrite(finalname2,sig,'Sheet1','E2');
xlswrite(finalname2,Z,'Sheet1','F2');
xlswrite(finalname2,S,'Sheet1','G2');
xlswrite(finalname2,sigma,'Sheet1','H2');
xlswrite(finalname2,sen,'Sheet1','I2');
xlswrite(finalname2,n,'Sheet1','J2');
xlswrite(finalname2,senplot,'Sheet1','K2');
xlswrite(finalname2,CIlower,'Sheet1','L2');
xlswrite(finalname2,CIupper,'Sheet1','M2');
xlswrite(finalname2,D,'Sheet1','N2');
xlswrite(finalname2,Dall,'Sheet1','O2');
xlswrite(finalname2,C3,'Sheet1','P2');
xlswrite(finalname2,nsigma,'Sheet1','Q2');
Tname=[finalname2,'.xls'];
movefile(Tname,newdirof1);
end
But this function runing fine for some excel files and not ploting graph for some excel files?
Any body guide me what mistake i am consistance doing?
Thanks always..

Answers (0)

Categories

Find more on Data Distribution Plots in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!