<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div>Neglected to cc the Antelope list...</div><div><br></div><div><br><div>Begin forwarded message:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>From: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Jennifer Eakins &lt;<a href="mailto:jeakins@ucsd.edu">jeakins@ucsd.edu</a>&gt;</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Date: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">August 23, 2009 11:21:31 PM MDT</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>To: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">N. Seth Carpenter &lt;<a href="mailto:sethcarpent@gmail.com">sethcarpent@gmail.com</a>&gt;</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Subject: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><b>Re: [Antelope] differening dbsubset results</b></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Message-Id: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">&lt;<a href="mailto:D3D729EF-53B4-4455-9DCF-8D7B93990FA1@ucsd.edu">D3D729EF-53B4-4455-9DCF-8D7B93990FA1@ucsd.edu</a>&gt;</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>In-Reply-To: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">&lt;<a href="mailto:4A906948.9020106@coas.oregonstate">4A906948.9020106@coas.oregonstate</a>&gt;</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Content-Type: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">text/plain; charset=US-ASCII; format=flowed; delsp=yes</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>X-Smtp-Server: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">smtp.ucsd.edu:jeakins</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Content-Transfer-Encoding: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">7bit</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Mime-Version: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">1.0 (Apple Message framework v935.3)</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>References: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">&lt;<a href="mailto:4A906948.9020106@coas.oregonstate">4A906948.9020106@coas.oregonstate</a>&gt;</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div> </div><div>Hi Seth,<br><br>I am definitely not a Matlab expert, but here is my advice for what it is worth. &nbsp;When I do dbsubsets, I prefer to store the subset (so I can review it) and then run them individually. &nbsp;I also add some debugging checks for the number of records to see if I am getting what I expect. &nbsp;I suspect there is something not being parsed correctly in your subset string.<br><br>For instance, try something like:<br><br><br>&gt;&gt; db_wf = dbopen( 'tmp','r' );<br>&gt;&gt; db_wf = dblookup_table( db_wf,'wfdisc');<br><br>&gt;&gt; nrecs = dbquery(db_wf,'dbRECORD_COUNT');<br>&gt;&gt; &nbsp;disp(['number of records after station subset: ',num2str(nrecs)])<br>&gt;&gt; &nbsp;subtime1 = ['endtime&gt;=',num2str(mystarttime)]<br>&gt;&gt; &nbsp;subtime2 = ['time&lt;=',num2str(myendtime)]<br><br>&gt;&gt; &nbsp;db_wf &nbsp;= dbsubset(db_wf ,subtime1);<br>&gt;&gt; &nbsp;nrecs = dbquery(db_wf ,'dbRECORD_COUNT');<br>&gt;&gt; &nbsp;disp(['number of records after first time subset: ',num2str(nrecs)])<br><br>&gt;&gt; &nbsp;db_wf &nbsp;= dbsubset(db_wf ,subtime2);<br>&gt;&gt; &nbsp;nrecs = dbquery(db_wf ,'dbRECORD_COUNT');<br>&gt;&gt; &nbsp;disp(['number of records after second time subset: ',num2str(nrecs)])<br><br><br>You can try putting both of the parts of the subset together. &nbsp;An example that has worked for me (modify for your numeric times and wfdisc):<br><br>stagesub = &nbsp;['gtype=="sensor"&amp;&amp;chan=="BHZ"'] ;<br>dbstage = dbsubset(dbstage,stagesub);<br><br><br>--Jennifer<br><br><br>On Aug 22, 2009, at 3:55 PM, N. Seth Carpenter wrote:<br><br><blockquote type="cite">Hi, I am using antelope v4.10 on Mac. and am getting different results with a dbsubset command when I use it on command line vs. when I use it in matlab. On command line:<br></blockquote><blockquote type="cite">% dbsubset tmp.wfdisc "time &gt;= 1086443800 &amp;&amp; time &lt;= 1086447410" | dbquery - dbRECORD_COUNT<br></blockquote><blockquote type="cite">69<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">In matlab:<br></blockquote><blockquote type="cite">&gt;&gt; db_wf = dbopen( 'tmp','r' );<br></blockquote><blockquote type="cite">&gt;&gt; db_wf = dblookup_table( db_wf,'wfdisc');<br></blockquote><blockquote type="cite">&gt;&gt; db_wf = dbsubset( db_wf,['time &gt;= ' num2str( 1086443800 ) ' &amp;&amp; time &lt;= ' num2str( 1086447410 )]);<br></blockquote><blockquote type="cite">&gt;&gt; dbquery( db_wf,'dbRECORD_COUNT' )<br></blockquote><blockquote type="cite">ans =<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> &nbsp;&nbsp;0<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Can someone tell me what I am doing wrong or why I might expect these different results?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks,<br></blockquote><blockquote type="cite">Seth<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">Antelope mailing list<br></blockquote><blockquote type="cite"><a href="mailto:Antelope@brtt.net">Antelope@brtt.net</a><br></blockquote><blockquote type="cite"><a href="http://brtt.net/mailman/listinfo/antelope_brtt.net">http://brtt.net/mailman/listinfo/antelope_brtt.net</a><br></blockquote><br></div></blockquote></div><br></body></html>