Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.82 KB | None | 0 0
  1. static double t1=-1000,t2=-1000,t1pre,t2pre,t1post=-1,Nto1=1;
  2.     if(v1pre>th && v1<=th) t1post=t;
  3.     if(v1pre<th && v1>=th && t-t1>100)
  4.     {
  5.       t1pre=t1; t1=t;
  6.       if((t1-t1pre)/(t2-t2pre)>2 || (t2-t2pre)/(t1-t1pre)>2) Nto1=0;
  7.       if(t1pre>0 && t2>0 && Nto1==1) cerr<<d1<<‘\t’<<v0<<‘\t’<<vl<<‘\t’
  8.                   <<(t1-t2)<<‘\t’<<(t1-t1pre)<<‘\t’<<(t1post-t1pre)<<‘\t’<<(t1-t1post)<<‘\t’<<d3\<<‘\t’<<(t1post-t1pre)/(t1-t1pre)<<‘\t’<<(t1post-t1pre)<<endl;
  9.     }
  10.     if(v2pre<th && v2>=th && t-t2>100)
  11.     {
  12.       t2pre=t2; t2=t;
  13. //      if(t2pre>0) cerr<<t<<‘\t’<<((t2-t1)/(t2-t2pre))<<endl;                        
  14.     }
  15.   }
  16.   ofstream(“ini”)<<v1<<‘\t’<<v2<<‘\t’<<v3<<‘\t’<<v4<<‘\t’<<h1<<‘\t’<<h2<<‘\t’<<h3<<‘\t’<<h4<<endl;
  17.   return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement