# ADAPTIVE DEGREE SMOOTHING AND DIFFERENTIATION (Scipts) 1.0

Average Rating
User Rating:
Visitors Rating:
My rating:

See full specifications

## ADAPTIVE DEGREE SMOOTHING AND DIFFERENTIATION (Scipts) Publisher's description

% written by Carlos J Dias
%
% ADAPTIVE DEGREE SAVISTZKY-GOLAY SMOOTHING AND DIFFERENTIATION
% This function smooths and differentiates a sequence of numbers based on
% an algorithm drawn on the ideas of Savistky and Golay and Barak.
% There are no restrictions however, on the number of points
% or on their spacing.
% This function also calculates the first derivative at the xnew points
%
% INPUT:
% dados - data in a two column matrix (first column x; second column y)
% xnew - is a vector where new ordinates are to be computed
%
% sdx - is the abscissa range of data to be used to find the least squares
% polynomial
% isdx - is a fraction of the sdx range between [0 1] where new y_values
% for xnew will be calculated. It usually is 0.8 (i.e. 80%) of the sdx range.
% q - is the highest degree of the polynomial to be used in the interpolation
% nmin - is the minimum data points to be used in the interpolation.
%
% ALGORITHM:
% For each point xnew_i of the xnew vector, this function finds the least
% squares polynomial (with polyfit) passing through the experimental points
% lying between [xnew_i - sdx, xnew_i + sdx].
% The degree of the polynomial is chosen based on a F-statistic.
% Using this polynomial it calculates, with polyval, the values for
% y and its derivative in that same interpolating window.
%
% All calculated values for each abscissa are used to compute an average
% value of the smoothed function and its derivative.
% When sdx range includes fewer points than nmin, the range is enlarged to
% include at least nmin points. This may occur more often at the edges
% of the data.
% Note that we should have nmin>q
%
% OUTPUT (ynew - 5 column matrix)
% column 1- new abscissas
% column 2- new ordinates
% column 3- their standard error
% column 4- first derivative
% column 5- no. of values that were calculated for the ith point
%
% DEMO SCRIPT (SMOOTHING OF 1000 POINTS)
% x=linspace(-10,10,1000)';
% y=1./(1+((x-2)/0.5).^2)+2./(1+((x+2)/0.5).^2);%two lorenztians
% noise=0.5*(rand(length(y),1)-0.5);
% y=y+noise;
% %(it takes about 30 s to run this script in my computer)
%
% P Barak, Analytical Chemistry 1995, 67 2758-2762
% A Savitzky, MJE Golay, Analytical Chemistry 1964, 36(8) 1627-1638
% I also acknowledge Jianwen Luo for drawing my attention to adaptive
% strategies.

#### System Requirements:

No special requirements.
Program Release Status: New Release
Program Install Support: Install and Uninstall

#### ADAPTIVE DEGREE SMOOTHING AND DIFFERENTIATION (Scipts) Tags:

Click on a tag to find related softwares

## Most Popular

ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation 1.1
ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation contain several functions for digital modulation simulation