%****** %This program uses the output of thermochron.m --the cell array myData %must be in memory as output from thermochron.m. myNames=[]; myBNum=[]; myOut=[]; myOrderedData=myOrdered; for i=1: length(myOrderedData) if i==1 myNames=myOrderedData{1,i}{1,1}; myNames=char(myNames, myOrderedData{1,i}{1,1}); %char concatenates char arrays %and padds with spaces, so all the same length. myBNum= myOrderedData{1,i}{1,2}; myBNum=char(myBNum, myOrderedData{1,i}{1,2}); else myNames=char(myNames, myOrderedData{1,i}{1,1}); myNames=char(myNames, myOrderedData{1,i}{1,1}); myBNum=char(myBNum, myOrderedData{1,i}{1,2}); myBNum=char(myBNum, myOrderedData{1,i}{1,2}); end if length(myOrderedData{1,i}{1,3})<=2048 %if the time and dates aren't full, pad for j=length(myOrderedData{1,i}{1,3})+1:2048; myOrderedData{1,i}{1,3}(j,1)=-999999999+datenum('30-Dec-1899')-.001; %pad times myOrderedData{1,i}{1,4}(j,1)=-999999999; %pad dates end elseif (myOrderedData{1,i}{1,3})>=2048 %if more than 2048 points, then check data, decrease size of %vector. for j=2049:length(myOrderedData{1,i}{1,3}); myOrderedData{1,i}{1,3}(j,:)=''; myOrderedData{1,i}{1,4}(j,:)=''; disp(myOrderedData{1,i}(1:2)); disp('had more than 2048 points. check data for this button!'); end end myOut=[myOut, myOrderedData{1,i}{1,3}-datenum('30-Dec-1899')+.001, myOrderedData{1,i}{1,4}]; end save mydata.out myOut -ASCII %output names and numbers in an easily copied format. disp('-------------------'); [myNames, myNames*0, myBNum]