how to invert the samples of a audio signal
Mostra commenti meno recenti
hi friends....how to invert the samples of an audio signal using fliplr statement in matlab.
Risposte (6)
ramya
il 20 Mar 2011
0 voti
5 Commenti
Oleg Komarov
il 20 Mar 2011
why it's not possible. Do you get an error? If yes post the whole error message.
Do you get an unexpected result? Then post a brief example of input and the corresponding desired output.
ramya
il 20 Mar 2011
ramya
il 20 Mar 2011
Paulo Silva
il 20 Mar 2011
show us your code
ramya
il 21 Mar 2011
Walter Roberson
il 20 Mar 2011
0 voti
Are you assigning the result of fliplr() to a variable? fliplr() returns a new array that is flipped, rather than affecting the existing array.
1 Commento
ramya
il 21 Mar 2011
Daniel Shub
il 21 Mar 2011
0 voti
Are you sure you have row data and not column data. Have you tried flipud?
Walter Roberson
il 29 Giu 2012
0 voti
Audio data is usually represented as by the columns of an array, rather than the rows of an arrow. Mono audio data would have only one column, so fliplr() applied to that column would be exactly the same as before. Stereo data would have two columns, so fliplr() applied to it would reverse the channels but only that. If you have column-oriented data and want to reverse the order of the samples, you need flipud() rather than fliplr()
Dipesh Mudatkar
il 8 Apr 2017
Modificato: Walter Roberson
il 8 Apr 2017
Try this.
[y,fs]=audioread('put your audio file path'); % This will give you audio samples is y (It should be in row vector).
sound(y,fs); % Now listen it in correct ordered samples.
[m,n]=size(y);
if n==1 % If y is not row vector this convert it into row vector.
y=y';
end
y1=fliplr(y); % Now flip it and check audio.
sound(y1,fs); % Now, lest listen to your reverse audio.
1 Commento
Walter Roberson
il 8 Apr 2017
audioread will return one column per channel, not rows.
Categorie
Scopri di più su Matrices and Arrays in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!