find psk,fsk,ask in matlab

To find the phase-shift keying (PSK), frequency-shift keying (FSK), and amplitude-shift keying (ASK) signals in MATLAB, you can use the awgn function along with the pskmod, fskmod, and askmod functions. Here's an example of how to generate and plot these signals:

main.m
% Define the input data
data = [1 0 1 1 0 1 0 0];

% Define the modulation parameters
M = 2;                % Number of symbols in PSK (2 for binary PSK)
frequencies = [100 200]; % Frequencies for FSK modulation

% Modulate the input data
pskSignal = pskmod(data, M);
fskSignal = fskmod(data, frequencies);
askSignal = askmod(data);

% Add white Gaussian noise to the signals
snr = 10; % Signal-to-noise ratio in dB
noisyPskSignal = awgn(pskSignal, snr);
noisyFskSignal = awgn(fskSignal, snr);
noisyAskSignal = awgn(askSignal, snr);

% Plot the original and noisy signals
subplot(411)
stem(data)
title('Input data')

subplot(412)
plot(pskSignal)
title('PSK signal')

subplot(413)
plot(fskSignal)
title('FSK signal')

subplot(414)
plot(askSignal)
title('ASK signal')
766 chars
35 lines

In this example, data is the input data that you want to modulate. The pskmod, fskmod, and askmod functions are used to modulate the input data into PSK, FSK, and ASK signals, respectively. The awgn function is then used to add white Gaussian noise to the signals to simulate a noisy environment.

Note that you need the Communications Toolbox in MATLAB to use the pskmod, fskmod, and askmod functions.

related categories

gistlibby LogSnag