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

Notification

Icon
Error

Options
Go to last post Go to first unread
KTP2  
#1 Posted : Wednesday, November 12, 2008 5:06:21 PM(UTC)
KTP2

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 2/2/2007(UTC)
Posts: 367

Was thanked: 1 time(s) in 1 post(s)

Affine transformation

sx:=Input("date of first point [ mmddyyyy ]",1,12350000,1032000); sxt:=Input("intraday time of first point[ 24 hour - hhmm ]",0,2460,0); ex:=Input("date of second point [ mmddyyyy ]",1,12350000,1032001); ext:=Input("intraday time of second point[ 24 hour - hhmm ]",0,2460,0); prs:=Input("scaling factor for slope calculation",1,100000,1); ops:=Input("shift value for affine display",0,100000,0);

sdt:= (Month()=Int(sx/1000000)) AND (DayOfMonth()=Rnd(Frac(Int(sx/10000)/100)*100)) AND (Year()=Rnd(Frac(sx/10000)*10000)) AND (Hour()= Int(sxt/100)) AND (Minute()=Rnd(Frac(sxt/100)*100));

edt:=Month()=Int(ex/1000000) AND DayOfMonth()=Rnd(Frac(Int(ex/10000)/100)*100) AND Year()=Rnd(Frac(ex/10000)*10000) AND (Hour()= Int(ext/100)) AND (Minute()=Rnd(Frac(ext/100)*100));

rise:=LastValue((ValueWhen(1,edt,C)-ValueWhen(1,sdt,C))*prs);
run:=LastValue(ValueWhen(1,edt,Cum(1))-ValueWhen(1,sdt,Cum(1)));
sl:=rise/run; tr:=((C-LastValue(ValueWhen(1,sdt,C)))-(Cum(1)-LastValue(ValueWhen(1,sdt,Cum(1))))*sl);
tr+ops

Users browsing this topic
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.