by using fliplr statement we can invert the samples.but for an audio signal it is not possible.can u plz give me suggestion how to invert the samples of an audio signal...plzzzzzzzzzzzz
how to invert the samples of a audio signal
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
hi friends....how to invert the samples of an audio signal using fliplr statement in matlab.
0 commentaires
Réponses (6)
Walter Roberson
le 20 Mar 2011
Are you assigning the result of fliplr() to a variable? fliplr() returns a new array that is flipped, rather than affecting the existing array.
Daniel Shub
le 21 Mar 2011
Are you sure you have row data and not column data. Have you tried flipud?
0 commentaires
Alex
le 21 Mar 2011
Why do you want to invert an audio signal? An inverted signal will sound the same as the original.
Do you want to reverse the order of the samples?
Walter Roberson
le 29 Juin 2012
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()
0 commentaires
Dipesh Mudatkar
le 8 Avr 2017
Modifié(e) : Walter Roberson
le 8 Avr 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 commentaire
Voir également
Catégories
En savoir plus sur Characters and Strings dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!