Help with pskmod and plotting in GUI
이전 댓글 표시
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
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 BPSK에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!