Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2008

Tip: Looking for answers? Try searching our database.

Check difference between two vectors

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
shapper - 15 Feb 2008 16:36 GMT
Hello,

Is it possible given two vectors, A and B, create a third vector, C,
using the following conditions, without a loop?

D = A - B

  If D(i) * D(i-1) < 0 and D(i) > 0 then C(i) = 1

  If D(i) * D(i-1) < 0 and D(i) < 0 then C(i) = -1

  If D(i) * D(i-1) > 0 then C(i) = 0

  ---

  If D(i) * D(i-1) = 0 then

      If D(i) * D(i-2) < 0 and D(i) > 0 then C(i) = 1

      If D(i) * D(i-2) < 0 and D(i) < 0 then C(i) = -1

      If D(i) * D(i-2) > 0 then C(i) = 0

 end

Basically I am creating a function that detects when a function
crosses under or over another function or a constant level ...

This was what I came up with ...
... the second part is because sometimes the values can be equal
before the cross occurs ...

I am trying to make this with vectors.

Thank You,
Miguel
shapper - 15 Feb 2008 16:38 GMT
> Hello,
>
[quoted text clipped - 32 lines]
> Thank You,
> Miguel

Ooops, forget it. I posted this on the wrong group.

Sorry,
Miguel

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.