For MATLAB Assignment help and homework Assignment Help please visit this website: MatlabSolutions.com
What’s wrong with the “plot” command ?
The plot command will basically display the samples in your .wav file in y-axis, the x-axis being the sample numbers.
A sample .wav file from Alesis Fusion Nylon String Guitar C4
I wrote this simple code
>> a=wavread(‘practice’);
>> b=a(:,1); // variable a contains two separate channels of audio. I took just one channel.
>>plot(b)
That gives me this graph ..
>> b=a(:,1); // variable a contains two separate channels of audio. I took just one channel.
>>plot(b)
That gives me this graph ..
Notice the x axis. The axis reaches up to like 10x104.That’s the sample indexes.
If you need to convert the x-axis to time, you need to divide the x-axis by the sampling frequency.
Comments
Post a Comment