Square Wave Generator

Generate an array of values that represent a square wave.
ダウンロード: 832
更新 2011/11/5

ライセンスの表示

This is a simple function that returns an array of values that represent a square wave based on two essential inputs (total time and period) and four optional inputs (plot option, minimum amplitude, maximum amplitude, and resolution).

[f] = squareWave(time,per,plotChk,Amin,Amax,res)

Units are arbitrary, but time and amplitude are assumed.

The following examples illustrate its use:

[y] = squareWave(10,1);
OR
[y] = squareWave(10,1,1);
OR
[y] = squareWave(10,1,-1,1);
OR
[y] = squareWave(10,1,-1,1,1);
OR
[y] = squareWave(10,1,-1,1,1,1e5);

引用

John Pritchard (2024). Square Wave Generator (https://www.mathworks.com/matlabcentral/fileexchange/33622-square-wave-generator), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2009b
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersFourier Analysis and Filtering についてさらに検索
謝辞

ヒントを与えたファイル: Generation of Square,Triangular & Trapezoidal wave in MATLAB

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
バージョン 公開済み リリース ノート
1.3.0.0

Updated examples in help section of M-file to be more intuitive.

1.2.0.0

Examples in file description appropriately updated.

1.0.0.0