#include #include #include int main (int a,char *b[]){ double f,dt,u,t,trvani,trvanifakt,omega,y,y1,y2,z,theta,c,d; int U; y,y1,y2=0; U=atoi(b[1]); f=atof(b[2]); trvani=atof(b[3]); trvanifakt=trvani/1000; if(a!=4){printf("nespravny pocet parametru\n");return 0;} if(f<0){printf("frekvence nemuze byt zaporna\n");return 0;} if(U<0){printf("Napeti nemuze byt zaporne\n");return 0;} if(t<0){printf("cas nemuze byt zaporny\n");return 0;} theta=2*M_PI*(f/8000); dt=0.000125; omega=2*M_PI*f; c=sin(theta); d=2*cos(theta); for(t=-0.000125;t