Generating a 6 second sine wave?
이전 댓글 표시
I'm supposed to generate a 6 seconds long sine wave that has amplitude of 1.0, frequency of 400Hz at a 8KHz sampling frequency, but I'm not sure how to control how long the wave lasts for.
채택된 답변
추가 답변 (1개)
Image Analyst
2014년 10월 7일
Hint: 6 seconds at 8000 times per second means that the vector (row array) will be 48000 elements long.
sineWave = sin(2*pi*freq*timeVector);
See if that's enough hints.
댓글 수: 3
Image Analyst
2014년 10월 8일
Well it looks like Azzi did it all for you. Though if you ever want to change the amplitude you should use
y = Amp * sin(2*pi*f*t);
Dick Rusell
2014년 10월 10일
Akpabio Ekpewoh
2019년 7월 11일
Yes, just use the icons on the top of the plot
카테고리
도움말 센터 및 File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!