Main Content

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

rectpulse

説明

Y = rectpulse(X,nsamp) は、X に対して矩形パルス整形を実行し、Y を返します。その際、各サンプルを nsamp 回繰り返して X のサンプル レートを増加させます。

すべて折りたたむ

変調されたシンボルから成る配列を作成します。最初のチャネル (列) には QPSK 変調されたシンボルが格納されます。2 番目のチャネルには 16QAM 変調されたシンボルが格納されます。

M_psk = 4;   % PSK modulation order
M_qam = 16;  % QAM modulation order
nsymb = 10;  % Number of modulated symbols

ch1 = pskmod(randi([0 M_psk - 1],nsymb,1),M_psk,pi/4);
ch2 = qammod(randi([0 M_qam - 1],nsymb,1),M_qam);
X = [ch1 ch2];

変調されたシンボルの実数部と虚数部をプロットします。

figure
subplot(2,1,1)
stem(real(X))
grid on
xlabel('Symbols')
ylabel('\Re(X)')
subplot(2,1,2)
stem(imag(X))
grid on
xlabel('Symbols')
ylabel('\Im(X)')

Figure contains 2 axes objects. Axes object 1 with xlabel Symbols, ylabel \Re(X) contains 2 objects of type stem. Axes object 2 with xlabel Symbols, ylabel \Im(X) contains 2 objects of type stem.

シンボルあたりのサンプル数を設定します。

nsamp = 4;

矩形パルス整形を実行し、結果を表示します。

Y = rectpulse(X,nsamp);
figure
subplot(2,1,1)
plot(real(Y),'-') 
grid on
xlabel('Samples')
ylabel('\Re(y)')
ylim([-3.5 3.5])
subplot(2,1,2)
plot(imag(Y),'-')
grid on
xlabel('Samples')
ylabel('\Im(Y)')
ylim([-3.5 3.5])

Figure contains 2 axes objects. Axes object 1 with xlabel Samples, ylabel \Re(y) contains 2 objects of type line. Axes object 2 with xlabel Samples, ylabel \Im(Y) contains 2 objects of type line.

入力引数

すべて折りたたむ

入力シンボル。ベクトルまたは行列として指定します。X が複数の行を含む行列の場合、この関数は列を独立チャネルとして扱います。

データ型: double | single
複素数のサポート: あり

シンボルあたりのサンプル数。正の整数として指定します。

データ型: double | single

出力引数

すべて折りたたむ

出力サンプル。ベクトルまたは行列として返されます。

  • 入力 X がベクトルの場合、出力は、X に含まれる各サンプルを nsamp 回繰り返した結果で構成される L 要素ベクトルになります。ここで、L は length(X)*nsamp です。

  • 入力 X が行列の場合、この関数は各列を独立チャネルとして扱い、出力は L 行 M 列の行列になります。ここで、L は size(X,1)*nsamp、M は size(X,2) です。

データ型は X と同じです。

バージョン履歴

R2006a より前に導入