Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: find meeting point
Replies: 11   Last Post: Oct 4, 2009 7:03 PM

 Messages: [ Previous | Next ]
 ImageAnalyst Posts: 13,022 Registered: 12/26/06
Re: find meeting point
Posted: Oct 3, 2009 3:29 PM

On Oct 3, 3:07 pm, "joe " <courstele...@yahoo.fr> wrote:
> "joe " <courstele...@yahoo.fr> wrote in message <ha80mt\$9t...@fred.mathworks.com>...
> > Hi
> > I have to find the time (point ) where the signal (sinus) and the axis (i.e y=10)...

>
> > thx
>
> Hi
> t=0:0.001:5;
> S=sin(2*pi*t)+sin(20*pi*t); my signal
> y=4;            the point
> plot(t,s,t,y,'k')
> I want to know the point the different time where y meet S...
>
> thanks

----------------------------------------------------------------
That's easy. The answer is "never" since s never exceeds 2.
Next time post code that will run. I had to fix three errors in your
code to get it to run. In general you might look for something like
aboveElements = (s > y);
if you want to find those elements where s is above y. Most likely it
will never exactly be equal so you have to know what you want.
Realize here that you're dealing with quantized arrays. If you really
want to know where y = s then you'll have to find the roots of the
equation s-y=0 and it the answer(s) may not lie exactly on array
elements - it may lie in between elements.

Date Subject Author
10/3/09 joe
10/3/09 joe
10/3/09 ImageAnalyst
10/3/09 joe
10/3/09 ImageAnalyst
10/4/09 joe
10/4/09 ImageAnalyst
10/3/09 Lin Li
10/4/09 joe
10/4/09 ImageAnalyst
10/4/09 joe
10/4/09 ImageAnalyst