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.
답변 (6개)
ramya
2011년 3월 20일
0 개 추천
댓글 수: 5
Oleg Komarov
2011년 3월 20일
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
2011년 3월 20일
ramya
2011년 3월 20일
Paulo Silva
2011년 3월 20일
show us your code
ramya
2011년 3월 21일
Walter Roberson
2011년 3월 20일
0 개 추천
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
2011년 3월 21일
0 개 추천
Are you sure you have row data and not column data. Have you tried flipud?
Alex
2011년 3월 21일
0 개 추천
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
2012년 6월 29일
0 개 추천
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
2017년 4월 8일
편집: Walter Roberson
2017년 4월 8일
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
Walter Roberson
2017년 4월 8일
audioread will return one column per channel, not rows.
카테고리
도움말 센터 및 File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!