logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Derek Worswick  
#1 Posted : Wednesday, July 23, 2014 3:13:30 PM(UTC)
Derek Worswick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 8/11/2005(UTC)
Posts: 104

Hi,

I would like to know of any corrections or improvement to this code.

Hoping that you can oblige.

Derek
----------------------------------------------------

Code:
 
( Ehlers_Early Onset }
LPPeriod:=Input("LPPeriod",3,100,30);K1:=Input("K1", 0.85,1, 0.85);K2:=Input("K2", 0.4,1,0.4);
alpha1:=(Cos(.707*360/100)+Sin(.707*360/100) - 1 )/Cos(.707*360/100) ;
HP:=(1-alpha1/2)*(1-alpha1/2)*(CLOSE-2 * Ref(CLOSE,-1)+Ref(CLOSE,-2))+ 2 * ( 1 - alpha1 ) * PREV- ( 1 - alpha1 ) * ( 1 - alpha1 ) *Ref( PREV,-1) ;
{ SuperSmoother Filter }a1:=Exp( -1.414 * 3.14159 / LPPeriod );b1:=2 *a1 * Cos( 1.414*180 / LPPeriod );c2:=b1;c3:=-a1*a1 ;c1:=1- c2-c3;Filt:=( c1 * (HP +Ref(HP,-1))/2+c2*PREV+ c3 * Ref(PREV,-1));
Peak1:=If(Abs(Filt)>PREV,Abs(Filt),PREV *0.991);X:=Filt/Peak1;
Quotient1:=(X+K1)/(K1*X+1) ;Quotient2:=(X+K2)/(K2*X+1) ;
Quotient1;Quotient2;0;
 
Laisze  
#2 Posted : Saturday, July 26, 2014 6:40:14 AM(UTC)
Laisze

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 11/18/2007(UTC)
Posts: 96
Location: HK


Derek, a better name for this contorted oscillator would be "Dementia_Early Onset".


Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.