필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

how can i get back the original song into the program below?

조회 수: 1 (최근 30일)
parthasarathi ghorai
parthasarathi ghorai 2015년 5월 15일
마감: MATLAB Answer Bot 2021년 8월 20일
[y,fs]=wavread('khuddar.wav');
a=zeros(100,2);
j=1;
for i=round(rand(1)*(10000-1)+1):round(rand(1)*(10000-1)+1)
a(j,:)=y(i,:);
j=j+1;
end
mi=min(a);
ma=max(a);
dif=ma(1,:)-mi(1,:);
c=dif(1)/255;
a=mi;
b=a+c;
x=zeros(255,2);
for i=1:255
x(i,:)=a;
a=a+c;
end
s=0;
for i=1:10
s=s+x(i,:);
end
a=s
z=0;
for(i=10:20)
z=z+x(i,:);
end
b=z
A=0;
for(i=20:30)
A=A+x(i,:);
end
c=A
B=0;
for(i=30:40)
B=B+x(i,:);
end
d=B
C=0;
for(i=40:50)
C=C+x(i,:);
end
e=C
D=0;
for(i=50:60)
D=D+x(i,:);
end
m=D
E=0;
for(i=60:70)
E=E+x(i,:);
end
g=E
F=0;
for(i=70:80)
F=F+x(i,:);
end
h=F
G=0;
for(i=80:90)
G=G+x(i,:);
end
n=G
H=0;
for(i=90:100)
H=H+x(i,:);
end
j=H
transfromed=fft(y);
f=abs(transfromed);
plot(f)
x=find(y<=20);
y(x);
y(x(1))=a(1);
y(x(2))=b(1);
y(x(3))=c(1);
y(x(4))=d(1);
y(x(5))=e(1);
y(x(6))=m(1);
y(x(7))=g(1);
y(x(8))=h(1);
y(x(9))=n(1);
y(x(10))=j(1);
y(1:10)
plot(y)

답변 (1개)

Walter Roberson
Walter Roberson 2015년 5월 16일
You cannot. You overwrite the first 10 locations in the first channel of y without having saved the previous contents. They are gone and cannot be recovered except by reading in the file again.
The rest of the song after the 10th entry is still there untouched in y(11:end,:), and any channel beyond the first is untouched.

이 질문은 마감되었습니다.

태그

아직 태그를 입력하지 않았습니다.

제품

Community Treasure Hunt

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

Start Hunting!

Translated by