<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki-pnb.eri.ucsb.edu/index.php?action=history&amp;feed=atom&amp;title=Ctd2strip_v2.m</id>
	<title>Ctd2strip v2.m - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki-pnb.eri.ucsb.edu/index.php?action=history&amp;feed=atom&amp;title=Ctd2strip_v2.m"/>
	<link rel="alternate" type="text/html" href="https://wiki-pnb.eri.ucsb.edu/index.php?title=Ctd2strip_v2.m&amp;action=history"/>
	<updated>2026-04-19T20:04:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>https://wiki-pnb.eri.ucsb.edu/index.php?title=Ctd2strip_v2.m&amp;diff=193&amp;oldid=prev</id>
		<title>128.111.101.185: Created page with '&lt;pre&gt; %CTD2STRIP.M %function to add header information to the flat ctd files. %called by merge_ctdac9_v2 ----Modified by Erik S. %Modified to print ctd_head here instead of in me…'</title>
		<link rel="alternate" type="text/html" href="https://wiki-pnb.eri.ucsb.edu/index.php?title=Ctd2strip_v2.m&amp;diff=193&amp;oldid=prev"/>
		<updated>2010-08-05T22:32:51Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;&amp;lt;pre&amp;gt; %CTD2STRIP.M %function to add header information to the flat ctd files. %called by merge_ctdac9_v2 ----Modified by Erik S. %Modified to print ctd_head here instead of in me…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
%CTD2STRIP.M&lt;br /&gt;
%function to add header information to the flat ctd files.&lt;br /&gt;
%called by merge_ctdac9_v2 ----Modified by Erik S.&lt;br /&gt;
%Modified to print ctd_head here instead of in merge_ctdac9_v2 6/7/2010&lt;br /&gt;
% '%%%' means modified 6/7/2010&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function   ctd2strip(pb,ctd_base) %%% pass in pb and eliminated 'head' return&lt;br /&gt;
&lt;br /&gt;
here = pwd;&lt;br /&gt;
cd .. %%%&lt;br /&gt;
cd CTD; %%%&lt;br /&gt;
cd(pb); %%%&lt;br /&gt;
cd hdr; %%%&lt;br /&gt;
&lt;br /&gt;
ctd_base;&lt;br /&gt;
% % [s,name]=unix([ 'grep name ' ctd_base '.hdr']); &lt;br /&gt;
% % if length(name) &amp;gt; 20&lt;br /&gt;
% %    [s,name]=unix([ 'grep name ' ctd_base '.HDR']);&lt;br /&gt;
&lt;br /&gt;
                [s,name]=unix([ 'grep name ' ctd_base '.hdr']);&lt;br /&gt;
              %%%  if length(name) &amp;gt; 20&lt;br /&gt;
              %%%     [s,name]=unix([ 'grep name ' ctd_base '.HDR'])&lt;br /&gt;
              %%%    true =1;&lt;br /&gt;
              %%%  end&lt;br /&gt;
               %%% if true ==1&lt;br /&gt;
                %%%    [s,time]=unix([ 'grep Time ' ctd_base '.HDR'])&lt;br /&gt;
               %%%else&lt;br /&gt;
                [s,time]=unix([ 'grep Time ' ctd_base '.hdr']);&lt;br /&gt;
                %%%end&lt;br /&gt;
%               [s,time]=unix([ 'grep Time ' ctd_base '.HDR'])&lt;br /&gt;
         &lt;br /&gt;
         &lt;br /&gt;
                     time=eval('[''# '' parse(time,-6)]');&lt;br /&gt;
                     file  = strcat(ctd_base,'.hdr'); %%%&lt;br /&gt;
                     file2 = strcat('ctd_head_n');%%%&lt;br /&gt;
                     fid2 = fopen(file2,'w');%%%&lt;br /&gt;
                     fid = fopen(file,'r');%%%&lt;br /&gt;
                     pwd&lt;br /&gt;
                     line =0;%%%&lt;br /&gt;
                     while strncmp(line,'# name',6) ~=1%%%&lt;br /&gt;
                         telllast = ftell(fid);&lt;br /&gt;
                     line = fgets(fid);%%%&lt;br /&gt;
                     end%%%&lt;br /&gt;
                     count = 1;%%%&lt;br /&gt;
                     whos;&lt;br /&gt;
                     &lt;br /&gt;
                     fprintf(fid2,'%s\n',time)&lt;br /&gt;
                     fseek(fid,telllast,-1);&lt;br /&gt;
                     while strncmp(line,'# span',6) ~=1%%&lt;br /&gt;
                         line = char(fgets(fid));%%%&lt;br /&gt;
                         if strncmp(line,'# span',6) ==1%%%&lt;br /&gt;
                             break%%%&lt;br /&gt;
                         end&lt;br /&gt;
                         fprintf(fid2,'%s',line)%%%&lt;br /&gt;
                     end&lt;br /&gt;
pwd;&lt;br /&gt;
fclose(fid);&lt;br /&gt;
fclose(fid2);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
unix('mv ctd_head_n ../../../processing'); %%%&lt;br /&gt;
cd(here);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
return&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;[[ctd2strip_v2]]&amp;lt;big&amp;gt;&lt;/div&gt;</summary>
		<author><name>128.111.101.185</name></author>
		
	</entry>
</feed>