plateform stringclasses 1
value | repo_name stringlengths 13 113 | name stringlengths 3 74 | ext stringclasses 1
value | path stringlengths 12 229 | size int64 23 843k | source_encoding stringclasses 9
values | md5 stringlengths 32 32 | text stringlengths 23 843k |
|---|---|---|---|---|---|---|---|---|
github | maxentile/msm-learn-master | hsicChol.m | .m | msm-learn-master/projects/ktICA/fastKICA/utils/hsicChol.m | 1,445 | utf_8 | 637b56d83dfc0542ff258326468f49e0 | function [outScore]=hsicChol(ks,N,m)
%
% function [outScore]=hsicChol(ks,N,m)
%
% HSIC of the estimate represented by ks
% ks: array, where ks{i} is an N x d_i matrix R such that RR' is the kernel matrix for
% source i
% N: number of samples
% m: number of sources
%%%%%%%%%%%%%%%%%%%%%%%%%%%%... |
github | Sebelino/hypnoscorer-master | dbnify.m | .m | hypnoscorer-master/dbnify.m | 1,765 | utf_8 | f6bc26611766f0e7903274226182d5c6 | % Adapted from Martin Längkvist's code: http://aass.oru.se/~mlt/sleep.zip
% layersize: List containing the number of hidden nodes in each hidden layer, arranged from the one
% closest to the visible layer to the one farthest away.
function newfeaturespace = dbnify(featurespace,layersizes)
addpath('lib/DBNToolbox/l... |
github | Sebelino/hypnoscorer-master | score.m | .m | hypnoscorer-master/score.m | 25,292 | utf_8 | bd99180117b51aae3ecf2c932bcfe40e | function stream = score(varargin)
% Enter a string that specifies what you want to do by using UNIXy pipeline notation.
% Usage:
% >> score('load RECORD | FILTER ARG ... ARG | ... | FILTER ARG ... ARG')
% or
% >> score(STREAM, 'FILTER ARG ... ARG | ... | FILTER ARG ... ARG')
%
% Example 1:
... |
github | Sebelino/hypnoscorer-master | listresults.m | .m | hypnoscorer-master/listresults.m | 11,689 | utf_8 | 7c734c22e060a66e2853285c2db24164 | % Warning: Crappy code ---v
function listresults
files = matfiles();
a_lin_accuracies = [];
a_rbf_accuracies = [];
b_lin_accuracies = [];
b_rbf_accuracies = [];
allstages = {'1','2','3','R','W'};
a_lin_featurefreq = struct('Mean',0,'Variance',0,'Skewness',0,'Kurtosis',0,'HjorthMobility',0,... |
github | panditanvita/BTCpredictor-master | step.m | .m | BTCpredictor-master/step.m | 511 | utf_8 | b24ff44ffd2e0e354c621e4b9ccc4b32 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Function: step(FVr_x)
% Author: Rainer Storn
% Description: Implements the step function which is 0 for
% negative input arguments and 1 otherwise.
% Parameters: FVr_x (I) Input vector
% ... |
github | panditanvita/BTCpredictor-master | brtrade.m | .m | BTCpredictor-master/brtrade.m | 3,257 | utf_8 | df2b2f62a004f7482710748f066596f8 | %
% step 3: evaluation of performance
%
% using our third set of prices, we estimate dp at each time interval,
% if dp > t and current position <= 0 , we buy
% if dp < -t and current position >= 0, we sell
% else, do:nothing
%
% trade using the above algorithm. returns expected profit
%
% given a list of prices
% assu... |
github | panditanvita/BTCpredictor-master | objfun.m | .m | BTCpredictor-master/objfun.m | 1,540 | utf_8 | f92bb33c4c0c118ce3b5140a614e89b4 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Function: S_MSE= objfun(FVr_temp, S_struct)
% Author: Rainer Storn
% Description: Implements the cost function to be minimized.
% Parameters: FVr_temp (I) Paramter vector
% S_Struct (I) ... |
github | panditanvita/BTCpredictor-master | vecsim.m | .m | BTCpredictor-master/vecsim.m | 429 | utf_8 | 850337f5fabc99739bce0235466633c1 | %find the similarity between two vectors
function s = vecsim(x,y)
assert(length(x)==length(y),'these vectors are different lengths!');
assert(~isempty(x),'need a larger vector');
num = sum((x - mean(x)).*(y-mean(y)));
den = length(x)*std(x)*std(y);
if (den == 0)
s = num; %to a... |
github | panditanvita/BTCpredictor-master | left_win.m | .m | BTCpredictor-master/left_win.m | 1,803 | utf_8 | eedea384004a846207cfa7cb2670c7d2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Function: I_z = left_win(S_x,S_y)
% Author: Rainer Storn
% Description: left_win(S_x,S_y) takes structures S_x and S_y as an argument.
% The function returns 1 if the left structure of the input structures... |
github | panditanvita/BTCpredictor-master | make_plots.m | .m | BTCpredictor-master/make_plots.m | 633 | utf_8 | 58ec475d051cd980a9edff6382aa3099 | % make plots and print out useful stats
function n = make_plots(prices, buy, sell, proba, bank, error)
n = length(prices);
sbuy = nan(n,1);
ssell = nan(n,2);
sbuy(buy) = prices(buy);
ssell(sell) = prices(sell);
fprintf('Error of prediction, on average: %d\n', error/n);
fprintf('Win rate: %d percent\nTotal ... |
github | panditanvita/BTCpredictor-master | deopt.m | .m | BTCpredictor-master/deopt.m | 15,782 | utf_8 | 0233549d870611e41e219c067b858dae | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Function: [FVr_bestmem,S_bestval,I_nfeval] = deopt(fname,S_struct)
%
% Author: Rainer Storn, Ken Price, Arnold Neumaier, Jim Van Zandt
% Description: Minimization of a user-supplied function with respect... |
github | panditanvita/BTCpredictor-master | bayesian.m | .m | BTCpredictor-master/bayesian.m | 1,004 | utf_8 | 38e362f8d6968a973ae22f93f68c25f6 | %to calculate the expected price change dp_j based on a given x, where
%x is the vector of current empirical prices, ending in our current price
%
%equation:
%dpj = (sum over i=1 to n(y_i * exp(c(x,x_i))))/(sum over i=1 to n(exp(c(x,x_i)))
%n=20 for our given set of patterns
%x_i is a given pattern
%y_i is the price ch... |
github | ilya-shmulevich/pbn-matlab-toolbox-master | bnAttractorProximity.m | .m | pbn-matlab-toolbox-master/bnAttractorProximity.m | 2,008 | utf_8 | 6e52d83a7a9e47ce0cb0ff8cc5af8c7f | function [P,FA] = bnAttractorProximity(ab)
% SYNTAX: P = bnAttractorProximity(ab)
% This function creates a proximity matrix P between the attractors. The
% only input is the vector ab, produced by bnAttractor. The distance
% between attractor i and j is stored in P(i,j) and is computed as follows:
% For every att... |
github | ilya-shmulevich/pbn-matlab-toolbox-master | pbnStateVisit.m | .m | pbn-matlab-toolbox-master/pbnStateVisit.m | 2,366 | utf_8 | ee629c9bdfd37e18a4055dbbe4330916 | function [bestgene,m] = pbnStateVisit(x,y,A,k0)
% [bestgene,m] = pbnStateVisit(x,y,A,k0) - best gene for intervention
% This function can be used to decide which gene is the best possible
% target for intervention if we want to go from state x to state y. Vectors
% x and y are binary vectors (1 by n) representing... |
github | ilya-shmulevich/pbn-matlab-toolbox-master | makeK.m | .m | pbn-matlab-toolbox-master/makeK.m | 842 | utf_8 | 31c47cef9907da7580a1704187df3022 | function K = makeK(Li)
% K = makeK(Li) - matrix K
% This function creates the matrix K (see PBN paper) It is of size N x n Li
% is a vector [l(1) l(2) .... l(n)], where l(i) is the number of possible
% functions for gene i
% Ilya Shmulevich Aug. 16, 2001
% Modified May 14, 2003 by HL.
N = prod(Li); % n... |
github | epnev/constrained-foopsi-master | lars_regression_noise.m | .m | constrained-foopsi-master/lars_regression_noise.m | 7,310 | utf_8 | 57b6188ceb2fc027c7e65b5a96aac472 | function [Ws, lambdas, W_lam, lam, flag] = lars_regression_noise(Y, X, positive, noise)
% run LARS for regression problems with LASSO penalty, with optional positivity constraints
% Author: Eftychios Pnevmatikakis. Adapted code from Ari Pakman
% Input Parameters:
% Y: Y(:,t) is the observed data at time ... |
github | gthohensee/TDTR_vH3_pub-master | SpotSize_FWHM_vH3.m | .m | TDTR_vH3_pub-master/TDTR_vH3/SpotSize_FWHM_vH3.m | 1,406 | utf_8 | c8392fb3823642fafb68eb7617ce5fd3 | %The main program tries to minimize "Z" by optimizing the variable(s) X
%This program Lets you:
% 1) Define the vector X: example, if lambda(3) is what you want to solve for,
% then set X=lambda(3)....if you whish to simulatenous solve for more than one
% variable, you can just define multiple variables (eg. X(1)... |
github | gthohensee/TDTR_vH3_pub-master | parametric_senseplot_vH3_notN.m | .m | TDTR_vH3_pub-master/TDTR_vH3/parametric_senseplot_vH3_notN.m | 21,542 | utf_8 | f0682afb8f476c7fc030eaeb9898ab2a | function [S_LCTE,S_sys,xvar,SS_LCTE,SS_sys] = parametric_senseplot_vH3_notN(Xij,...
SYS_i, xvar,datparams,sysparams, calparams, matparams, Tparams,LCTE_sens_consider,sys_consider)
%parametric_senseplot_vH3_notN - Calculates sensitivity plots dlogR/dlogX for
%thermal model. The sens_consider booleans can be edited ... |
github | gthohensee/TDTR_vH3_pub-master | SimpsonInt.m | .m | TDTR_vH3_pub-master/TDTR_vH3/SimpsonInt.m | 321 | utf_8 | 6d611fb4ae258896de0502406ad7857e | %Simpson integration
%int(f(x),x=a..b)
%int=
function Integral=SimpsonInt(x,f)
N=length(x)-1;
Nints=length(f(1,:));
delta=(x(N+1)-x(1))/N;
%generate weighting factors
w=zeros(N+1,1);
w(1:2:N+1)=2;
w(2:2:N)=4;
w(1)=1;
w(N+1)=1;
warray=w*ones(1,Nints);
Integral=sum(warray.*f);
Integral=delta/3*Integral;
... |
github | gthohensee/TDTR_vH3_pub-master | parametric_senseplot_vH3.m | .m | TDTR_vH3_pub-master/TDTR_vH3/parametric_senseplot_vH3.m | 21,834 | utf_8 | 455d07ab64a9cff5d48a5b1deb41f89a | function [S_LCTE,S_sys,xvar,SS_LCTE,SS_sys] = parametric_senseplot_vH3(Xij,...
SYS_i, xvar,datparams,sysparams, calparams, matparams, Tparams,LCTE_sens_consider,sys_consider)
%parametric_senseplot_vH3 - Calculates sensitivity plots dlogR/dlogX for
%thermal model. The sens_consider booleans can be edited to change ... |
github | gthohensee/TDTR_vH3_pub-master | AutoSetPhase_vH3.m | .m | TDTR_vH3_pub-master/TDTR_vH3/AutoSetPhase_vH3.m | 23,080 | utf_8 | 75e0ff0d3ff6f602649e22f332ad8272 | function [delphase,phase,fitparam] = AutoSetPhase_vH3(data,t0,filename,pathname,t_window)
%AutoSetPhase_vH3 - Adjust the phase defining V(in) and V(out) in DATA matrix.
%In TDTR data collection, V(in) and V(out) are defined as the signal
%amplitudes at the modulation frequency that are in-phase and out-of-phase
%of... |
github | gthohensee/TDTR_vH3_pub-master | SetPhase_vH3.m | .m | TDTR_vH3_pub-master/TDTR_vH3/SetPhase_vH3.m | 22,672 | utf_8 | 90f22d085584f70e67adfe28415207e9 | function [delphase,phase,fitparam] = SetPhase_vH3(data,t0,filename,pathname,t_window)
%SetPhase_vH3 - Adjust the phase defining V(in) and V(out) in DATA matrix.
%In TDTR data collection, V(in) and V(out) are defined as the signal
%amplitudes at the modulation frequency that are in-phase and out-of-phase
%of the RF ... |
github | gthohensee/TDTR_vH3_pub-master | PhaseShift.m | .m | TDTR_vH3_pub-master/TDTR_vH3/PhaseShift.m | 1,006 | utf_8 | d74d1204e24a53c72a1c39767ab482aa | %% Simple subfunction: execute given phase shift on V(out), V(in).
function [res, delphase, Vin_shifted_A, Vout_shifted_A, ...
Vin_shifted_B, Vout_shifted_B] ...
= PhaseShift(phase,ishort,Vin_shifted_A, Vout_shifted_A, ...
Vin_shifted_B,... |
github | gthohensee/TDTR_vH3_pub-master | SpotSize_V4.m | .m | TDTR_vH3_pub-master/TDTR_vH3/SpotSize_V4.m | 858 | utf_8 | 63a805bc90207f1d63be0b4260542b2d | %The main program tries to minimize "Z" by optimizing the variable(s) X
%This program Lets you:
% 1) Define the vector X: example, if lambda(3) is what you want to solve for,
% then set X=lambda(3)....if you whish to simulatenous solve for more than one
% variable, you can just define multiple variables (eg. X(1)... |
github | gthohensee/TDTR_vH3_pub-master | VoutLinearFit_vH3.m | .m | TDTR_vH3_pub-master/TDTR_vH3/VoutLinearFit_vH3.m | 7,209 | utf_8 | 46130655c5d7d66148023ede645269a0 | function [Psol,fitOK] = VoutLinearFit_vH3(DATAMATRIX)
%VoutLinearFit_vH3 - Assists user in specifying a linear fit to the V(out)
% data, in case V(out) is very small and one wishes to smooth
% the ratio from the disproportionate V(out) noise. Relies on the
% assumption that V(out) data is strictly linear with random no... |
github | noreun/eeghub-master | eeghub_main.m | .m | eeghub-master/eeghub_main.m | 15,046 | utf_8 | 36577a794545363371cf3529dbe9da13 | %==========================================================================
%
% eeghub is meant to be a bridge between many different m/eeg tools.
% the idea is to use the best of each one, avoiding repeting code and
% optimizing everyday pipelines, like reruning the analysis after change
% in some parameter.
%
% For... |
github | noreun/eeghub-master | addpath_recurse.m | .m | eeghub-master/tutorial/addpath_recurse.m | 8,674 | utf_8 | a2d45a9c2aefb5990bd2657c6872e3c2 | function addpath_recurse(strStartDir, caStrsIgnoreDirs, strXorIntAddpathMode, blnRemDirs, blnDebug)
%ADDPATH_RECURSE Adds (or removes) the specified directory and its subfolders
% addpath_recurse(strStartDir, caStrsIgnoreDirs, strXorIntAddpathMode, blnRemDirs, blnDebug)
%
% By default, all hidden directories (prec... |
github | noreun/eeghub-master | CubeHelix.m | .m | eeghub-master/lib/CubeHelix.m | 1,644 | utf_8 | 38cd3cb43aa81050489c1dcc0a0faf55 | % Usage:
% colormap(CubeHelix(...))
%
%==========================================================
% Calculates a "cube helix" colour map for MATLAB. The
% colours are a tapered helix around the diagonal of the
% RGB colour cube, from black [0,0,0] to white [1,1,1].
% Deviations away from the diagonal vary quadr... |
github | noreun/eeghub-master | testsem.m | .m | eeghub-master/lib/testsem.m | 1,438 | utf_8 | fc921541a40a0ce8a7b5eb7bb0a9ad10 | function testsem
isOpen = matlabpool('size') > 0;
% Start parallel processing, if necessary
if ~isOpen
fprintf('Oppening matlabpool...');
matlabpool;
fprintf(' Done\n');
end
semkey=42; % activate semaphore
% semkey=-1; % deactivate semaphore
semaphor... |
github | noreun/eeghub-master | check_mex_compiled.m | .m | eeghub-master/lib/check_mex_compiled.m | 2,620 | utf_8 | 2b60b255a83233fc5d50315a33ef3835 | function check_mex_compiled(varargin)
% Check if mex file is compiled for system
%
% check_mex_compiled(source_file)
% check_mex_compiled(options,source_file)
%
% check_mex_compiled(source_file) checks whether a mex
% source file source_file is compiled for the current
% operating system OR whether the sour... |
github | noreun/eeghub-master | permstatv2.m | .m | eeghub-master/lib/permstatv2.m | 8,136 | utf_8 | 2ad98c4a8114d9a011265159fd3777b8 | %
% permstatv2(dostat, realdata, permutationdata, 'parameter', value, ...);
%
% Calculate permutation and cluster statistics for unidimentional data
%
% Leonardo Barbosa
% 14 10 204
%
% dostat : 0 : simulations and average already done, just cluster and do
% calculate monte-carlo p-values (need... |
github | noreun/eeghub-master | eeghub_denoise_eogreg.m | .m | eeghub-master/actions/eeghub_denoise_eogreg.m | 2,213 | utf_8 | 5664b9ea3eab9aea03dbd8b1ff2a7c35 | function fname_spm = denoise_eogreg(param)
%
% Apply time shifted regression of reference electrodes on epoched data.
% should remove occular components (blinks, saccades, etc...) from the signal.
%
% ATTENTION :
% outliers trials (e.g. sd > 2) have to be removed before calling this
% funct... |
github | noreun/eeghub-master | eeghub_spm_crop.m | .m | eeghub-master/actions/eeghub_spm_crop.m | 1,585 | utf_8 | 793a68940a97a7d208daee2c628bfa09 | function fname_spm = eeghub_spm_crop(param)
fprintf ('New croping function!\n');
D = spm_eeg_load(param.fname_spm);
if D.ntrials == 1
error('Cant run second epoching without frist. Change do.epoching = 1 and do.epoching2 = 0');
end
fprintf('\nRunning second epoching...\n\n');
% find... |
github | CompMusic/TaanSegmentation_HindustaniMusic-master | SDM_nov.m | .m | TaanSegmentation_HindustaniMusic-master/SDM_nov.m | 1,336 | utf_8 | 6cb442953b05f29c3a7fa7ac9e6adb8d | % Function to give self similarity matrix
% Input : Kw-> floor(Kernel Width/2)
% : dist_measure->Distance measure for SDM computation
% : As per the matlab version and the distances allowed
% : feature-> Feature matrix
% Output : Similarity matrix sim_mat
% : Novelty score
% Exampl... |
github | CompMusic/TaanSegmentation_HindustaniMusic-master | norm_feature.m | .m | TaanSegmentation_HindustaniMusic-master/norm_feature.m | 876 | utf_8 | 1338754592ea74fcab60e60d7abf4111 | % %%%% Feature Normalization
%
% Input : feature array matrix( time stamps vs features)
% : Char input as 'a', 'b', 'c'
% Scaling a as normalization to standard gaussain
% Scaling b as max normalization
% Scaling c as Min max normalization
%
% Output : Scaled features according to one of ... |
github | CompMusic/TaanSegmentation_HindustaniMusic-master | PitchModulationFunction.m | .m | TaanSegmentation_HindustaniMusic-master/PitchModulationFunction.m | 2,580 | utf_8 | fd2b58666b9fa8ad93548f522a8f3e93 | % features calculated using analysis window are further averaged over texture frame
function [ER_mn]=PitchModulationFunction(nwinfo_tpe,PitchModParam)
w=hamming(PitchModParam.vib_step); %% hamming window
polytym_end=(PitchModParam.vib_step-1)/100; % /100 to convert to sec
ER=zeros(... |
github | CompMusic/TaanSegmentation_HindustaniMusic-master | EnergyAroundPk_PkFreq_PkAmpl.m | .m | TaanSegmentation_HindustaniMusic-master/EnergyAroundPk_PkFreq_PkAmpl.m | 4,635 | utf_8 | 868d763aea5de6b10b1541272e30df43 | % features calculated using analysis window are further averaged over texture frame
function [EnergyAroundPeak_mn,PeakFreqVal_mn,PeakValue_mn]=EnergyAroundPk_PkFreq_PkAmpl(nwinfo_tpe,FeatrParam)
w=hamming(FeatrParam.vib_step); %% hamming window
polytym_end=(FeatrParam.vib_step-1)/100... |
github | CompMusic/TaanSegmentation_HindustaniMusic-master | peak_pick.m | .m | TaanSegmentation_HindustaniMusic-master/peak_pick.m | 1,978 | utf_8 | 6a20aa7c4b7aba035d02aac1356c55bc | % Peak picking algorithm %
% Input : nov_fn -> Novelty function
% : md -> Median filter length
% : me -> Mean filter length
% : Thresh_search -> Vicinity to search for the peak in the original
% nov_fn from the dtected peaks in smootened nov_fn
% : thres -> Percent... |
github | CompMusic/TaanSegmentation_HindustaniMusic-master | Melodia2PolyPDA.m | .m | TaanSegmentation_HindustaniMusic-master/Melodia2PolyPDA.m | 712 | utf_8 | 6a80fcaea1684a99d00ad0a90bb2d93c | % this matlab code converts Melodia pitch values stored in txt file into
% tpe file with energy column as zero. Also the pitch values in Melodia
% spaced at prev_dur are modified to 0.01 as in the case of PolyPDA
% clc;
% clear all;
% close all;
function [new_tpefile]=Melodia2PolyPDA(FileName)
tpefile=load(FileName);... |
github | CompMusic/TaanSegmentation_HindustaniMusic-master | myOctaveVersion.m | .m | TaanSegmentation_HindustaniMusic-master/util/myOctaveVersion.m | 169 | utf_8 | d4603482a968c496b66a4ed4e7c72471 | % return OCTAVE_VERSION or 'undefined' as a string
function result = myOctaveVersion()
if isOctave()
result = OCTAVE_VERSION;
else
result = 'undefined';
end
|
github | CompMusic/TaanSegmentation_HindustaniMusic-master | isOctave.m | .m | TaanSegmentation_HindustaniMusic-master/util/isOctave.m | 108 | utf_8 | 4695e8d7c4478e1e67733cca9903f9ef | %detects if we're running Octave
function result = isOctave()
result = exist('OCTAVE_VERSION') ~= 0;
end |
github | CompMusic/TaanSegmentation_HindustaniMusic-master | makeLMfilters.m | .m | TaanSegmentation_HindustaniMusic-master/util/makeLMfilters.m | 1,895 | utf_8 | 21950924882d8a0c49ab03ef0681b618 | function F=makeLMfilters
% Returns the LML filter bank of size 49x49x48 in F. To convolve an
% image I with the filter bank you can either use the matlab function
% conv2, i.e. responses(:,:,i)=conv2(I,F(:,:,i),'valid'), or use the
% Fourier transform.
SUP=49; % Support of the largest filter (must be... |
github | isovector/feng-shui-master | feng-shui.m | .m | feng-shui-master/feng-shui.m | 530 | utf_8 | f6c68cd35c29406c815cf444a79f76e0 | orig = csvread('data.csv');
function result = toMinutes(time)
ipart = fix(time);
fpart = time - ipart;
result = ipart * 60 + fpart * 100;
end
for i = 2 : size(orig)
orig(i,4) = toMinutes(orig(i,4));
orig(i,6) = toMinutes(orig(i,6));
% stats(i,:) = orig(i,:);
stats(i,:) = [ orig(i,:), orig(... |
github | qx0731/Work_DAPI_image_feature_extraction-master | tiffread.m | .m | Work_DAPI_image_feature_extraction-master/tiffread.m | 25,614 | utf_8 | e05968b09319a9ea37bd33f4d7a4807c | function stack = tiffread(filename, indices)
% tiffread, version 2.91 Nov 1, 2010
%
% stack = tiffread;
% stack = tiffread(filename);
% stack = tiffread(filename, indices);
%
% Reads 8,16,32 bits uncompressed grayscale and (some) color tiff files,
% as well as stacks or multiple tiff images, for example those produced... |
github | qx0731/Work_DAPI_image_feature_extraction-master | compute_skeleton_pc.m | .m | Work_DAPI_image_feature_extraction-master/compute_skeleton_pc.m | 1,143 | utf_8 | 374e7f1dd1d03a4877712de7b3ddeb71 | function [level_center]=compute_skeleton_pc(sample,phi,levelnum,overlap)
% this is used to compute the point cloud skeleton
% input sample is the n*3 points
% phi indicates the eigenfunction need to be a colum vector
% levelnum indicates how many levels there are
% overlap is the overlapping between two levels
% outpu... |
github | qx0731/Work_DAPI_image_feature_extraction-master | maskcircle2.m | .m | Work_DAPI_image_feature_extraction-master/chanvese/maskcircle2.m | 2,027 | utf_8 | 76d8d7c5f9ad93452148de0e2e165e75 |
function m = maskcircle2(I,type)
% auto pick a circular mask for image I
% built-in mask creation function
% Input: I : input image
% type: mask shape keywords
% Output: m : mask image
% Copyright (c) 2009,
% Yue Wu @ ECE Department, Tufts University
% All Rights Reserved
if size(I,3)~=3
temp ... |
github | qx0731/Work_DAPI_image_feature_extraction-master | chenvese.m | .m | Work_DAPI_image_feature_extraction-master/chanvese/chenvese.m | 14,330 | utf_8 | 6e0a04d68d1c7a75ea5623fe56260a5b | %==========================================================================
%
% Active contour with Chen-Vese Method
% for image segementation
%
% Implemented by Yue Wu (yue.wu@tufts.edu)
% Tufts University
% Feb 2009
% http://sites.google.com/site/rexstribeofimageprocessing/
%
% all rights reserved
% L... |
github | qx0731/Work_DAPI_image_feature_extraction-master | insidepoly.m | .m | Work_DAPI_image_feature_extraction-master/InsidePolyFolder/insidepoly.m | 7,681 | utf_8 | e667ab47c9ddc41650d18c16bf9f88af | function [inpoly onboundary] = insidepoly(varargin)
% [inpoly onboundary] = insidepoly(X, Y, PX, PY)
%
% Check if (X,Y) are inside the interior of a 2D polygon delimited by the
% polygon vertices (PX,PY).
%
% INPUTS:
% - X, Y: arrays of same size, coordinates of N data points
% - PX, PY: arrays of same size, coord... |
github | phunghx/Tracking_KCF_KF-master | run_tracker.m | .m | Tracking_KCF_KF-master/StandardKCF_MOSSE/run_tracker.m | 7,330 | utf_8 | 7a72a6eb83061db0fc78350ee1aa1fd1 |
%
% High-Speed Tracking with Kernelized Correlation Filters
%
% Joao F. Henriques, 2014
% http://www.isr.uc.pt/~henriques/
%
% Main interface for Kernelized/Dual Correlation Filters (KCF/DCF).
% This function takes care of setting up parameters, loading video
% information and computing precisions. For the actua... |
github | lqhl/PowerWalk-master | gibbs_sampler.m | .m | PowerWalk-master/toolkits/graphical_models/deprecated/gibbs_sampling/matlab/gibbs_sampler.m | 7,881 | utf_8 | b30a403ab91276aaddafbcc244c31a05 | %% Parallel Gibbs sampler
% The parallel gibbs sampler is an optimized a c++ implementation of
% the discrete Gibbs samplers which uses multiple threads to
% accelerate the generation of a single sampling chain. The parallel
% Gibbs sampler implements two algorithms described in the paper:
%
% Parallel Gibbs Samplin... |
github | lqhl/PowerWalk-master | table_factor.m | .m | PowerWalk-master/toolkits/graphical_models/deprecated/gibbs_sampling/matlab/table_factor.m | 1,525 | utf_8 | 594788b85d9bb283d16d642095087db6 | %% Construct a discrete table factor
%
% factor = table_factor(vars, logP)
%
% vars: array of variable ids (e.g., [1,2,4] )
% logP: tensor representing the log potential values (e.g., ones(3,7,2)
% where variable 1 takes on 3 states variable 2 takes on 7 states and
% variable 4 takes on 2 states.
%
% A ta... |
github | lqhl/PowerWalk-master | make_grid_model.m | .m | PowerWalk-master/toolkits/graphical_models/deprecated/gibbs_sampling/matlab/tests/make_grid_model.m | 1,737 | utf_8 | 9310c056cecd8ce7e9e221ebe8730252 | %% This code generates a grid model
function [factors, img, noisy_img] = make_grid_model(rows, cols, states, ...
lambdaSmooth, noiseP)
% Create a virtual image
[u,v] = meshgrid(linspace(0,1,rows), linspace(0,1,cols));
img = (1 + cos(1./sqrt((u-.5).^2 + (v-.5).^2)) )/2 + u.^2;
img = (img - min(img(:)))/(max(img(:)) ... |
github | poteat/ksp-sim-master | coast_events.m | .m | ksp-sim-master/coast_events.m | 467 | utf_8 | f6c5e050dc3c00c5abd669f15de2eb4c |
% 1: Atmosphere exited
% 2: Out of fuel
% 3: Surface collision
% 4: Fell into gravity turn zone
function [value, isterminal, direction] = coast_events(~,Z)
global CRAFT PLANET ATMOSPHERE TARGET
MF = CRAFT(5);
R = PLANET(2);
AH = ATMOSPHERE(2);
TF = TARGET(2);
h = hyp... |
github | poteat/ksp-sim-master | coast.m | .m | ksp-sim-master/coast.m | 905 | utf_8 | 2a4fe7970d316b36915dcb9948f217bf |
function dZ = coast(~,Z)
global CRAFT PLANET ATMOSPHERE
T = CRAFT(1);
II = CRAFT(2);
IF = CRAFT(3);
G = PLANET(1);
R = PLANET(2);
RS = PLANET(3);
S = PLANET(4);
D = ATMOSPHERE(1);
H = ATMOSPHERE(3);
x = Z(1);
y = Z(2);
... |
github | poteat/ksp-sim-master | vertical_ascent.m | .m | ksp-sim-master/vertical_ascent.m | 790 | utf_8 | 2c24969c9bd1ac10c5dd12365076d9b0 |
function dZ = vertical_ascent(~,Z)
global CRAFT PLANET ATMOSPHERE
T = CRAFT(1);
II = CRAFT(2);
IF = CRAFT(3);
G = PLANET(1);
R = PLANET(2);
RS = PLANET(3);
S = PLANET(4);
D = ATMOSPHERE(1);
H = ATMOSPHERE(3);
x = Z(1);
y =... |
github | poteat/ksp-sim-master | gravity_turn.m | .m | ksp-sim-master/gravity_turn.m | 946 | utf_8 | 6b31b941a08caf822de283245d856405 |
function dZ = gravity_turn(~,Z)
global CRAFT PLANET ATMOSPHERE TARGET
T = CRAFT(1);
II = CRAFT(2);
IF = CRAFT(3);
G = PLANET(1);
R = PLANET(2);
RS = PLANET(3);
S = PLANET(4);
D = ATMOSPHERE(1);
H = ATMOSPHERE(3);
TI = TARGE... |
github | poteat/ksp-sim-master | vertical_ascent_events.m | .m | ksp-sim-master/vertical_ascent_events.m | 450 | utf_8 | 3d8ef612a94321b06a60b6feb2ae58cb |
% 1: Success
% 2: Out of fuel
% 3: Surface collision
% 4: Exit atmosphere
function [value, isterminal, direction] = vertical_ascent_events(~,Z)
global CRAFT PLANET ATMOSPHERE TARGET
MF = CRAFT(5);
R = PLANET(2);
AH = ATMOSPHERE(2);
TI = TARGET(1);
h = hypot(Z(1),Z(2)... |
github | poteat/ksp-sim-master | gravity_turn_events.m | .m | ksp-sim-master/gravity_turn_events.m | 887 | utf_8 | 4cf8bb6fe9eea65c5ddd2e5b7e423ef7 |
% 1: turnFinal height reached
% 2: Out of fuel
% 3: Surface collision
% 4: Exit atmosphere
% 5: Dropped below turnInitial
% 6: Projected apoapsis reached
function [value, isterminal, direction] = gravity_turn_events(~,Z)
global CRAFT PLANET ATMOSPHERE TARGET
MF = CRAFT(5);
R = PLANET(2);
... |
github | poteat/ksp-sim-master | simulate.m | .m | ksp-sim-master/simulate.m | 6,227 | utf_8 | 8b4e53fc07ab2dd63c434f47bd39d445 |
function remaining_dv = simulate(in_TWR,in_TI,in_TF,in_TS,in_AF)
TWR = in_TWR;
T = 650;
M_engine = 3;
M_payload = 0.1;
G = 9.82;
M_fuel = (9/10)*(T/(TWR*G)-M_engine-M_payload);
MI = M_engine + M_payload + (10/9)*M_fuel;
MF = MI - M_fuel;
MI
MF
%% Variable Initialization
% Single-stage rocket para... |
github | niklas-alden/exjobb-master | agc_lut.m | .m | exjobb-master/matlab/agc_lut.m | 3,338 | utf_8 | e4de683a20e8ea0e522f28f9d0883f28 | % %%
function [gain] = agc_lut(~)
n = 100;
P_in = 1:n;
lut = ones(n,7);
lut(:,1) = 1:n;
% ideal
max = 82;
for i = 1:n
if i < max
lut(i,2) = 1;
else
lut(i,2) = max / P_in(i);
end
end
% tanh 1, index 3
a = 0.015;
b = 82;
... |
github | niklas-alden/exjobb-master | agc_lut_dB.m | .m | exjobb-master/matlab/agc_lut_dB.m | 3,542 | utf_8 | 2dcbf458aff14f42a4cbb19cba141de7 | % %%
function [gain] = agc_lut_dB(~)
n = 100;
P_in = 1:n;
lut = ones(n,4);
% ideal, index 1
max = 82;
for i = 1:n
if i > max
lut(i,1) = 10^(max/10) / 10^(i/10);
end
end
% dB polynomial 1, index 2
for i = 1:n
if i > max
lut(... |
github | rxa254/DACdenoising-master | td_spectrAnalyzer.m | .m | DACdenoising-master/DACnoise/td_spectrAnalyzer.m | 15,544 | utf_8 | 651e42089182cac84be1a8e2f8152ca9 | function [fr, fb, handle] = td_spectrAnalyzer(varargin)
def = struct(...
'noisefloor_dB', -350, ...
'filter', 'none', ...
'logscale', false, ...
'NMax', 10000, ...
'freqUnit', 'Hz', ...
'fig', -1, ...
'plotStyle', 'b-', ...
'originMapsTo_Hz',... |
github | rxa254/DACdenoising-master | noise_shaper_high_prem.m | .m | DACdenoising-master/DACnoise/noise_shaper_high_prem.m | 4,450 | utf_8 | b2a00722456d6a1512136617a4f7c8ef | function noise_shaper_high_prem()
close all;
% load('saved_out_DARM_decreased.mat');
mp.Digits(34);
% sampling rate
% rate_Hz = 524.288e3;
rate_Hz = mp('16.384e3');
% rate_Hz=length(save_out)/32;
% rate_Hz=256;
%
% exponent=(numel(num2str(rate_Hz))-5);
% const=10^-exponent... |
github | rxa254/DACdenoising-master | noise_shaper2.m | .m | DACdenoising-master/DACnoise/noise_shaper2.m | 4,613 | utf_8 | 2999b3ecb6a543183a29310504a7ab04 | function noise_shaper2()
close all;
rate_Hz = 16.384e3;
gcl_s = 32;
len=gcl_s*rate_Hz;
fi=fopen('take_signal_shape.bin','rb');
if fi==-1
display('error reading file');
return
end
[save_out,~]=fread(fi,len,'real*8');
fclose(fi);
td=save_out';
%%%%%%%%%%%% b... |
github | rxa254/DACdenoising-master | demo_noise_shaper.m | .m | DACdenoising-master/DACnoise/demo_noise_shaper.m | 6,978 | utf_8 | c2208b3fea18f4b632af9121d1aaf24c | function demo_noise_shaper()
close all;
% signal duration in seconds
gcl_s = 1e-3;
% sampling rate
rate_Hz = 76.8e6;
0.001 * rate_Hz / 4e6
% *********************************************
% spectrum analyzer setup
% *********************************************
SAparams = ... |
github | rxa254/DACdenoising-master | noise_shaper.m | .m | DACdenoising-master/DACnoise/noise_shaper.m | 10,938 | utf_8 | 30d00c30f4d419835cba9ec8af097fe9 | function noise_shaper()
close all;
% load('saved_out_DARM_decreased.mat');
% sampling rate
% rate_Hz = 524.288e3;
rate_Hz = 16.384e3;
% rate_Hz=length(save_out)/32;
% rate_Hz=256;
%
% exponent=(numel(num2str(rate_Hz))-5);
% const=10^-exponent;
% signal duration in seco... |
github | rxa254/DACdenoising-master | readFilterFile.m | .m | DACdenoising-master/High_Precision_Noise_Estimation/readFilterFile.m | 4,433 | utf_8 | 78b456715313528ca73780dbd7cd25a3 | % Reads all filters from a filter file and returns them in a
% struct with fields for each filter. Each filter field is
% a vector of filter module sturcts which contain a name, a
% gain value, and an soscoef vector.
% (Inspired by Peter Fritschel's filter reader.)
%
% NOTE: matlab indices start at 1, so module indice... |
github | erfannoury/SuperEdge-master | collect_eval_bdry.m | .m | SuperEdge-master/Codes/Benchmark/benchmarks/collect_eval_bdry.m | 3,898 | utf_8 | 58963e72d718135743f87b0c89a292ab | function [ bestF, bestP, bestR, bestT, F_max, P_max, R_max, Area_PR] = collect_eval_bdry(pbDir)
% function [ bestF, bestP, bestR, bestT, F_max, P_max, R_max, Area_PR ] = collect_eval_bdry(pbDir)
%
% calculate P, R and F-measure from individual evaluation files
%
% Pablo Arbelaez <arbelaez@eecs.berkeley.edu>
fname = f... |
github | erfannoury/SuperEdge-master | match_segmentations2.m | .m | SuperEdge-master/Codes/Benchmark/benchmarks/match_segmentations2.m | 1,703 | utf_8 | ace4dcd87ac6747297b5a12f3ccca500 | function [sumRI sumVOI ] = match_segmentations2(seg, groundTruth)
% match a test segmentation to a set of ground-truth segmentations with the PROBABILISTIC RAND INDEX and VARIATION OF INFORMATION metrics.
sumRI = 0;
sumVOI = 0;
[tx, ty] = size(seg);
for s = 1 : numel(groundTruth)
gt = groundTruth{s}.Segmentation;... |
github | okuta/caffe-master | prepare_batch.m | .m | caffe-master/matlab/caffe/prepare_batch.m | 1,298 | utf_8 | 68088231982895c248aef25b4886eab0 | % ------------------------------------------------------------------------
function images = prepare_batch(image_files,IMAGE_MEAN,batch_size)
% ------------------------------------------------------------------------
if nargin < 2
d = load('ilsvrc_2012_mean');
IMAGE_MEAN = d.image_mean;
end
num_images = length... |
github | okuta/caffe-master | matcaffe_demo_vgg.m | .m | caffe-master/matlab/caffe/matcaffe_demo_vgg.m | 3,036 | utf_8 | f836eefad26027ac1be6e24421b59543 | function scores = matcaffe_demo_vgg(im, use_gpu, model_def_file, model_file, mean_file)
% scores = matcaffe_demo_vgg(im, use_gpu, model_def_file, model_file, mean_file)
%
% Demo of the matlab wrapper using the networks described in the BMVC-2014 paper "Return of the Devil in the Details: Delving Deep into Convolutional... |
github | okuta/caffe-master | matcaffe_demo.m | .m | caffe-master/matlab/caffe/matcaffe_demo.m | 3,344 | utf_8 | 669622769508a684210d164ac749a614 | function [scores, maxlabel] = matcaffe_demo(im, use_gpu)
% scores = matcaffe_demo(im, use_gpu)
%
% Demo of the matlab wrapper using the ILSVRC network.
%
% input
% im color image as uint8 HxWx3
% use_gpu 1 to use the GPU, 0 to use the CPU
%
% output
% scores 1000-dimensional ILSVRC score vector
%
% You m... |
github | okuta/caffe-master | matcaffe_demo_vgg_mean_pix.m | .m | caffe-master/matlab/caffe/matcaffe_demo_vgg_mean_pix.m | 3,069 | utf_8 | 04b831d0f205ef0932c4f3cfa930d6f9 | function scores = matcaffe_demo_vgg_mean_pix(im, use_gpu, model_def_file, model_file)
% scores = matcaffe_demo_vgg(im, use_gpu, model_def_file, model_file)
%
% Demo of the matlab wrapper based on the networks used for the "VGG" entry
% in the ILSVRC-2014 competition and described in the tech. report
% "Very Deep Convo... |
github | librepilot/LibrePilot-master | analyzeINSGPS.m | .m | LibrePilot-master/ground/gcs/src/experimental/SerialLogger/analyzeINSGPS.m | 2,192 | utf_8 | 5ff25ac538c86ff94edb1627e47f29aa | function [q gyro accel rpy time] = analyzeINSGPS(fn)
% Analyzes data collected from SerialLogger while DUMP_FRIENDLY
% enabled in AHRS
%
% [q gyro accel time] = analyzeINSGPS(fn)
fid = fopen(fn);
i = 1;
data(i).block = -1;
tline = fgetl(fid);
while ischar(tline) && ~isempty(tline)
switch(tline(1))
case 'q... |
github | librepilot/LibrePilot-master | OPPlots.m | .m | LibrePilot-master/ground/gcs/src/plugins/uavobjects/OPPlots.m | 4,727 | utf_8 | 7c4904e8a2cea9eaefc753da7cd5b467 | function OPPlots()
[FileName,PathName,FilterIndex] = uigetfile('*.mat');
matfile = strcat(PathName,FileName);
load(matfile);
%load('specificfilename')
TimeVA = [VelocityState.timestamp]/1000;
VA = [[VelocityState.North]
[VelocityState.East]
[VelocityState.Down]]... |
github | librepilot/LibrePilot-master | openpilot2kml.m | .m | LibrePilot-master/matlab/revo/openpilot2kml.m | 7,123 | utf_8 | 8d376a92373813a3ea2042b8291d9b1f | function openpilot2kml(matfile)
if ~exist('ge_colorbar', 'file')
msg=['Google Earth Toolbox must be present and included in the Matlab path. For example:'...
10 ' path(path, ''/Users/ponthy/googleearth'''];
error(msg)
end
if nargin==0
[FileName,PathName] = uigetfile('*.mat');
matfile = strcat(PathName,FileName)... |
github | dani-lbnl/cancerCervicalHack-master | SegEvaluateJIDiceTPRFPR.m | .m | cancerCervicalHack-master/hackathon/code/matlab/SegEvaluateJIDiceTPRFPR.m | 2,639 | utf_8 | fdb8975dc67591f03534e247f5f01524 | function [ JI, Dice, TPR, FPR, FNR, TNR ] = SegEvaluateJIDiceTPRFPR( phi_Alg, phi_GT )
% Compute Jaccard index, Dice, True positive rate, False positive rate
% for each cell in Pixel Level.
%
% phi_Alg - segmentation result generated by the algorithm
% phi_GT - ground truth
% * both are for each cell
JI = j... |
github | mortonne/aperture-master | init_aperture.m | .m | aperture-master/init_aperture.m | 1,259 | utf_8 | 2a1732fca9ac798e2551a6a9e457cdd7 | function init_aperture()
%INIT_APERTURE Add paths necessary to use Aperture.
%
% init_aperture()
main_dir = fileparts(which('init_aperture'));
% main directories
myaddpath('basic');
myaddpath(fullfile('events', 'creation'));
myaddpath(fullfile('events', 'operations'));
myaddpath(fullfile('events', 'stats'));
myadd... |
github | mortonne/aperture-master | write_bad_channels.m | .m | aperture-master/patterns/artifacts/write_bad_channels.m | 3,760 | utf_8 | bc99fe7e0fe449cf7e27263cd50f8048 | function subj = write_bad_channels(subj, varargin)
%WRITE_BAD_CHANNELS Identify bad channels and write to a text file.
%
% subj = write_bad_channels(subj, ...)
%
% PARAMS:
% These options may be specified using parameter, value pairs or by
% passing a structure. Defaults are shown in parentheses.
% veog_channel... |
github | mortonne/aperture-master | blink_detector_performance.m | .m | aperture-master/patterns/artifacts/blink_detector_performance.m | 4,035 | utf_8 | 574834ccacd12d33e61f415c821020fd | function [d, pHit, pFA, stats] = blink_detector_performance(pat, varargin)
%BLINK_DETECTOR_PERFORMANCE Calculate performance of a blink detector.
%
% Determine performance of a blink detector by testing it on various
% eye movements. If the blink detector marks a blink, that is a hit; if
% the blink detector marks... |
github | mortonne/aperture-master | ica_pattern.m | .m | aperture-master/patterns/eeglab/ica_pattern.m | 3,143 | utf_8 | e0c483cbbc1c111f6c393d517f74e54a | function pat = ica_pattern(pat, varargin)
%ICA_PATTERN Run independent components analysis on a pattern.
%
% pat = ica_pattern(pat, ...)
% options
def.locs_file = 'HCGSN128.loc';
def.reject_epochs = false;
def.epoch_thresh = 100;
def.save_intermediate = false;
def.plot_epoch_rej = false;
def.ica_chans = get_dim_v... |
github | mortonne/aperture-master | FASTER_process.m | .m | aperture-master/patterns/eeglab/faster/FASTER_process.m | 32,839 | utf_8 | ca1884c1e98662ea4e85ceea24beb89e | function EEG=FASTER_process(option_wrapper,log_file)
% Copyright (C) 2010 Hugh Nolan, Robert Whelan and Richard Reilly, Trinity College Dublin,
% Ireland
% nolanhu@tcd.ie, robert.whelan@tcd.ie
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public... |
github | mortonne/aperture-master | FASTER_GUI.m | .m | aperture-master/patterns/eeglab/faster/FASTER_GUI.m | 36,737 | utf_8 | fc0f41dea31f245fe8606212786bcbea | % FASTER GUI v1.2.1b - see manual for help.
function varargout=FASTER_GUI(varargin)
% Copyright (C) 2010 Hugh Nolan, Robert Whelan and Richard Reilly, Trinity
% College Dublin,
% Ireland
% nolanhu@tcd.ie, robert.whelan@tcd.ie
%
% This program is free software; you can redistribute it and/or modify
% it unde... |
github | mortonne/aperture-master | h_epoch_interp_spl.m | .m | aperture-master/patterns/eeglab/faster/h_epoch_interp_spl.m | 5,579 | utf_8 | b3f72af0ca562a5a7d2b9cd9eca573ff | % Edit to the EEGLAB interpolation function to interpolate different
% channels within each epoch
% Cleaned up and removed irrelevant sections.
%
% Additions Copyright (C) 2010 Hugh Nolan, Robert Whelan and Richard Reilly, Trinity College Dublin,
% Ireland
%
% Based on:
%
% eeg_interp() - interpolate data channels
%
% ... |
github | mortonne/aperture-master | eegplugin_FASTER.m | .m | aperture-master/patterns/eeglab/faster/eegplugin_FASTER.m | 2,619 | utf_8 | b2cf2f5b11ea7260e766c6943346fcec | % eegplugin_FASTER() - EEGLAB plugin for using FASTER processing on EEG datasets
%
% Usage:
% >> eegplugin_FASTER(fig, trystrs, catchstrs);
%
% Inputs:
% fig - [integer] EEGLAB figure
% trystrs - [struct] "try" strings for menu callbacks.
% catchstrs - [struct] "catch" strings for menu callb... |
github | mortonne/aperture-master | h_eeg_interp_spl.m | .m | aperture-master/patterns/eeglab/faster/h_eeg_interp_spl.m | 5,078 | utf_8 | 887ab5def593310f45ee7c583ca04292 | % Small edits to the EEGLAB file
% Cleaned up and removed irrelevant sections.
%
% eeg_interp() - interpolate data channels
%
% Usage: EEGOUT = eeg_interp(EEG, badchans, method);
%
% Inputs:
% EEG - EEGLAB dataset
% badchans - [integer array] indices of channels to interpolate.
% For instanc... |
github | mortonne/aperture-master | h_reref.m | .m | aperture-master/patterns/eeglab/faster/h_reref.m | 12,057 | utf_8 | f9190302954232bfa533a4bb51c9ca87 | % Small edits to the EEGLAB file
%
% reref() - convert common reference EEG data to some other common reference
% or to average reference
% Usage:
% >> Dataout = reref(data); % convert all channels to average reference
% >> [Dataout Chanlocs] = reref(data, refchan, 'key', 'val');
% ... |
github | mortonne/aperture-master | h_pop_reref.m | .m | aperture-master/patterns/eeglab/faster/h_pop_reref.m | 14,783 | utf_8 | 363e04d93bd0a84d86aea7f1fb86d6e1 | % Small edits to the EEGLAB file
%
% pop_reref() - Convert an EEG dataset to average reference or to a
% new common reference channel (or channels). Calls reref().
% Usage:
% >> EEGOUT = pop_reref( EEG ); % pop up interactive window
% >> EEGOUT = pop_reref( EEG, ref, 'key', 'val' ...);
%
% Gra... |
github | mortonne/aperture-master | distancematrix.m | .m | aperture-master/patterns/eeglab/faster/distancematrix.m | 2,418 | utf_8 | 2d740d37ed15665fc041acf76f4d8aa5 | function [distpol, distxyz, distproj] = distancematrix(EEG, eeg_chans)
%DISTANCEMATRIX Pairwise distance between electrodes.
%
% [distpol, distxyz, distproj] = distancematrix(EEG, eeg_chans)
% Copyright (C) 2010 Hugh Nolan, Robert Whelan and Richard Reilly, Trinity College Dublin,
% Ireland
% nolanhu@tcd.i... |
github | mortonne/aperture-master | faster_pattern.m | .m | aperture-master/patterns/eeglab/faster/faster_pattern.m | 7,311 | utf_8 | 756e1f9ce328c609a7a07f3460cc7656 | function pat = faster_pattern(pat, varargin)
%FASTER_PATTERN Remove artifacts using FASTER.
%
% pat = faster_pattern(pat, ...)
%
% INPUTS:
% pat: input pattern object.
%
% OUTPUTS:
% pat: filtered pattern object, with updated pattern matrix and
% associated metadata.
%
% OPTIONS:
% These o... |
github | mortonne/aperture-master | hurst_exponent.m | .m | aperture-master/patterns/eeglab/faster/hurst_exponent.m | 1,377 | utf_8 | 0a9f062130e98d1e8999e069c5bd200c | % The Hurst exponent
%--------------------------------------------------------------------------
% This function does dispersional analysis on a data series, then does a
% Matlab polyfit to a log-log plot to estimate the Hurst exponent of the
% series.
%
% This algorithm is far faster than a full-blown implemen... |
github | mortonne/aperture-master | pattern_seg2cont.m | .m | aperture-master/patterns/operations/pattern_seg2cont.m | 4,914 | utf_8 | 7bdfe6c677d66050df1ca363175a0b30 | function pat = pattern_seg2cont(pat, varargin)
%PATTERN_SEG2CONT Convert a segmented pattern to continuous form.
%
% Fold one or more dimensions of a pattern into events. This is
% generally used to change from segmented to continuous format, i.e.
% folding in the time dimension, but works with any dimension. The
... |
github | mortonne/aperture-master | freq_filter_pattern.m | .m | aperture-master/patterns/operations/freq_filter_pattern.m | 1,507 | utf_8 | 798ed895dcd2b538e5ceec5df8a6d592 | function pat = freq_filter_pattern(pat, freq_range, filt_type, varargin)
%FREQ_FILTER_PATTERN Apply a filter to a pattern.
%
% pat = freq_filter_pattern(pat, freq_range, filt_type, ...)
% options
def.order = 4;
def.buffer = [];
def.precision = '';
[opt, save_opt] = propval(varargin, def);
pat = mod_pattern(pat, ... |
github | mortonne/aperture-master | volt2pow.m | .m | aperture-master/patterns/operations/volt2pow.m | 7,639 | utf_8 | 1982601cb6818e3bbb5d0d7c4c909b2d | function pat = volt2pow(pat, freqs, varargin)
%VOLT2POW Calculate power from a voltage pattern.
%
% pat = volt2pow(pat, freqs, ...)
%
% INPUTS:
% pat: a pattern object containing voltage values.
%
% freqs: vector of frequencies at which power will be calculated.
%
% OUTPUTS:
% pat: power pattern ob... |
github | mortonne/aperture-master | cat_all_subj_patterns.m | .m | aperture-master/patterns/operations/cat_all_subj_patterns.m | 4,234 | utf_8 | 23d30a0e847e670c93d5b31390ed714b | function pat = cat_all_subj_patterns(subj, pat_name, dimension, varargin)
%CAT_ALL_SUBJ_PATTERNS Concatenate subject patterns into one pattern.
%
% pat = cat_all_subj_patterns(subj, pat_name, dimension, ...)
%
% INPUTS:
% subj: a vector of subject objects.
%
% pat_name: name of the pattern to concatenate.... |
github | mortonne/aperture-master | pat_reref.m | .m | aperture-master/patterns/operations/pat_reref.m | 3,125 | utf_8 | 447f1671eba77df298cbf4ed608f471d | function pat = pat_reref(pat, ref, varargin)
%PAT_REREF Convert EEG data to use a new reference.
%
% pat = pat_reref(pat, ref, ...)
%
% INPUTS:
% pat: pattern object.
%
% ref: new reference to use:
% 'average' - reference is the average over all channels.
% 52 - channel number... |
github | mortonne/aperture-master | patBins.m | .m | aperture-master/patterns/operations/patBins.m | 16,290 | utf_8 | 0615e63c73b79d3fb2e6b09673cb2cf8 | function [pat, bins] = patBins(pat, varargin)
%PATBINS Apply bins to dimensions of a pat object.
%
% Bin dimensions of a pattern. Determines the indices of the pattern
% for each bin, and updates the dimension information in the pat
% object. The pattern matrix is not modified.
%
% [pat, bins] = patBins(pat, ...)... |
github | mortonne/aperture-master | remove_eog_glm.m | .m | aperture-master/patterns/operations/remove_eog_glm.m | 12,940 | utf_8 | 4df2d9b30bbf1b1c810f6c0432a1f578 | function subj = remove_eog_glm(subj, pat_name, new_pat_name, varargin)
%REMOVE_EOG_GLM Fit EOG data to a pattern using a GLM.
%
% subj = remove_eog_glm(subj, pat_name, new_pat_name, ...)
%
% INPUTS:
% subj: a subject structure.
%
% pat_name: name of the pattern object to fit. Each channel will be
% ... |
github | mortonne/aperture-master | remove_bad_samples.m | .m | aperture-master/patterns/operations/remove_bad_samples.m | 4,004 | utf_8 | a8b7dfea6e6cc6bf73b72cd37e6fdd86 | function pat = remove_bad_samples(pat, varargin)
%REMOVE_BAD_SAMPLES Remove parts of a pattern that contain NaNs.
%
% Some functions reject samples of a pattern by changing elements to
% NaN. This function then allows one to remove NaN'd parts of a pattern
% completely.
%
% pat = remove_bad_samples(pat, ...)
%
% ... |
github | mortonne/aperture-master | create_glm_pattern.m | .m | aperture-master/patterns/operations/create_glm_pattern.m | 2,964 | utf_8 | f2d93d0b2727d080d3886c5bca320dd3 | function pat = create_glm_pattern(pat, stat_name, varargin)
%CREATE_GLM_PATTERN Create a pattern from remove_eog_glm output.
%
% From the results of GLM regression, get the residuals (predicted
% voltages adjust by the regressors), and put them in a new pattern.
% The adjusted voltages can then be manipulated and ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.