How to get general trend for sound data

3 ビュー (過去 30 日間)
Melanie
Melanie 2024 年 9 月 19 日
回答済み: Taylor 2024 年 9 月 19 日
I am trying to find the general trend for two audio samples so that I can compare them more easily for a school project.
I've tried doing so with a code I found here:
however in this script it's made for dates but I need numbers, thus it is only giving me error messages.
I've attached the data that I need the general trend for

回答 (1 件)

Taylor
Taylor 2024 年 9 月 19 日
The data you provided seems to already be in the frequency domain. If you could share the time domain audio data that would be more applicable to the link you shared. Otherwise, see below to simply smooth the data.
% Import the data
data = readtable("sample-data James Brown.txt");
% Convert to output type
data = table2array(data);
% Remove duplicate column in data
data = data(:,1);
% Plot original data
figure;
plot(data)
% Smooth data
dataSmooth = smoothdata(data,"movmean","SmoothingFactor",0.4);
% Plot smoothed data
hold on
plot(dataSmooth, "r")
hold off

カテゴリ

Help Center および File ExchangeSimulation, Tuning, and Visualization についてさらに検索

製品


リリース

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by