How can I separate these four sensor data from one audio file?

1 次查看(过去 30 天)
Hi, I have an audio file that has four signals in it. These 4 signals are not of the same size. How can I separate these signals?

采纳的回答

Star Strider
Star Strider 2018-10-6
One approach:
D = load('signal.mat');
s = D.new_signal;
x = 1:numel(s);
[seu, sel] = envelope(s, 250, 'rms'); % Calculate Envelope
cpidx = findchangepts(seu, 'MaxNumChanges',3, 'Statistic','linear'); % Find Transitions
figure
plot(x, s)
hold on
plot([cpidx; cpidx], ones(2,numel(cpidx)).*ylim', '-g', 'LineWidth',2)
hold off
grid
axis tight
Out = mat2cell([s; x], 2, diff([0 cpidx numel(s)])); % Cell Array Of The Different Signals
The result is:
Out =
1×4 cell array
{2×6026 double} {2×9632 double} {2×6776 double} {2×7326 double}
The separations are illustrated here:

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Audio I/O and Waveform Generation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by