Help with pskmod and plotting in GUI
Show older comments
so i'm trying to plot the waveform of BPSK like this in the fig but i only get a straight line

<<

>>
- Inputs are bitstream , intial phase shift - output is the waveform
here's the code :
if true
% Start of Carrier Intialization
Ts=1;f=4;
t=linspace(0,10*Ts,1000);
carrier=sin(2*pi*f*t);
% End of Carrier Intialization
% User Enters the MSG
BStream = strread(get(handles.BitStream,'String'));
symbols = BStream;
symbols = repmat(symbols,100,1);
symbols = reshape(symbols,1,1000);
% End of the MSG
P0 = str2double(get(handles.edit2,'String')); % Intial Phase shift
modSignal = pskmod(symbols,2,pi/P0); %BPSK Modulation
handles.modSignal = modSignal;
guidata(hObject,handles);
end
Answers (0)
Categories
Find more on BPSK in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!