how to invert the samples of a audio signal

hi friends....how to invert the samples of an audio signal using fliplr statement in matlab.

Antworten (6)

ramya
ramya am 20 Mär. 2011

0 Stimmen

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

5 Kommentare

Oleg Komarov
Oleg Komarov am 20 Mär. 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
ramya am 20 Mär. 2011
no im not getting any error but the expected output is not coming.the output is same as that of input....
ramya
ramya am 20 Mär. 2011
what i should get is the inverse of input i.e if we take 16 samples then the 1st sample and the 16 sample should be reversed and similarly the remaining..
Paulo Silva
Paulo Silva am 20 Mär. 2011
show us your code
ramya
ramya am 21 Mär. 2011
i hav got the ouput for the signal that i hav defined but im not getting the output for the audio signal(.wav file)

Melden Sie sich an, um zu kommentieren.

Walter Roberson
Walter Roberson am 20 Mär. 2011

0 Stimmen

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 Kommentar

ramya
ramya am 21 Mär. 2011
ha yes i assigned the result of filplr() to a variable but i cant get the output

Melden Sie sich an, um zu kommentieren.

Daniel Shub
Daniel Shub am 21 Mär. 2011

0 Stimmen

Are you sure you have row data and not column data. Have you tried flipud?
Alex
Alex am 21 Mär. 2011

0 Stimmen

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?

1 Kommentar

ramya
ramya am 21 Mär. 2011
ha yes i want the reverse order of the samples...

Melden Sie sich an, um zu kommentieren.

Walter Roberson
Walter Roberson am 29 Jun. 2012

0 Stimmen

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
Dipesh Mudatkar am 8 Apr. 2017
Bearbeitet: Walter Roberson am 8 Apr. 2017

0 Stimmen

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.

Kategorien

Mehr zu Matrices and Arrays finden Sie in Hilfe-Center und File Exchange

Produkte

Gefragt:

am 20 Mär. 2011

Kommentiert:

am 8 Apr. 2017

Community Treasure Hunt

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

Start Hunting!

Translated by