matlab_generalisedS​lidingWindowFunctio​n

Matlab function which allows you to compute any other function as a sliding window along the first dimension of a matrix of data.
5 téléchargements
Mise à jour 17 juil. 2022
%   
%   Computes any sliding window with a chosen input function
% 
%   Usage:    out = rs_winfun( data, cfg)
%   
%   data - first dimension is the one you slide through (usually time)
% 
%   cfg - structure with the following fields: 
% 
%        ** essential **
%          fs - sampling rate of data (Hz)
%          win - sliding window dimensions in seconds: [timeBefore timeAfter]
%          func - handle of function to be applied, e.g. @mean
% 
%        ** optional **
%          func_params - parameters for the function as a cell array
%          toi - sample numbers to compute value for in first dimension of data (if empty computes for all timepoints)
%          edge_mode - 'exclude' - ignore edge values which do not have a complete window (default)
%                      'include' - compute these values anyway with limited values in the window
%          verbosity - 'quiet'   - use evalc to supress command window output of the function
%                      'verbose' - just use feval (maybe more efficient)
%  
% 
%   Richard Somervail, 17/07/2022

Citation pour cette source

Richard Somervail (2024). matlab_generalisedSlidingWindowFunction (https://github.com/rsomervail/matlab_generalisedSlidingWindowFunction/releases/tag/v1.0), GitHub. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2022a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Tags Ajouter des tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Publié le Notes de version
1.0

Pour consulter ou signaler des problèmes liés à ce module complémentaire GitHub, accédez au dépôt GitHub.
Pour consulter ou signaler des problèmes liés à ce module complémentaire GitHub, accédez au dépôt GitHub.