设计师品牌 网站,太原seo建站,网站建设专业公司,软文推广例子目录 基本介绍程序设计参考资料获取方式 基本介绍
时频转换 | Matlab格拉姆角和场Gramian angular summation field一维数据转二维图像方法
程序设计
clear
clc
% close all
load x.mat % 导入数据
x x(1:5120); % 本数据只选择5120个点进行分析
fs 6400 ; % 数据采样频… 目录 基本介绍程序设计参考资料获取方式 基本介绍
时频转换 | Matlab格拉姆角和场Gramian angular summation field一维数据转二维图像方法
程序设计
clear
clc
% close all
load x.mat % 导入数据
x x(1:5120); % 本数据只选择5120个点进行分析
fs 6400 ; % 数据采样频率
output_folder ./figures; % 指定输出频谱文件夹路径(此处默认为本代码文件夹)
%% 滑动窗口划分样本
window_length 1024; % 窗口长度
step_size 1024; % 步长
t (0:window_length-1)/fs;
f(fs/2)/(window_length/2):(fs/2)/(window_length/2):(fs/2);
num_samples floor((length(x) - window_length) / step_size) 1; % 样本数量% 初始化样本矩阵
samples zeros(window_length, num_samples);% 滑动窗口划分数据样本
for i 1:num_samplesstart_index (i - 1) * step_size 1; % 窗口起始索引end_index start_index window_length - 1; % 窗口结束索引% 判断是否滑动至最后一个窗口if end_index length(x)samples(:, i) x(start_index:end_index);else% 忽略最后一个窗口break;end
end
参考资料
[1] https://blog.csdn.net/kjm13182345320/article/details/129215161 [2] https://blog.csdn.net/kjm13182345320/article/details/128105718
获取方式
点击文章底部联系博主