OCEAN and manipulating a waveform

Discussion in 'Cadence' started by Thomas Popp, Sep 16, 2003.

  1. Thomas Popp

    Thomas Popp Guest

    Hi!

    I have a waveform and want to set all y-values of the waveform which are
    negative to 0.

    Any hints on how I can accomplish this task easily with OCEAN?

    Thanks for any help!

    -Thomas Popp
     
    Thomas Popp, Sep 16, 2003
    #1
  2. If the waveform is in a variable a, a simple way is to do:

    (abs(a)+a)/2.0

    To get the positive parts set to 0, it would be:

    (abs(a)-a)/2.0

    Simpler than messing around with all the points, but it doesn't interpolate at
    zero crossings, so it may not be exactly what you want...

    Andrew.
     
    Andrew Beckett, Sep 16, 2003
    #2
  3. Thomas Popp

    Thomas Popp Guest


    That worked perfectly, thanks a lot!


    -Thomas
     
    Thomas Popp, Sep 23, 2003
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.