Advertisement
Guest User

Untitled

a guest
Oct 9th, 2015
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. >>>error: 'sawtooth' undefined near line 17 column 6
  2. error: 'square' undefined near line 17 column 6
  3. >>>error: 'x1' undefined near line 17 column 21
  4. error: evaluating argument list element number 2
  5. >>>error: 'x2' undefined near line 18 column 21
  6. error: evaluating argument list element number 2
  7.  
  8. % program to plot a saw tooth and square wave
  9. fs = 10000;
  10. t = 0:1/fs:1.5;
  11. x1 = sawtooth(2*pi*50*t);
  12. x2 = square(2*pi*50*t);
  13. subplot(211);plot(t,x1);axis([0 0.2 -1.2 1.2]);
  14. xlabel('Time (sec)');ylabel('Amplitude');title('Sawtooth Periodic Wave');
  15. subplot(212);plot(t,x2);axis([0 0.2 -1.2 1.2]);
  16. xlabel('Time (sec)');ylabel('Amplitude');title('Square Periodic Wave');
  17. set(gcf,'Color',[1 1 1]);
  18.  
  19. sudo apt-get -q -y install octave-signal
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement