Square Wave Generator

버전 1.3.0.0 (1.65 KB) 작성자: John Pritchard
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 CenterMATLAB Answers에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

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