#include #include #include #include int main(int neco, char *x[]) { int b; float vk, as, ks, t, asu, y,ar,dt,n,r,s,q; vk = atof(x[1]); as = atof(x[2]); ks = atof(x[3]); t = atof(x[4]); asu=atof(x[5]); srandom(t*10); //seed aby to random cislo bylo vzdy nahodne dt=1/vk; n=t/dt/1000; for (b = 0; b < n+1; b++) { r=random() %1000000; //generovani sumu s=random() %1000000; q=(r-s)/1000000*asu; y = as * sin(2 * M_PI * ks * dt*b)+q; //pocitani sinusovky printf("%9.6f \n", y); } return 0; }