<?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=Index1.m</id>
	<title>Index1.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=Index1.m"/>
	<link rel="alternate" type="text/html" href="https://wiki-pnb.eri.ucsb.edu/index.php?title=Index1.m&amp;action=history"/>
	<updated>2026-04-08T00:57:31Z</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=Index1.m&amp;diff=202&amp;oldid=prev</id>
		<title>128.111.101.185: Created page with '&lt;pre&gt; function [indexing,merloc,depthloc] = index1(lcdin) %created by Erik Stassinos %3/16/10 %this function will scan through the lcd file and determine the column %position in …'</title>
		<link rel="alternate" type="text/html" href="https://wiki-pnb.eri.ucsb.edu/index.php?title=Index1.m&amp;diff=202&amp;oldid=prev"/>
		<updated>2010-08-05T23:21:14Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;&amp;lt;pre&amp;gt; function [indexing,merloc,depthloc] = index1(lcdin) %created by Erik Stassinos %3/16/10 %this function will scan through the lcd file and determine the column %position in …&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;
function [indexing,merloc,depthloc] = index1(lcdin)&lt;br /&gt;
%created by Erik Stassinos&lt;br /&gt;
%3/16/10&lt;br /&gt;
%this function will scan through the lcd file and determine the column&lt;br /&gt;
%position in the data field to operate on as well as locations of up and&lt;br /&gt;
%down cast points&lt;br /&gt;
&lt;br /&gt;
lcd = lcdin; %= 'za110211a.lcd'&lt;br /&gt;
fid = fopen(lcd);&lt;br /&gt;
&lt;br /&gt;
%---------------------loop1------------------------processed check&lt;br /&gt;
while feof(fid) ~= 1&lt;br /&gt;
&lt;br /&gt;
    checkline = fgets(fid);&lt;br /&gt;
    if strncmp(checkline,'bbopdespike',11) ==1&lt;br /&gt;
       disp('this file has already been despiked')&lt;br /&gt;
       disp('exiting')&lt;br /&gt;
       break&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
frewind(fid)&lt;br /&gt;
%----------------------endloop1-----------------end of processed check       &lt;br /&gt;
&lt;br /&gt;
%-----------------------loop2--------------location for index/time/depth&lt;br /&gt;
 for i = 1:50   &lt;br /&gt;
    line = fgets(fid);&lt;br /&gt;
        if strncmp(line,'castid',6) == 1&lt;br /&gt;
            intoloop = ftell(fid);&lt;br /&gt;
            count = 0;&lt;br /&gt;
            while strncmp(fgets(fid),'&amp;lt;sampled',8) ~= 1&lt;br /&gt;
               pos = ftell(fid);&lt;br /&gt;
                count = count + 1;&lt;br /&gt;
            end&lt;br /&gt;
             sprintf('%s %d %s','there are',count,'casts') &lt;br /&gt;
            fseek(fid,intoloop,-1);&lt;br /&gt;
             for t= 1:count&lt;br /&gt;
                 d= fgets(fid);&lt;br /&gt;
             n1(t,:) = textscan(d,'%*s %f %f %f');&lt;br /&gt;
        &lt;br /&gt;
             end&lt;br /&gt;
             break &lt;br /&gt;
        end&lt;br /&gt;
 end&lt;br /&gt;
  % n1(1,1)   &lt;br /&gt;
%-------------------endloop2--------------end location for index/time/depth   &lt;br /&gt;
&lt;br /&gt;
indexing(:,1) = n1(:,1);&lt;br /&gt;
merloc(:,1) = n1(:,2);&lt;br /&gt;
depthloc(:,1) = n1(:,3);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;[[index1]]&amp;lt;big&amp;gt;&lt;/div&gt;</summary>
		<author><name>128.111.101.185</name></author>
		
	</entry>
</feed>