Average Across Frequencies 1.0
File ID: 84212
Average Across Frequencies 1.0
File Size: 10.0 KB
Average Across Frequencies 1.0 Description
Description: This sounds at first like a trivial task, but in practice took something that works correctly and faster for larger datasets (i.e. without using a simple find or related statement each time within a for loop). Thus I am submitting this here in case it might the time of anyone else with similar needs who comes across this.
Help comments for the function:
%function [OutVals fout]=AvgAcrossFreqs(InVals,fraw,fstep,fk,f0cut,CalcType)
% Will Avg InVals across the freq vals give in fraw into the output
% frequency bins separated by fstep with range given by fk, and initial bin
% determined by f0cut.
% This could of course be applied generally to average any one value over
% another, but was written with the intention of averaging coherence or
% spectral power values across frequencies in a data format with multiple
% repetitions (for example multiple subjects or experiment sessions).
% InVals: The values to be averaged across. Could be a single
% numeric array, of dimension NReps x nRawf, or could be
% a 1D cell array of any number of such a numeric array.
% fraw: A 1D vector of length nRawf (matching the 2nd
% dimension of numeric arrays of InVals) indicating the
% input freequency correspnding to each val of InVals.
% Assuemd to be in Hz- though any freq unit could be used
% if the other inputs are consistent with that unit.
% fstep: The frequency resolution (in Hz) of the output that the
% InVals are averaged into. Defaults to 1/8.
% fk: A 1x2 or 2x1 vector indicating the output frequency
% range to use. Defaults to [0 100].
% f0cut: Indicates the upper cutoff frequency used for the
% first bin. ... so the first output bin frequency will
% avg InVals from fk(1) up to f0cut, and each output bin
% will increase in fstep steps from there. Defaults to
% CalcType: Indicates how to do the averaging. This can be a
% scalar, or if InVals is a cell array, a 1D vector with
% each value corresponding to each cell in InVals. This
% can also be a scalar if InVals is a cell array, in
% which case the value will apply to all cells of InVals.
% 1 corresponds to a basic nanmean. (for coh mags, abs
% vals should be done to the input BEFORE CALLING
% this function.) (This is the Default)
% 2: any function.
% 3: sum function
% 4: angle of the sum across frequencies
% 5: angle of the sum across repetitions and
% frequencies. Note that this affects the size of
% OutVals, by forcing it to have 1 row/rep.
% OutVals: A numeric array or CellArray corresponding to InVals.
% Each numeric array will have dimensions nReps x nfout.
% (Or possible 1 x nfout if CalcType is set to 5).
% fout: The output frequencies, corresponding to the center
% frequency of each frequency bin in OutVals.
% Matthew Nelson 2010
% email@example.com http://www.its.caltech.edu/~nelsonmj/
Related: inputs, consistent, correspnding, assuemd, Resolution, defaults, increase, steps
O/S:BSD, Linux, Solaris, Mac OS X
File Size: 10.0 KB
|More Similar Code|
Computes the Woody average by first aligning individual signals (corrupted by jitter) with the standard average. Uses xcorr to compute the lag and then re-averages the signals to get an improved estimate.
Example included in help.
Technique deteriorates at low SNRs.
Calculates the Mutual Average Information of a time series for some time lag.
Sharing Cookies Across Domains is a web based article in which author discusses about how to share cookies between domains and sub domains, how to retrieve cookies from other domain, how to share more than one cookies and various examples...
This lists unique words and word frequencies occurring in a Python string. You can ignore or take account of letter case in distinguishing words, and you can pass it your own inclusion list of characters allowed in words (e.g. is...
Here is a simple program that can average a list of numbers. I wrote this to introduce someone to the language that we all use and love. :D The program may be simple, but it shows how easily a simple but useful program can turn out to be.
This project is based on DSP algorithm which is capable of producing fundamental frequencies of an guitar.
Its very easy to implement.
Calculates the average log-spectral distance between CLEAN and NOISY signals. It has the capability of calculating this distance for a specified sub-band as well. This measure is used for evaluation of processed speech quality in comparison to the...
This routine computes the fft of the input signal and removes power at the annual (or any specified frequency) by replacing the power at that frequency with the average of terms on both sides; this is done in the sine and cosine terms so as to...
Very efficient moving average filter implemented using convolution.
Smoothed Data = movave(Data Vector, Averaging Window Size in Samples)
See also: slidefilter.m by the same author
Calculates the average log-spectral distance between CLEAN and NOISY signals. Has the option of calculating this distance for speech active periods only. Also you can select a frequency range to study the distance in a sub-band.
|User Review for Average Across Frequencies
All files and free downloads are copyright of their respective owners. We do not provide any hacked, cracked, illegal, pirated version of scripts, codes, components downloads. All files are downloaded from the publishers website, our file servers or download mirrors. Always Virus check files downloaded from the web specially zip, rar, exe, trial, full versions etc. Download links from rapidshare, depositfiles, megaupload etc not published.