fit_maxwell_pdf
fit_maxwell_pdf - Non Linear Least Squares fit of the maxwellian distribution.
given the samples of the histogram of the samples, finds the
distribution parameter that fits the histogram samples.
fits data to the probability of the form:
p(r) = sqrt(2/pi)*(a^(-3/2))*(r^2)*exp(-(r^2)/(2*a))
with parameter: a
format: result = fit_maxwell_pdf( x,y,W,hAx )
input: y - vector, samples of the histogram to be fitted
x - vector, position of the samples of the histogram (i.e. y = f(x,a))
W - matrix or scalar, a square weighting matrix of the size NxN where
N = length(y), or 0 to indicate no weighting is needed.
hAx - handle of an axis, on which the fitted distribution is plotted
if h is given empty, a figure is created.
output: result - structure with the fields
a - fitted parameter
VAR - variance of the estimation
type- weighted LS or not weighted LS
iter- number of iteration for the solution
- 2011-02-09 19:02:55下载
- 积分:1
xiaobosuanfa
采样频率
fs=10000
轴承外环故障信号
fid=fopen( bearingout.dat , r ) 故障
N=1024
xdata=fread(fid,N, int16 )
fclose(fid)
xdata=(xdata-mean(xdata))/std(xdata,1)
时域波形
figure(1)
plot(1:N,xdata)
xlabel( 时间 t/n )
ylabel( 电压 V/v )
db10小波进行4层分解
一维小波分解
[c,l] = wavedec(xdata,4, db10 )
重构第1~4层细节信号
d4 = wrcoef( d ,c,l, db10 ,4)
d3 = wrcoef( d ,c,l, db10 ,3)
d2 = wrcoef( d ,c,l, db10 ,2)
d1 = wrcoef( d ,c,l, db10 ,1)
( Sampling frequency fs = 10000 bearing outer ring fault signal fid = fopen (' bearingout.dat' , ' r' ) failure N = 1024 xdata = fread (fid, N, ' int16' ) fclose (fid ) xdata = (xdata-mean (xdata))/std (xdata, 1) time-domain waveform figure (1) plot (1: N, xdata) xlabel (' Time t/n' ) ylabel ( ' voltage V/v' ) db10 wavelet decomposition 4 layer one-dimensional wavelet decomposition [c, l] = wavedec (xdata, 4, ' db10' ) 1 ~ 4 reconstructed detail signal d4 = wrcoef (' d' , c, l, ' db10' , 4) d3 = wrcoef (' d' , c, l, ' db10' , 3) d2 = wrcoef (' d' , c, l, ' db10' , 2) d1 = wrcoef (' d' , c, l, ' db10' , 1) )
- 2011-05-21 16:48:36下载
- 积分:1