ヘルプ センターヘルプ センター
サンプリングされた非周期的な矩形波
y = rectpuls(t)
y = rectpuls(t,w)
y = rectpuls(t) では、配列 t で示されるサンプル時間で t = 0 周辺に中央揃えされた、連続、非周期、および単位高さの矩形パルスが返されます。
y
t
0
例
y = rectpuls(t,w) では、幅 w の四角形が生成されます。
w
すべて折りたたむ
サンプル レート 10 kHz、幅 20 ms の矩形パルスを 200 ms 間生成します。
fs = 10e3; t = -0.1:1/fs:0.1; w = 20e-3; x = rectpuls(t,w);
同じパルスを 2 つ生成します。
1 つは 45 ms 過去に移動させます。
tpast = -45e-3; xpast = rectpuls(t-tpast,w);
1 つは 60 ms 未来に移動させ、幅を半分にします。
tfutr = 60e-3; xfutr = rectpuls(t-tfutr,w/2);
元のパルスとこの 2 つを同じ座標軸上にプロットします。
plot(t,x,t,xpast,t,xfutr) ylim([-0.2 1.2])
単位矩形パルスのサンプル時間。ベクトルとして指定します。
データ型: single | double
single
double
1
四角形の幅。正の数値として指定します。
単位振幅の矩形パルス。ベクトルとして返されます。
メモ
非ゼロ振幅の区間は、右側でオープンになるように定義されます。つまり、rectpuls(0.5) = 0 では rectpuls(-0.5) = 1 です。
rectpuls(0.5)
rectpuls(-0.5)
rectpuls は、パルス列生成関数 pulstran と共に使用できます。
rectpuls
pulstran
R2006a より前に導入
chirp | cos | diric | gauspuls | pulstran | sawtooth | sin | sinc | square | tripuls
chirp
cos
diric
gauspuls
sawtooth
sin
sinc
square
tripuls
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office