<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/151866</link>
    <title>MATLAB Central Newsreader - Find beginning of epoches</title>
    <description>Feed for thread: Find beginning of epoches</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Mon, 09 Jul 2007 04:05:29 -0400</pubDate>
      <title>Find beginning of epoches</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/151866#381786</link>
      <author>Kai Voges</author>
      <description>Hi everybody,&lt;br&gt;
&lt;br&gt;
when there is a time vector divided in several unequal epochs and&lt;br&gt;
there is an event somewhere on the time vector, how can I get out in&lt;br&gt;
which epoch the event is settled?&lt;br&gt;
&lt;br&gt;
greetz, Kai</description>
    </item>
    <item>
      <pubDate>Mon, 09 Jul 2007 09:43:45 -0400</pubDate>
      <title>Re: Find beginning of epoches</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/151866#381799</link>
      <author> NZTideMan</author>
      <description>On Jul 9, 8:05 pm, &quot;Kai Voges&quot; &amp;lt;kai.vo...@gmx.net&amp;gt; wrote:&lt;br&gt;
&amp;gt; Hi everybody,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; when there is a time vector divided in several unequal epochs and&lt;br&gt;
&amp;gt; there is an event somewhere on the time vector, how can I get out in&lt;br&gt;
&amp;gt; which epoch the event is settled?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; greetz, Kai&lt;br&gt;
&lt;br&gt;
You'll have to give us more details.&lt;br&gt;
To me an epoch is 18.6 years.&lt;br&gt;
The latest one was 1983 to 2001.&lt;br&gt;
AFAIK, there is no such thing as &quot;unequal epochs&quot;.&lt;br&gt;
They are governed by the positions of the Moon and Sun.</description>
    </item>
    <item>
      <pubDate>Mon, 09 Jul 2007 06:44:14 -0400</pubDate>
      <title>Re: Find beginning of epoches</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/151866#381806</link>
      <author>Kai Voges</author>
      <description>Ok, I see! Normaly we say sweep; but maybe this also isn&#180;t clear!&lt;br&gt;
&lt;br&gt;
It is a vector like&lt;br&gt;
a = [0 3 10 40 50 75 90 102 110 120];&lt;br&gt;
sec.&lt;br&gt;
Now there occurs an event at&lt;br&gt;
b = 51;&lt;br&gt;
sec.&lt;br&gt;
How to get the biggest number in a well below b:&lt;br&gt;
a(5) = 50;&lt;br&gt;
&lt;br&gt;
Is there a way to do it programatically?&lt;br&gt;
Thx, Kai</description>
    </item>
    <item>
      <pubDate>Mon, 09 Jul 2007 07:09:11 -0400</pubDate>
      <title>Re: Find beginning of epoches</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/151866#381814</link>
      <author>us</author>
      <description>kai voges:&lt;br&gt;
&amp;lt;SNIP looking for an event's time&lt;br&gt;
&lt;br&gt;
one of the solutions&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;a=0:10:40;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b=31;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[ix,ix]=min(abs(a-b));&lt;br&gt;
% the result&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[ix;a(ix);b]&lt;br&gt;
&lt;br&gt;
us</description>
    </item>
    <item>
      <pubDate>Mon, 09 Jul 2007 07:10:36 -0400</pubDate>
      <title>Re: Find beginning of epoches</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/151866#381815</link>
      <author>us</author>
      <description>kai voges:&lt;br&gt;
&amp;lt;SNIP looking for an event's time...&lt;br&gt;
&lt;br&gt;
one of the solutions&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;a=0:10:40;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b=31;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[ix,ix]=min(abs(a-b));&lt;br&gt;
% the result&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[ix;a(ix);b]&lt;br&gt;
&lt;br&gt;
us</description>
    </item>
    <item>
      <pubDate>Mon, 09 Jul 2007 07:28:00 -0400</pubDate>
      <title>Re: Find beginning of epoches</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/151866#381818</link>
      <author>Jos</author>
      <description>us wrote:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; kai voges:&lt;br&gt;
