Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>>error: 'sawtooth' undefined near line 17 column 6
- error: 'square' undefined near line 17 column 6
- >>>error: 'x1' undefined near line 17 column 21
- error: evaluating argument list element number 2
- >>>error: 'x2' undefined near line 18 column 21
- error: evaluating argument list element number 2
- % program to plot a saw tooth and square wave
- fs = 10000;
- t = 0:1/fs:1.5;
- x1 = sawtooth(2*pi*50*t);
- x2 = square(2*pi*50*t);
- subplot(211);plot(t,x1);axis([0 0.2 -1.2 1.2]);
- xlabel('Time (sec)');ylabel('Amplitude');title('Sawtooth Periodic Wave');
- subplot(212);plot(t,x2);axis([0 0.2 -1.2 1.2]);
- xlabel('Time (sec)');ylabel('Amplitude');title('Square Periodic Wave');
- set(gcf,'Color',[1 1 1]);
- sudo apt-get -q -y install octave-signal
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement