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!