A=1/sqrt(2); % Define the bandwidth smoothing constant samples = 32; % Define how much we're oversampling t = -pi/2 : pi / (samples - 1) : pi / 2;% Define a time vector for a symbol middle = samples/2; % Define end of first half of symbol next = middle+1; % Define start of second half of symbol last = samples; % Define end of second half of symbol % % Waveform 0 is a flat line at A % s0(1:last) = A; % % Waveform 1 starts out flat, then curves up % s1(1:middle) = A; s1(next:last) = 1-(1-A)*cos(t(next:last)).*cos(t(next:last)); % % Waveform 2 Curves down, then is flat % s2(1:middle)=1-(1-A)*cos(t(1:middle)).*cos(t(1:middle)); s2(next:last)=A; % % Waveform 3 Starts at 1, curves down to A, then curves back up to 1 % s3(1:last)=1-(1-A)*cos(t).*cos(t); % % Waveform 4 is an S-curve from -A to +A % s4(1:middle)=sin(t(1:middle))+(1-A)*sin(t(1:middle)).*sin(t(1:middle)); s4(next:last)=sin(t(next:last))-(1-A)*sin(t(next:last)).*sin(t(next:last)); % % Waveform 5 is an S-curve from -A to +1 % s5(1:middle)=sin(t(1:middle))+(1-A)*sin(t(1:middle)).*sin(t(1:middle)); s5(next:last)=sin(t(next:last)); % % Waveform 6 is an S-curve from -1 to +A % s6(1:middle)=sin(t(1:middle)); s6(next:last)=sin(t(next:last))-(1-A)*sin(t(next:last)).*sin(t(next:last)); % % Waveform 7 is an S-curve from -1 to +1 % s7(1:last)=sin(t); % % Waveforms 8-15 are simply the negative versions of waveforms 0-7 (in other % words, they slope downwards instead of upwards, and vice versa. % s8=-s0; s9=-s1; s10=-s2; s11=-s3; s12=-s4; s13=-s5; s14=-s6; s15=-s7; % % Display the resulting waveforms one at a time, waiting for a key or a % button click after showing each plot. * plot(s0); drawnow; waitforbuttonpress; plot(s1); drawnow; waitforbuttonpress; plot(s2); drawnow; waitforbuttonpress; plot(s3); drawnow; waitforbuttonpress; plot(s4); drawnow; waitforbuttonpress; plot(s5); drawnow; waitforbuttonpress; plot(s6); drawnow; waitforbuttonpress; plot(s7); drawnow; waitforbuttonpress; plot(s8); drawnow; waitforbuttonpress; plot(s9); drawnow; waitforbuttonpress; plot(s10); drawnow; waitforbuttonpress; plot(s11); drawnow; waitforbuttonpress; plot(s12); drawnow; waitforbuttonpress; plot(s13); drawnow; waitforbuttonpress; plot(s14); drawnow; waitforbuttonpress; plot(s15);