当前位置:网站首页>[matlab project practice] sine sweep (sine sweep signal)
[matlab project practice] sine sweep (sine sweep signal)
2022-07-23 07:05:00 【Big peach Technology】
It was written by a blogger python Code , I'll change it here to matlab 了
clc;clear all;
samplingrate = 44100;
sweeptime = 1;
f0 = 20;
f1 = 200;
peak = 1;
data=sinesweep(f0, f1, sweeptime, samplingrate, peak);
figure(1)
plot(data)
function
function data=sinesweep(f0, f1, sweeptime, samplingrate, peak)
% Sweep signal : Starting frequency f0、 Cut off frequency f1、 Sampling rate and amplitude
k = exp(log(f1 / f0) / sweeptime); % Growth coefficient k Calculation formula
data_len = sweeptime * samplingrate; % Data length
data = zeros(data_len,1);% Create a data length of all 0 Of int Type array , It is used to store the amplitude value of each sampling point
dt = 1.0 / samplingrate; % Time interval between two sampling points
t = 0; % Starting time
p = 2 * pi * f0 / log(k);
for i=1:data_len
data(i) = peak * sin(p * (k^t - 1));% Store the amplitude value of each sampling point into the array
t = t+dt; % Add a time interval each time
end

Code link :https://download.csdn.net/download/qq_45047246/86245523
边栏推荐
- 为什么不能隐藏文件夹?电脑隐藏的文件夹还能看到的解决办法
- Design of boiler drum temperature control system (process control course design matlab/simulink)
- 事件抽取文献整理(2019)
- An in-depth explanation of CAS is necessary for interview practice
- 100 lines of code thoroughly analyze RPC principle
- 《STL仿函数》priority_queue模拟实现
- 一篇搞定CAS,深度讲解,面试实践必备
- 小米金融今日(5月11日)正式上线 白送10000元体验金 附官方地址
- Web3产品经理指南:如何面向加密世界
- IO flow principle and flow classification
猜你喜欢

事件抽取文献整理(2020-2021)

Realize OPC UA publish/subscribe single send

MySQL --- 子查询 - 子查询概念、规范、分类

什么程序员在35岁依然被公司抢着要?打破程序员“中年危机”

In the name of "upgrade", talk about the core technology of cloud native data warehouse analyticdb

BGP邦联实验

Zlmediakit tries to solve the video splash screen problem of gb28181 (UDP mode)
![传奇私服GOM引擎启动M2提示:[X-FKGOM] 已经加载成功卡住的怎么处理?](/img/32/df602f294e009c9462d955b1819ffe.png)
传奇私服GOM引擎启动M2提示:[X-FKGOM] 已经加载成功卡住的怎么处理?

Huawei shengteng competition materials

GB28181流媒体服务LiveGBS使用和二次开发中常见问题总结
随机推荐
How to calculate the time-consuming code gracefully? (glory Collection Edition)
时代潮头,华为将风帆对准数字金融的风与海
thinkphp URL_ Mode =0 specific usage of normal mode
微信小程序云开发常见错误总结.
如何优雅的统计代码耗时?(荣耀典藏版)
BGP基本配置和路由聚合
无法删除文件提示找不到指定文件导致文件无法删除的解决方法
ABAP ALV summary
龙芯掌门人吐苦水:我们有世界第一性能的CPU,但可惜没人用!
在 MySQL 中使用枚举的陷阱一定要注意!
Gom引擎Key.lic配套的X-FKGOM授权启动
第九章 使用图像数据
Realize the national standard gb28181 streaming media service solution
472-82(22、165、39、剑指 Offer II 078、48. 旋转图像)
LeetCode_ Monotonic stack_ Medium_ 316. Remove duplicate letters
引擎提示Alias HeroDB跟游戏引擎启动异常怎么解决?
电脑不能截屏怎么办?电脑的快捷截屏键无法使用的解决办法
一直想不明白的synchronized锁竟如此简单!
锅炉汽包温度控制系统设计(过程控制课程设计matlab/simulink)
(ROS_Melodic) 使用Rviz进行Boundingbox可视化