Create a Square Wave function without using the Matlab function square.
조회 수: 9 (최근 30일)
이전 댓글 표시
Hello! I would love to learn how to make a Square wave funtion to generate a unit amplitude with a 440 Hz square wave. A duty cycle of 0.2, 0.5 and 0.8, that last for 2 seconds. Using a sampling frequency of 44.1kHz.
Inputs are:
- Duty-cycle
- Total time for which the square wave is defined
- Sampling Frequency
- Fundamental frequency
OUTPUT:
- Square Waveform
All I have done
function [waveform] =SqWave(DutyC,Tt,Fs,Ff)
DutyC = 0.2;
Fs = 44100;
Further work : I will keep researching and find a solution but in the mean time I would like to hear feedback.
댓글 수: 0
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!