Generation of triangle wave

버전 1.2.0.0 (101 Bytes) 작성자: Michele Antolini
This function allows the generation of a triangular wave.
다운로드 수: 1.4K
업데이트 날짜: 2014/10/27

라이선스 보기

The usage is the same as sin(2*pi*f*t), but the triangular wave is generated with an amplitude between 0 and 1.
So to generate one second of a triangle wave of amplitude 2 with frequency 5 Hz (sampled each millisecond)

f = 5;
t = 0:0.001:1;
A = 2;
wave = A*triangle(2*pi*f*t);

Note: the wave is generated with positive amplitude (i.e. centered around half of the amplitude). Check the comment in the code to easily change this behaviour.

인용 양식

Michele Antolini (2024). Generation of triangle wave (https://www.mathworks.com/matlabcentral/fileexchange/46987-generation-of-triangle-wave), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2013a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Random Number Generation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.2.0.0

Changed title and description

1.1.0.0

new tags

1.0.0.0