Files

106 lines
4.1 KiB
Matlab
Executable File

global Exp
try % Try the whole routine
if strcmp(Exp(expN).DexpType,'multi') ||...
strcmp(Exp(expN).DexpType,'chrono')
DexpN=n;
end
rnames=[];
data=[];
try
cnames={'RF Name','Median','Mean','STD','Minimum','Maximum'};
rCnt=0;
RFfilename= fullfile(Exp(expN).Dexp(DexpN).resDir,'PrintResults','!RFsDiagnostics.txt');
fid=fopen(RFfilename,'w'); %('RFdiagnostic.txt','w');
ftitle= strcat(ExpPath,':::Reference Diagnostic Values');
try
fprintf(fid,'%s\n',ftitle);
catch mErr
errorMessage=mErr.message
msg='Check Permissions of PrintResult folder. !RFsDiagnostics.txt may not be created';
warning((msg));
warndlg('Check Permissions of PrintResult folder. !RFsDiagnostics.txt may not be created');
end
fprintf(fid,'%s\t %s\t %s\t %s\t %s\t %s','RF Name','Median','Mean','STD','Min','Max');
fprintf(fid,'\n');
rnames= cell(1,1);
for d=1:DMnum
try
% RF1 MasterPlate Stats
RFmd1LB=Exp(expN).Dexp(DexpN).RFmd1LB(d);
mval1=Exp(expN).Dexp(DexpN).RFmd1val(d);
mean1=Exp(expN).Dexp(DexpN).mean1(d);
std1=Exp(expN).Dexp(DexpN).std1(d);
min1=Exp(expN).Dexp(DexpN).min1(d);
max1=Exp(expN).Dexp(DexpN).max1(d);
fprintf(fid,'%s\t %7.2f\t %7.4f\t %7.4f\t %7.4f\t %7.4f\t\n',...
cell2mat(RFmd1LB), mval1,mean1,std1,min1,max1)
rCnt=rCnt+1;
data(rCnt,1:5)=[mval1,mean1,std1,min1,max1];
rnames(rCnt)=RFmd1LB;
catch
message='No RF1 MasterPlate'
end
try
% RF2 MasterPlate Stats
RFmd2LB=Exp(expN).Dexp(DexpN).RFmd2LB(d);
mval2=Exp(expN).Dexp(DexpN).RFmd2val(d);
mean2=Exp(expN).Dexp(DexpN).mean2(d);
std2=Exp(expN).Dexp(DexpN).std2(d);
min2=Exp(expN).Dexp(DexpN).min2(d);
max2=Exp(expN).Dexp(DexpN).max2(d);
fprintf(fid,'%s\t %7.2f\t %7.4f\t %7.4f\t %7.4f\t %7.4f\t\n', cell2mat(RFmd2LB),mval2,mean2,std2,min2,max2)
rCnt=rCnt+1;
data(rCnt,1:5)= [mval2,mean2,std2,min2,max2];
rnames(rCnt)= RFmd2LB;
catch
message='No RF2 MasterPlate'
end
% Distributed Global stats
try
RFmdGLB=Exp(expN).Dexp(DexpN).RFmdGLB(d);
mvalsDG=Exp(expN).Dexp(DexpN).RFmedianG(d);
RFmeanG=Exp(expN).Dexp(DexpN).RFmeanG(d);
RFstdG=Exp(expN).Dexp(DexpN).RFstdG(d);
maxG=Exp(expN).Dexp(DexpN).RFmaxG(d);
minG=Exp(expN).Dexp(DexpN).RFminG(d);
fprintf(fid,'%s\t %7.2f\t %7.4f\t %7.4f\t %7.4f\t %7.4f\t\n', cell2mat(RFmdGLB),mvalsDG,RFmeanG,RFstdG,minG,maxG)
rCnt=rCnt+1;
data(rCnt,1:5)=[mvalsDG,RFmeanG,RFstdG,minG,maxG];
rnames(rCnt)=RFmdGLB;
catch
message='No RF2 MasterPlate'
end
end
% Distributed RF1 Plates Stats Print
try
for d=1:DMnum
for mm=1:length(dMPs)
% RFmd1posD= Exp(expN).Dexp(DexpN).RFmdPindx(d,dMPs(mm));
% dMP= Exp(expN).Dexp(DexpN).RFmdPpltN(d,dMPs(mm)); %This is a storage of the MasterPlate used NOT the ScanPlate? WeMight wish to store the ScanPlateNumber also???
% rf1scNdisp= Exp(expN).Dexp(DexpN).RFmdPscanN(d,dMPs(mm));
RFmdPLB=Exp(expN).Dexp(DexpN).RFmdPLB(d,dMPs(mm));
mval1Disp=Exp(expN).Dexp(DexpN).RFmedianP(d,dMPs(mm));
mean1Disp=Exp(expN).Dexp(DexpN).meanP(d,dMPs(mm));
std1Disp=Exp(expN).Dexp(DexpN).stdP(d,dMPs(mm));
minDisp=Exp(expN).Dexp(DexpN).minP(d,dMPs(mm));
maxDisp=Exp(expN).Dexp(DexpN).maxP(d,dMPs(mm));
fprintf(fid,'%s\t %7.2f\t %7.4f\t %7.4f\t %7.4f\t %7.4f\t\n', cell2mat(RFmdPLB),mval1Disp,mean1Disp,std1Disp,minDisp,maxDisp);
rCnt=rCnt+1;
data(rCnt,1:5)=expjobsfld[mval1Disp,mean1Disp,std1Disp,minDisp,maxDisp];
rnames(rCnt)=RFmdPLB;
end
end
catch
message='No Distributed RF1 MasterPlates'
end
catch
Warndlg('Problem writing the RFdiagnosticSheet.txt file')
end
fclose(fid)
catch
msg='EZdiagRFsSheet.m failed. Check Permissions'
end