Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Urgent ... Sample rate conversion of wav file in MATLAB

Status
Not open for further replies.

noonie

Newbie level 3
Joined
Dec 20, 2012
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,298
I need help in my project. it's about sample rate conversion in matlab for a wav file I've done a few steps and I need someone to help me with the rest.


>> [y,Fs]=wavread(' .wav')
>>sound[y,Fs]
then I need to write the instruction z=2y then sound(z,Fs) but it gives me error !!
 
Last edited by a moderator:

What does it mean - z = 2y ?
To multiply use * symbol.
For upsample or downsample use 'upsample' or 'downsample' commands.
Or design an interpolation or decimation FIR or CIC filter.
 
  • Like
Reactions: noonie

    noonie

    Points: 2
    Helpful Answer Positive Rating
here is the code I need to make fir before downsampling :

[y,fs]=wavread('D:\Downloads\Music.wav');
t = (0:length(y)-1)/ fs;
subplot(3,2,1);
plot(t,y)

z = fft(y);
k = abs(z);
f = [ 0 : length(k)-1 ] * fs;
subplot(3,2,2);
plot(f,k)


a=upsample(y,2);
t=(0: length(a)-1)/fs;
subplot(3,2,3);
plot(a,t)
d=fft(a);
m=abs(d);
f=(0:length(m)-1)*fs;
subplot(3,2,4)
plot(f,m)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top