Estimatenoise
- Downloads:
- Views:
- Rating:

Some curve fitting or smoothing tools can benefit from knowledge of the noise variance to expect on your data. Kalman filters use this information, also some spline fitting tools. So I wrote a function to extract the noise variance from a signal vector. It also works on any specified dimension of an array.
A few examples of this code in use:
Simple linear data, with purely additive N(0,1) gaussian noise:
t = 0:10000;
x = t + randn(size(t));
mv = estimatenoise(x)
mv =
1.0166
Gaussian noise added to a sine wave (Nominal variance = 0.01)
t = linspace(0,1,1000)';
x = sin(t*50) + randn(size(t))/10;
mv = estimatenoise(x)
mv =
0.0096887
Pure gaussian noise, with a nominal variance of 9. (Note that var would have been a better estimator for this particular case...)
mv = estimatenoise(3*randn(2,3,1000),3)
mv =
9.6584 8.2696 8.632
9.2404 8.5346 9.7725
A piecewise constant function with multiple discontinuities. The true noise variance should be 0.01.
t = linspace(0,1,1000);
X = round(cos(t*6*pi)) + randn(size(t))/10;
plot(t,X)
var(X) % var will be wildly in error
ans =
0.68256
estimatenoise(X)
ans =
0.010882
Test if estimatenoise is able to recover the variance of a normally distributed random sample with unit variance. (Yes, it will be much slower than var.)
mean(estimatenoise(randn(1000,1000)))
ans =
1.0002
Estimatenoise can now handle non-uniformly spaced series (by request.) In the next example,
the actual noise variance was 1.0 here. Perform the operation 1000 times, then look at the median variance estimate. How well did we do?
t = sort([randn(1,100) , randn(1,100)+5]);
X = repmat(sin(t*5)*100,1000,1) + ...
randn(1000,length(t));
Estimatenoise is clearly wrong when the spacing is ignored.
median(estimatenoise(X,2))
ans =
16.438
Supplying the sampling "times", we get quite a reasonable result.
median(estimatenoise(X,2,t))
ans =
1.1307
Estimatenoise also works on data with replicates. In this example, each point will be replicated up to 3 times. The actual noise variance was again 1.0 here. I'll also compare the increase in times required for estimatenoise when t is supplied.
t = sort([0:1:100, 1:2:100, 1:4:100]);
X = repmat(sin(t/10)*100,1000,1)+ ...
randn(1000,length(t));
Again, estimatenoise is clearly wrong when the non-uniform spacing is ignored.
tic,median(estimatenoise(X,2)),toc
ans =
4.2056
Elapsed time is 2.690135 seconds.
Supplying the sampling "times", we again get quite a reasonable result. The time penalty is not quite 2x.
tic,median(estimatenoise(X,2,t)),toc
ans =
1.0116
Elapsed time is 4.864486 seconds.
Free download from Shareware Connection - Some curve fitting or smoothing tools can benefit from knowledge of the noise variance to expect on your data.
Version: 1.0 | Size: 10 KB | Platform: Matlab, Scripts
Released Date: 11-05-2013 | Rating: 0 | Title: Estimatenoise
Author Url: http://www.mathworks.com
Program Info Url: http://www.mathworks.com
Download Url: http://www.mathworks.com/matlabcentral/fx_files/16683/1/estimatenoise.zip
fminsearchbnd - Fminsearch does not admit bound constraints.
The Fibonacci Sequence - Often I see students asking for help on a tool to compute the Fibonacci numbers
Fminsearchcon - Nonlinear optimization problems with bound constraints can be solved using FMINSEARCHBND (as well as using many other tools.)
Nonlinear Regression Shapes - The art of fitting a nonlinear regression model often starts with choosing a model form
Moving window standard deviation - Occasionally I see a request for computation of a running, windowed standard deviation.
123WebMessenger
Voice Audio Processing
Fractal dimension
Yahoo Messenger
PlaySMS
PID Tuning Using Genetic Algorithm
Continuous Sound and Vibration Analysis
Shock Response Spectrum
Grey prediction algorithm for mobile user localization
GSM Traffic Channel Simulator
OFDM LSE Channel Estimation
Wiener filter for Noise Reduction and speech enhancement
Solutions for Digital and Analog Communication Systems, 7Ed by Leon Couch
Using S-Parameters in MATLAB & Simulink
Affiliate Programs
Animation
Auctions
Audio Systems
Banner Rotation
Blog
Bulletin Boards & Forums
Business & Enterprise
Buttons
Calendars & Events
Charts & Graphs
Chat
Classified Ad Managers
Communication
Delphi Data Curve Fitting
Allan Variance Phase Noise
Cost Benefit Curve Excel
Curve Fitting
Fitting A Curve
Random Sample Mapper - The Random Sample Mapper application was developed to be a small tool that moves random samples to a folder and makes an SFZ file.
Bug (kind-of) in randn() - This is a very strange bug in randn()
Random Number from Empirical Distribution - EMPRAND generates random numbers from empirical distribution of data.
Multivariate normal random vectors with fixed mean and covariance matrix - MVNRND2 Random vectors from the multivariate normal distribution.
Time index - >> help timeidx TIMEIDX returns numeric index given time string. D = TIMEIDX(T) returns index value in relative days which is suitable for DATENUM math. To work in hours multiply by 24, for seconds multiply by 24*3600, etc.
Shareware Connection periodically updates pricing and software information of 'Estimatenoise' from company source 'John D'Errico' , so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using 'Estimatenoise' crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Estimatenoise.
SnapCrab - Nearly every PC users need to take screenshots from time to time, whether it is for personal or professional needs. While using the basic Windows screenshot capture method is available, it is not adequate for everyone. When you want to capture ...
CleanMyDrive - PC experts unanimously agree that using Macs tend to be a smoother and faster experience than running Windows based PCs but the Apple laptops and desktops also need maintenance and performance tweaking, occasionally. Regular web browsing, ...
360 Internet Security - Using a computer without having capable Security software installed is equivalent to sleeping with your house’s main door wide open. Whether you use a PC at home or manage a network of computers at the workplace, PC security suite has ...
Cyotek WebCopy - It will be hard to find a computer user nowadays who does not need to access the web. Using web has become near mandatory for various personal and professional reasons. However, not everyone who owns a computer and accesses the web is blessed ...
Bvckup - There is no denying the reality that computers have become a part and parcel of human existence. From education, work, entertainment and data storage, computers are required at every step of life. Safety of data is of paramount importance to PC ...
PC DeCrapifier - There is hardly any computer user who does not want to keep the PC running at top speed. However, unnecessary software and bloatware can reduce the speed and performance of your PC. Such Apps often come pre installed with laptops and desktops. ...
FortiClient Standard - Every computer user needs to have adequate protection for his system and this holds true for corporate and network users. In business setups, where multiple desktops and servers are connected to a network, using regular antivirus suite may be ...
Paint.NET - Nearly every PC user needs to use some type of image editing software nowadays, whether it is for personal or professional reasons. It can be for making minor corrections to your vacation pictures before you share them on social media sites. It ...
Groovy Media Player - There is hardly any PC user who does not listen to music while working on PC or at leisure time. For media playback on Windows PC, there are so many apps. You can opt for default WMP that comes with the OS. However, there are several other third ...
VLC Media Player Portable - There are plenty of media player applications available for Windows and some of the popular ones are actually freeware. If you find the Windows media player inadequate or sluggish, give VLC media player a try. This versatile media player plays ...


