Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static double t1=-1000,t2=-1000,t1pre,t2pre,t1post=-1,Nto1=1;
- if(v1pre>th && v1<=th) t1post=t;
- if(v1pre<th && v1>=th && t-t1>100)
- {
- t1pre=t1; t1=t;
- if((t1-t1pre)/(t2-t2pre)>2 || (t2-t2pre)/(t1-t1pre)>2) Nto1=0;
- if(t1pre>0 && t2>0 && Nto1==1) cerr<<d1<<‘\t’<<v0<<‘\t’<<vl<<‘\t’
- <<(t1-t2)<<‘\t’<<(t1-t1pre)<<‘\t’<<(t1post-t1pre)<<‘\t’<<(t1-t1post)<<‘\t’<<d3\<<‘\t’<<(t1post-t1pre)/(t1-t1pre)<<‘\t’<<(t1post-t1pre)<<endl;
- }
- if(v2pre<th && v2>=th && t-t2>100)
- {
- t2pre=t2; t2=t;
- // if(t2pre>0) cerr<<t<<‘\t’<<((t2-t1)/(t2-t2pre))<<endl;
- }
- }
- ofstream(“ini”)<<v1<<‘\t’<<v2<<‘\t’<<v3<<‘\t’<<v4<<‘\t’<<h1<<‘\t’<<h2<<‘\t’<<h3<<‘\t’<<h4<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement