strcat to sprintf

This commit is contained in:
2024-07-27 13:39:18 -04:00
parent 5a4bb8c90a
commit bb103a6f9a
6 changed files with 99 additions and 99 deletions

View File

@@ -366,9 +366,9 @@ if isequal(opt,'DB')||isequal(opt,'Both')
try
copyfile(DBfilename,DBupload)
catch ME
rep=getReport(ME, 'basic');
rep=strcat('Failed copyfile to ',DBupload,' -', rep);
errordlg(rep)
disp(sprintf('DB upload failed with error: %s\n', getReport(ME, 'basic')));
rep=sprintf('Failed copyfile to %s - %s', DBupload, rep);
errordlg(rep);
end
end
@@ -406,9 +406,9 @@ try
totPlCnt=totPlCnt+1;
if destPerMP>1 &&rem(totPlCnt,destPerMP)==1, mpCnt=mpCnt+1; end
if destPerMP==1,mpCnt=mpCnt+1; end
pertCnt= rem(totPlCnt,destPerMP);
pertCnt=rem(totPlCnt,destPerMP);
if pertCnt==0, pertCnt= destPerMP;end
pert= strcat('Perturb_',num2str(pertCnt));
pert=strcat('Perturb_',num2str(pertCnt));
s % BCR seems wrong
%Print Time Point HEADER for each plate for newly added intensity data
@@ -420,10 +420,10 @@ try
try
asd=cell2mat(scan(s).plate(1).CFparameters(1));
aucEndPt= strcat('AUC',num2str(asd(9)));
aucEndPt=strcat('AUC',num2str(asd(9)));
catch
asd=cell2mat(scan(s).plate(1).CFparameters{1,1}(1,384));
aucEndPt= strcat('AUC',num2str(asd(9)));
aucEndPt=strcat('AUC',num2str(asd(9)));
end
fprintf(fid, 'Num.\tDiagnostics\tDrug\tConc\tMedia\tModifier1\tConc1\tModifier2\tConc2\tORF\tGene');
fprintf(fid, '\t %s',aucEndPt);
@@ -475,8 +475,8 @@ try
rSq=outCmat(n,6);
lval=outCmat(n,5);
if Kval>160, selcode='K_Hi'; else selcode=' ';end
if Kval<40, selcode=strcat(selcode,' K_Lo'); end %12_1030
if rSq<.97 && rSq>0, selcode=strcat(selcode,' rSqLo'); end
if Kval<40, selcode=strcat(selcode,' K_Lo');end % TODO sprintf if you want a space
if rSq<.97 && rSq>0, selcode=strcat(selcode,' rSqLo');end
if lval>(0.85*(max(outTseries))), selcode=strcat(selcode,' late');end
if isnan(outCmat(n,7))||isnan(outCmat(n,8))||isnan(outCmat(n,9))...
||isnan(outCmat(n,10))||isnan(outCmat(n,11))...
@@ -497,7 +497,7 @@ try
riseTm=0;
end
if Ag(n)< .30*(scan(s).Awindow),selcode=strcat(selcode,' smArea'); end
if Ag(n)< .30*(scan(s).Awindow),selcode=strcat(selcode,' smArea'); end % same, need sprintf for space
if outCmat(n,3)==0,selcode=strcat('0 ',selcode); end
orf=cell2mat(MP(mpCnt).orf{1}(n));
gene=cell2mat(MP(mpCnt).genename{1}(n));
@@ -575,15 +575,15 @@ try
end
if isequal(opt,'DB')||isequal(opt,'Both')
if j<dataLength
intensBlob= strcat(intensBlob,num2str(outIntens(n,j)),';');
intensBlob=strcat(intensBlob,num2str(outIntens(n,j)),';');
else
intensBlob= strcat(intensBlob,num2str(outIntens(n,j)));
intensBlob=strcat(intensBlob,num2str(outIntens(n,j)));
end
if outTseries(j)<.0001,outTseries(j)=0;end
if j<dataLength
tmBlob= strcat(tmBlob,num2str(outTseries(j)),';');
tmBlob=strcat(tmBlob,num2str(outTseries(j)),';');
else
tmBlob= strcat(tmBlob,num2str(outTseries(j)));
tmBlob=strcat(tmBlob,num2str(outTseries(j)));
end
end
end
@@ -654,15 +654,15 @@ try
try
copyfile(DBfilename,DBupload)
catch ME
rep = getReport(ME, 'basic');
rep=strcat('Failed copyfile to ',DBupload,' -', rep);
disp(sprintf('DB upload failed with error: %s\n', getReport(ME, 'basic')));
rep=sprintf('Failed copyfile to %s - %s\n', DBupload, rep);
errordlg(rep)
end
end
msgbox([strcat('Printing Script complete. Check !!Results sheets in ',printResultsDir,' for results.')])
msgbox([sprintf('Printing Script complete. Check !!Results sheets in %s for results.', printResultsDir)])
catch ME
disp(strcat("Results printing failed with error: ", getReport(ME, 'basic')))
disp(sprintf('Printing Script failed with error: %s\n', getReport(ME, 'basic')));
end