Plotting a sine ave
이전 댓글 표시
Hello, I want to plot function of sound wave
y=A1sinh(2pift)^2-1.Asin(2pift)
The code that I have written is given below
clc;
clear all;
close all;
fs=2400; %sampling frequencyy=
f1=0.5; %frequency of the sound wave
f2=200;
A1=1
A2=1
t=0:10/fs:1;
y=((A1*sinh(2*pi*f1*t).^2)-1).*(A2*sin(2*pi*f2*t));
plot(t,y)
sound(y);
댓글 수: 4
KSSV
2022년 6월 5일
It is working right? What question you have specifically?
BASIT ALI
2022년 6월 5일
Dyuman Joshi
2022년 6월 5일
I checked the code on my laptop, the code runs fine and it produces a sound as well, but just a short beep.
(Increase your sampling frequency to get a longer sound or use earphones to hear the sound)
BASIT ALI
2022년 6월 6일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Animation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
