The Math Forum

Search All of the Math Forum:

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

Math Forum » Discussions » Software » comp.soft-sys.matlab

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 13,022
Registered: 12/26/06
Re: find meeting point
Posted: Oct 3, 2009 3:29 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Oct 3, 3:07 pm, "joe " <> wrote:
> "joe " <> wrote in message <ha80mt$>...
> > Hi
> > I have to find the time (point ) where the signal (sinus) and the axis (i.e y=10)...

> > thx
> Hi
> Here a example about this point
> 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.

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.