This question already has an answer here:
Remove noise from wav file, MATLAB
(1 answer)
Closed 7 years ago.
I have a audio file I want to filter it so that i can just have frequency within certain range. I just want signal from 12Khz to 14Khz I want to filter out the other frequency. I tried the butterworth filter in matlab but i dont seem to understand the parameter.
Have you try:
[y,fs]=audioread('audio.audioformat');
wn=[12000 14000]/(fs/2);
[b,a]=butter(n_order,wn);
f=filter(b,a,y);
And we divide wn by (fs/2) because the butter command only accept a
normalized Frequency
Related
This question already has answers here:
xaxis/yaxis lines in matlab plot
(2 answers)
How to add a x-axis line to a figure? (matlab)
(6 answers)
Closed 3 months ago.
I want to plot the mean of a data measurement with the standard deviation along the x-axes. I tried using boundedline, but it is not working. I have just one value (y value) with the corresponding standard error to plot across the x values. Can someone know how to do it?
boundedline.m - File Exchange - MATLAB Central (mathworks.com)
This question already has answers here:
How to apply a low-pass or high-pass filter to an array in Matlab?
(2 answers)
High-pass filtering in MATLAB
(3 answers)
Closed 5 years ago.
I have a few second length sound clip (.wav) and need to apply a high-pass filter to see the high frequency components of that.
AI=analoginput('winsound');
addchannel(AI,1);
set(AI, 'SampleRate', 8000);
set(AI, 'SamplesPerTrigger', 32000);
start(AI);
data=getdata(AI);
wavwrite(data,'audio.wav');
This question already has answers here:
How to generate noise using specific variance
(1 answer)
Matlab: Generate noisy signal for particular SNR and particular variance
(1 answer)
Proper way to add noise to signal
(4 answers)
Closed 3 years ago.
I have question about adding Pseudo-Noise sequence.
How can I add PN-sequence as a matrix or a vector with specific size?
This question already has an answer here:
Centering histogram bins and setting percentage range in Matlab
(1 answer)
Closed 9 years ago.
I have a big matrix with thousands of values. I want to make a histogram of each signal. This is easily done with MALTAB's commands. My problem is I want it normalised in the sense that the y-axis is 0-1 and not 0-(the number of measurements). Any smart way to do this?
Use histc()
counts = histc(data);
normCounts = counts/sum(counts);
This question already has answers here:
How to fit a gaussian to data in matlab/octave?
(4 answers)
Closed 8 years ago.
I am doing k means on data points and want to fit data points into Gaussian to help me form
clusters.i have tried to some but not able to do. may someone tell me how to fit Gaussian in Matlab???
if you want to fit a Gaussian to any data, you must keep in mind that
a Gussian is simply f(x) =f_0 exp( - (x-x0)^2 /a ). Take Log_e of your data and fit a parabola! This is possible because,
log [ f(x) ]= log f_0 - (x-x0)^2 /a