⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 同频率振动合成程序模拟.m

📁 8个振动信号处理的经典matlab程序
💻 M
字号:
% Samp1_2
N=200;dt=0.02;f1=3;f2=3;   %采样点数、间隔和两个振动的频率
n=0:N-1;t=n*dt;                             %定义时间离散值
x1=0.5*sin(2*pi*f1*t+1);                    %第一个振动
x2=0.3*sin(2*pi*f2*t+2.2);                 %第二个振动
subplot(3,1,1),plot(t,x1);ylim([-1 1]);
title('第一个振动')             %第一个振动绘图
subplot(3,1,2),plot(t,x2);ylim([-1 1]);
title('第二个振动')          %第二个振动绘图
subplot(3,1,3),plot(t,x1+x2);ylim([-1 1]);
title('合成振动')     %合成振动绘图
xlabel('时间/s')

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -