Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
GetOrgChart 2.5.3
AnyGantt JS Gantt Charts 8.6.0
AnyChart JS Charts and Dashboards 8.6.0
Multi Vendor Ecommerce Script & Apps 4.0
Magento 2 Inventory Management Extension 1.0
Yipit Clone Script - Daily Deals Software 1.0.2
Devart Excel Add-in for Oracle 1.7
Devart Excel Add-in for Freshdesk 1.7
Devart Excel Add-in for G Suite 1.7
C# QR Code Generator 4.0.2.2
Salesforce WordPress Customer Portal 3.2.0
Single Leg MLM 1.2.1
OzGIS 14.6
Quick Maps For Dynamics CRM 3.1
Job Board Software 4.2
Top Code
MCU 8051 IDE 1.4.7
School Management Script 1.0.4
shopping mall management system 1.0
WinPoker 2.02
SynaSer Serial Port Library 5.0
MLM Software 1.0.2
Planyo online reservation system module 6.x-1.8
SuperGeek Free Document OCR 2.5.6
sipmethod 1.0
School Management CRM 1
STDF file reader 1.0
Farnsworth 1.0
WebKit2.NET 0.10
Simple IP Calculator sub/sup networking 0.0.4
Beremiz 1.0
Top Rated
VisualNEO Web 2018.12.15
Paste phpSoftPro 1.4.1
Deals and Discounts Website Script 1.0.2
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
Availability Booking Calendar PHP 1.0
PHP GZ Blog Script 1.1
ATN Jobs Software 4.0
Average Across Frequencies 1.0
File ID: 84212






Average Across Frequencies 1.0
Download Average Across Frequencies 1.0http://www.mathworks.com/Report Error Link
License: Shareware
File Size: 10.0 KB
Downloads: 1
Submit Rating:
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).
%
% Inputs
% 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
% fstep/2.
% 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.
% case:
% 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.
%
% Outputs
% 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
% nelsonmj@caltech.edu http://www.its.caltech.edu/~nelsonmj/

License: Shareware

Related: inputs, consistent, correspnding, assuemd, Resolution, defaults, increase, steps

O/S:BSD, Linux, Solaris, Mac OS X

File Size: 10.0 KB

Downloads: 1



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.

Usage:

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
- required fields
     

Please enter text on the image