&amp;gt; &amp;lt;SNIP looking for an event's time...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; one of the solutions&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; a=0:10:40;&lt;br&gt;
&amp;gt; b=31;&lt;br&gt;
&amp;gt; [ix,ix]=min(abs(a-b));&lt;br&gt;
&amp;gt; % the result&lt;br&gt;
&amp;gt; [ix;a(ix);b]&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; us&lt;br&gt;
&lt;br&gt;
Another approach for multiple events:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;a=0:10:40;&lt;br&gt;
&amp;nbsp;&amp;nbsp;b= [31 ; 22 ; 5 ] ;&lt;br&gt;
&amp;nbsp;&amp;nbsp;[ix,ix] = histc(b,a) ;&lt;br&gt;
% the result&lt;br&gt;
&amp;nbsp;&amp;nbsp;[ix(:) a(ix).' b(:)]&lt;br&gt;
&lt;br&gt;
hth&lt;br&gt;
Jos</description>
    </item>
    <item>
      <pubDate>Tue, 10 Jul 2007 09:32:47 -0400</pubDate>
      <title>Re: Find beginning of epoches</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/151866#382134</link>
      <author>Vi&#240;arr</author>
      <description>&lt;br&gt;
&quot;kai voges&quot; &amp;lt;kai.voges@gmx.net&amp;gt; wrote in message &lt;br&gt;
news:ef5cd86.1@webcrossing.raydaftYaTP...&lt;br&gt;
&amp;gt; Ok, I see! Normaly we say sweep; but maybe this also isn&#180;t clear!&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; It is a vector like&lt;br&gt;
&amp;gt; a = [0 3 10 40 50 75 90 102 110 120];&lt;br&gt;
&amp;gt; sec.&lt;br&gt;
&amp;gt; Now there occurs an event at&lt;br&gt;
&amp;gt; b = 51;&lt;br&gt;
&amp;gt; sec.&lt;br&gt;
&amp;gt; How to get the biggest number in a well below b:&lt;br&gt;
&amp;gt; a(5) = 50;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Is there a way to do it programatically?&lt;br&gt;
&amp;gt; Thx, Kai&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
% Another way might be to do it using &quot;find&quot;:&lt;br&gt;
&lt;br&gt;
idx = find(a &amp;lt;= b);&lt;br&gt;
&lt;br&gt;
epoch = a(max(idx));&lt;br&gt;
&lt;br&gt;
sprintf('\n\ta(%d) = %f\n',idx,epoch)&lt;br&gt;
&lt;br&gt;
ans =&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;a(5) = 50.000000&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
% These can of course be combined into one line, unless you need to know &lt;br&gt;
what element of &quot;a&quot; corresponds to the epoch of interest:&lt;br&gt;
&lt;br&gt;
epoch = a(max(find(a &amp;lt;= b)));&lt;br&gt;
&lt;br&gt;
% For further information:&lt;br&gt;
help find&lt;br&gt;
help max&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Vi&#240;arr </description>
    </item>
    <item>
      <pubDate>Tue, 10 Jul 2007 17:52:44 -0400</pubDate>
      <title>Re: Find beginning of epoches</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/151866#382189</link>
      <author>aa</author>
      <description>idx = find(a &amp;lt;= b);&lt;br&gt;
&lt;br&gt;
&amp;nbsp;epoch = a(max(idx));&lt;br&gt;
&amp;nbsp;&lt;br&gt;
&amp;nbsp;sprintf('\n\ta(%d) = %f\n',idx,epoch)&lt;br&gt;
&lt;br&gt;
a= 0 3 10 40 50 75 90 102 110 120&lt;br&gt;
&lt;br&gt;
b= 103&lt;br&gt;
&lt;br&gt;
gives this&lt;br&gt;
&lt;br&gt;
	a(1) = 2.000000&lt;br&gt;
&lt;br&gt;
	a(3) = 4.000000&lt;br&gt;
&lt;br&gt;
	a(5) = 6.000000&lt;br&gt;
&lt;br&gt;
	a(7) = 8.000000&lt;br&gt;
&lt;br&gt;
	a(102) =&lt;br&gt;
&lt;br&gt;
cant , we make&lt;br&gt;
&lt;br&gt;
only a(8)=120&lt;br&gt;
&lt;br&gt;
thanks</description>
    </item>
    <item>
      <pubDate>Tue, 10 Jul 2007 19:22:21 -0400</pubDate>
      <title>Re: Find beginning of epoches</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/151866#382201</link>
      <author>us</author>
      <description>aa:&lt;br&gt;
&amp;lt;SNIP down to syntax error...&lt;br&gt;
&lt;br&gt;
&amp;gt; sprintf('\n\ta(%d) = %f\n',idx,epoch)&lt;br&gt;
&lt;br&gt;
should read&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sprintf('a(%d) = %f',idx(end),epoch)&lt;br&gt;
&lt;br&gt;
us</description>
    </item>
    <item>
      <pubDate>Wed, 11 Jul 2007 05:53:51 -0400</pubDate>
      <title>Re: Find beginning of epoches</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/151866#382229</link>
      <author>Urs (us) Schwarz</author>
      <description>aa:&lt;br&gt;
&amp;lt;SNIP down to syntax error...&lt;br&gt;
&lt;br&gt;
&amp;gt; sprintf('\n\ta(%d) = %f\n',idx,epoch)&lt;br&gt;
&lt;br&gt;
should read&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sprintf('a(%d) = %f',idx(end),epoch)&lt;br&gt;
&lt;br&gt;
us</description>
    </item>
    <item>
      <pubDate>Wed, 11 Jul 2007 03:13:25 -0400</pubDate>
      <title>Re: Find beginning of epoches</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/151866#382256</link>
      <author> NZTideMan</author>
      <description>On Jul 11, 5:53 pm, &quot;Urs (us) Schwarz&quot; &amp;lt;u...@neurol.unizh.ch&amp;gt; wrote:&lt;br&gt;
&amp;gt; aa:&lt;br&gt;
&amp;gt; &amp;lt;SNIP down to syntax error...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; sprintf('\n\ta(%d) = %f\n',idx,epoch)&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; should read&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;      sprintf('a(%d) = %f',idx(end),epoch)&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; us&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Oh dear, I think Urs is losing it losing it.&lt;br&gt;
Twice in this thread in this thread he's repeated himself repeated&lt;br&gt;
himself.</description>
    </item>
    <item>
      <pubDate>Wed, 11 Jul 2007 06:56:34 -0400</pubDate>
      <title>Re: Find beginning of epoches</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/151866#382258</link>
      <author>us</author>
      <description>NZTideMan:&lt;br&gt;
&amp;lt;SNIP false assumption&lt;br&gt;
&lt;br&gt;
&amp;gt; Twice in this thread in this thread he's repeated himself repeated&lt;br&gt;
himself...&lt;br&gt;
&lt;br&gt;
well, no: used this thread to try out TMW's new news engine, which i&lt;br&gt;
helped to test for a while...&lt;br&gt;
very best&lt;br&gt;
urs</description>
    </item>
  </channel>
</rss>

