当前位置:网站首页>[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
边栏推荐
- ABAP语法基础5
- Codeforces round 800 (Div. 2) C (prefix and + greed) d (tree dfs+ greed) lca+ dictionary tree review
- 《STL容器篇》-string模拟实现
- Apifox learning record
- Design of boiler drum temperature control system (process control course design matlab/simulink)
- Realize the national standard gb28181 streaming media service solution
- Priority of STL functor_ Queue simulation implementation
- 【MATLAB项目实战】基于SPI指数的某地区地区干旱时空特征分析
- let和const解决了什么问题,两者的区别
- 实现国标GB28181流媒体服务解决方案
猜你喜欢

Pikachu靶场-SQL注入-搜索型注入过关步骤

Realize the national standard gb28181 streaming media service solution

Scientific computing and Simulation - a brief introduction and application of the nonlinear least square problem of Gauss Newton method

Redis增强

How to calculate the time-consuming code gracefully? (glory Collection Edition)

Data warehouse: Exploration and practice of integrating flow and batch

Web3产品经理指南:如何面向加密世界

一直想不明白的synchronized锁竟如此简单!

100 行代码透彻解析 RPC 原理

CV target detection model sketch (1)
随机推荐
thinkphp URL_MODE =0 普通模式 的具体用法
记事本文件太大打不开怎么办?TXT文件太大无法打开现象的解决办法介绍
Livegbs camera web page low delay plug-in free live broadcast implementation
Zlmediakit tries to solve the video splash screen problem of gb28181 (UDP mode)
In the name of "upgrade", talk about the core technology of cloud native data warehouse analyticdb
《STL仿函数》priority_queue模拟实现
IO流原理及流的分类
472-82(22、165、39、剑指 Offer II 078、48. 旋转图像)
一篇搞定CAS,深度讲解,面试实践必备
【FAQ】应用内支付服务无法拉起支付页面常见原因分析和解决方法
TCP waves four times
网上邻居右键属性打不开怎么办 网上邻居右键属性打不开的解决方法
Common operators
华泰证券股票开户怎么样安全吗
XSS必备知识
《STL容器篇》-List模拟实现(三种反向迭代器)
CV语义分割模型小抄(1)
华为昇腾比赛资料
电脑显示器分辨率多少合适?各尺寸显示器最佳分辨率及不同壁纸的选择介绍
第零章 Encog入门介绍