OCEAN and manipulating a waveform

T

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
 
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.

On Tue, 16 Sep 2003 17:01:57 +0200, Thomas Popp <topo@sbox.tugraz.at> wrote:

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
--
Andrew Beckett
Senior Technical Leader
Custom IC Solutions
Cadence Design Systems Ltd
 
Andrew Beckett wrote:
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.

That worked perfectly, thanks a lot!


-Thomas
 

Welcome to EDABoard.com

Sponsor

Back
Top