MATLAB之简谐信号声音的生成及其调制性

文章目录

  • MATLAB之简谐信号声音的生成和保存
  • MATLAB之声音的调制特性

MATLAB之简谐信号声音的生成和保存

clc;
clear all;
clear out;
dFs = 2^14;
f = 2^8;
t = 0:1/dFs:360;
y = sin(2*pi*f*t);
plot(t,y)

% tic;
% sound(y,dFs);
% toc;
% clear sound

filename = 'sine.wav';
audiowrite(filename,y,dFs);

MATLAB之声音的调制特性

% 声音的调制特性
% 两信号频差<15hz,感受到明显的幅值波动;
% 两信号频差15hz<x<300,感受到明显的粗糙特性;
% 两信号频>300,感受到两个明显的纯音;
dfs = 2^10;
t = 0:1/dfs:5;
T = 5;
y1 = sin(2*pi*100*t)+sin(2*pi*110*t);%两信号频差10hz
y2 = sin(2*pi*100*t)+sin(2*pi*200*t);%两信号频差200hz
y3 = sin(2*pi*100*t)+sin(2*pi*500*t);%两信号频差400hz

sound(y1,dfs);
pause(T+1)

sound(y2,dfs);
pause(T+1)

sound(y3,dfs);

你可能感兴趣的:(信号处理)