How can I separate these four sensor data from one audio file?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Md Shahriar Islam
el 6 de Oct. de 2018
Comentada: Star Strider
el 12 de Oct. de 2018
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?
0 comentarios
Respuesta aceptada
Star Strider
el 6 de Oct. de 2018
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:
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Audio I/O and Waveform Generation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!