Advertisement
rootuss

sinusPrint

Nov 3rd, 2019
475
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.36 KB | None | 0 0
  1. %%%%%%%%%%%%%%%%%  SINUS  %%%%%%%%%%%%%%%%%%%%%%
  2. function[n,x]=sinus11(A,f,fs,T,faza)
  3. x=zeros(1,fs*T);
  4. n=x;
  5. k=1;
  6. for i=0 : 1/fs : T
  7.     n(k)=i;
  8.     x(k)=A*sin(2*pi*f*i+faza*pi/180);
  9.     k=k+1;
  10. end
  11.  
  12. %lub
  13.  
  14. function[n,x]=sinus1(A,f,fs,T,faza)
  15. n=[0:1/fs:T]
  16. x= A*sin(2*pi*f*n+faza*pi/180)
  17.  
  18.  
  19.  
  20. % >>[t,y]=sinus(10,2,200,2,0);
  21. % >>plot(t,y);
  22. % >> grid on
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement