sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
0928656e8e2174b0e212e1eb8e29e42d3dc41477949ab9238d94c180bf70dc1d | MATLAB | 4,682 | 118 | function RLphase190225
global ACresult ACresultW CCresultDrinkOn SpikeArray RpegTouchallWon LpegTouchallWon TurnMarkerTime RmedianPTTM RpegMedian LmedianPTTM LpegMedian...
RpNum LpNum OneTurnTime CCresultSpike locsP1time locsP2time locsP1time2 locsP2time2 pksA1 pksA2 CCresultRtouchWon CCresultLtouchWon
% cd('C... |
82387c7255c4616c6e44eea10a36f0a74621018e61d38994783275a82104ab20 | MATLAB | 4,684 | 112 | function [hr, peaks, hr_period_std] = hr_calculation(x, f, fs, varargin)
% hr_calculation - Calculate heart rate (HR) from an ECG signal.
%
% [hr, peaks, hr_period_std] = hr_calculation(x, f, fs, peak_det_method, averaging_method, params)
%
% Calculates the heart rate (HR) from an ECG signal. The R-peak detector
%... |
8fe7c5ddcb76729f1313edcec5d13907a2e7f1cd6cc99d8428f52b569aa2e379 | MATLAB | 4,684 | 126 |
%{
----------------------------------------------------------------------------
Determine the time window for task relevant neurons
%Start of task
%Sound on
%Sound off
%Before choice
%After choice (0sec)
%After choice (1sec)
%After choice (2sec)
%p = 0.001
%Each epoch, predict the prior, sensory and choice... |
749933e278b2e359b4953df271b07c082cd0c3a5464a837ffab353784ee2e363 | MATLAB | 4,688 | 135 | function [dipole, teta]= DipoleGeneratorAbnormal3(N,fs,rr,alphai,bi,tetai,teta0,STM,S0)
% Under development - for QT hysteresis effect modeling
% [dipole teta]= DipoleGeneratorAbnormal3(N,fs,rr,alphai,bi,tetai,teta0,STM,S0)
% Synthetic cardiac dipole generator using the 'differential form' of the
% dipole equations... |
cf74cef7ccf151470effbef6d9ef410d119e80fc28a6a284fa614f7d08e7cab1 | MATLAB | 4,690 | 118 | %Author: Tatjana Schmitt, 2019-2023
function [subfield_borders_rotated, BF_borders_broad, coordinates_BF_map, coordinates_BF_map_rot_norm,...
subfield_idx, tonotopy_axes_rotated, axes_idx] = roi_creation(BF, complete_boundaries_map, stats, rotation_angle)
disp('Calculating rotated coordinates for visualisation .... |
60f2691aa46ebc31f7db5fe411e6f239aaaa8612f2d18736e3edcc4ba2165c07 | MATLAB | 4,694 | 167 | % read .COORD file and plot data
% PGH Oct 2001
function lcmodelresults=readcoord(filename)
read_metab_fits = 0; %set to 1 if you want to read this extra information
% define output structure for results
%lcmodelresults=struct('spectrumppm',0,'spectrumdata',0,'spectrumfit',0,'spectrumbasl',0,'metabconc',0,'linewid... |
53d70e12550b004115796ebd1ccd663885ace130a43fa1d53ae3cffcdfe573c6 | MATLAB | 4,695 | 112 | % Copyright 2024 Eelke Spaak, Donders Institute.
% See https://github.com/Spaak/rift-phase-and-visibility for readme/license.
% Belongs with:
% Spaak, E., Bouwkamp, F. G., & de Lange, F. P. (2024). Perceptual foundation and extension
% to phase tagging for rapid invisible frequency tagging (RIFT). Imaging Neuroscie... |
f2c89562fa47d9965f1b54471543c43997aad64675b1ba42183a7c57f0c11739 | MATLAB | 4,695 | 125 | % A test script for peak_det_acoustic to detect heart beats from a sample
% seismocardiogram record.
%
% This script demonstrates the use of the peak_det_acoustic function to
% process a seismocardiogram (SCG) signal for heart rate analysis. It
% includes loading a sample SCG signal, designing a custom bandpass filter
... |
d14258d39eef1909e8066d7b2fb0b8757ba7b766859bb2a962f7416545a1b9d5 | MATLAB | 4,701 | 143 | function [ output_args ] = plot_summary_dim_proj_over_ses(p, mean_proj_a, mean_proj_e, dim_vars_ses, dim_ves_ses, saveFigs,out_dir)
n_dims = 5;
lims = [-3 8];
cols = chooseColors;
rep_mean_a = squeeze(mean(cat(4,mean_proj_a{:}),4));
rep_mean_e = squeeze(mean(cat(4,mean_proj_e{:}),4));
rep_mea... |
42ffbf6b28ef9ce93eb0ad1077eaf7b4b75d3691a8169ac05cf5a09b090fa2d6 | MATLAB | 4,702 | 140 | % *************************************************************************
% * This code is the implementation of an example showing the effects *
% * of calculating phase and frequency in low-amplitude analytic signal, *
% * as represented in [2]. *
% * >>> Refer to... |
9ada059834480558b8f2246afe33414cd566772e2cd5c0de7535918750fec8f5 | MATLAB | 4,703 | 152 | function [A, vA, vB, bb_rel] = crop_borders(A, bcol, padding, crop_amounts)
%CROP_BORDERS Crop the borders of an image or stack of images
%
% [B, vA, vB, bb_rel] = crop_borders(A, bcol, [padding])
%
%IN:
% A - HxWxCxN stack of images.
% bcol - Cx1 background colour vector.
% padding - scalar indicating how much... |
1e74373d0b2feb105b71db38a9e13c5509c338f79dc58f4e0cef5cfcb68cbcd3 | MATLAB | 4,704 | 129 | function make_result(session, channel, unit)
% Make result
%
% Parameters
% ----------
% - session: scalar
% Session number with format: yymmdd
% - channel: scalar
% Channel number
% - unit: scalar
% Unit number
info = get_info();
results_folder = info... |
8720ad6b832677ecbfc7c5f572a0db66eedc669d0c58edd4ebbbbda513e4625b | MATLAB | 4,705 | 153 |
%{
----------------------------------------------------------------------------
Determine the time window for task relevant neurons
%Start of task
%Sound on
%Sound off
%Before choice
%After choice (0sec)
%After choice (1sec)
%After choice (2sec)
%p = 0.001
%Each epoch, predict the prior, sensory and choice... |
3944fd77792aa02d927006516fb38234a561ff6e649fa5d722b6e171b36ce3b6 | MATLAB | 4,706 | 129 | %% Full script with compartmental model and Serotonin Terminal Model.
close all;
clear all;
%% Parameters for computation
t_factor = 3600; % Time factor for graphs.
time = 15*24*t_factor/t_factor; % Time of simulation depending on t_factor.
sampling_rate = 1*t_factor; % number of samples per time factor units.
time_ar... |
e73d534dbc7ef3f1dfcc70fb42e7c7c7eb61d9c063509c43b10e0f7903d846ca | MATLAB | 4,712 | 114 | function [phase_avg, freq_avg, amp_avg, analytic_sig_avg] = phase_est(sig, fs, f0, bw_base, varargin)
%
% [phase_avg, freq_avg, amp_avg, analytic_sig_avg] = phase_est(sig, fs, f0, bw_base)
% [phase_avg, freq_avg, amp_avg, analytic_sig_avg] = phase_est(sig, fs, f0, bw_base, pertnum)
%
% *******************************... |
e7b941df7ade0d6087db8fa51f279c4e599f9dce0dff3d0c0445e2405309161f | MATLAB | 4,716 | 172 | %%
% AV/ERR/ITI/Rand
[cols,alpha] = chooseColors;
this_cols = {'k',cols(2,:),'m',[.7 .7 .7]};
%% plot mean speeds for AV/ERR and ITI/Rand
lims = [0 30];
figure('Position',[100 100 300 300])
hold on
% AV/ERR
plot(squeeze(mean(mean(av_trials,1),3))*0.06,'Color',this_cols{1},'LineWidth',2)
plot(squeeze(mean(mean(err_tri... |
e7fb23e9fd4965d2f9a2f1a2c3dcf8750dda177cae4356c695e865596fa431ac | MATLAB | 4,717 | 123 | function taggingsummary
%TAGGINGSUMMARY Latency, jitter and reliability of tagging.
% TAGGINGSUMMARY detects the peak activation after light stimulation and
% determines a window 3% from baseline for activation. Peak-latency,
% first-spike jitter and reliability (within this window) are calculated
% and ... |
8e9bd993a9faad2b3bb433660bb94f3e4965b15be9f18eb5434503ebd88e9981 | MATLAB | 4,718 | 157 | function [threshold, index, par, spikes, spk_pos] = detect_spikes(data, sr, par)
%DETECT_SPIKES Summary of this function goes here
% Detailed explanation goes here
%default config
init_date = now;
threshold = [];
index = [];
spikes = [];
spk_pos = logical([]);
seglen = par.segments_length*sr*60;
num_seg = ceil (len... |
d00a70eb63c260bedfdba69a7685ba36c6405876381b2ce3e19c2052ae2297fd | MATLAB | 4,721 | 157 | function [threshold, index, par, spikes, spk_pos] = detect_spikes(data, sr, par)
%DETECT_SPIKES Summary of this function goes here
% Detailed explanation goes here
%default config
init_date = now;
threshold = [];
index = [];
spikes = [];
spk_pos = logical([]);
seglen = par.segments_length*sr*60;
num_seg = ceil (len... |
13a9285fd5a86a1cad1bdb88fff462b1ba2533f9eaf158a40bd87bf9cd50c426 | MATLAB | 4,724 | 147 | clearvars
addpath ./Violinplot-Matlab-master/
load TFS_RESULTS_BETA.mat
load AEC_RESULTS.mat
load HMM_RESULTS.mat
load EVOKED_RESULTS.mat
results_dir = '.\Figs\';
if not(all(startsWith(hmm_results_kids.ID,AEC_results_kids.ID)) & ...
all(startsWith(hmm_results_kids.ID,TFS_results_kids.ID)) & ...
all(startsWit... |
7cd7b45eb70923f2c7e81a8e2a3ff7363923c9cb7aeff4f39487b7589629d992 | MATLAB | 4,726 | 114 | close all
clc
clear
% results = importdata('J:\ECGData\PTB\AllDataSmootherResultsPTB04_NaiveSweepGammaBased_PartialResults_Backup.txt');
% results = [zeros(size(results.data(:,1),1), 2) results.data(:,1:end)];
% results = load('J:\ECGData\Arrhythmia\AllDataSmootherResultsArrhythmia04_NaiveSweepGammaBased_Backup.txt');
... |
51fcfa0054277cb51f77238e0f19db6b494fb362a7a9fe718eebaab9e7025b2f | MATLAB | 4,730 | 144 | function save_path = convert(file_path_or_paths,varargin)
%
% adi.convert(*file_path,varargin)
%
% This function will save a .adicht file's contents into a .mat file
% (v7.3) or a hdf5 file
%
% The format is a bit awkward since it was originally written using a
% 32bit SDK which meant that partial reads and ... |
d5be6b4cc6d161ae47771c3e130cd131f617dbe3650a6baaa85297287f1a4737 | MATLAB | 4,733 | 121 | function cluster_runMultiEchoGRE_eachEcho(reconParsFile,iE)
load(reconParsFile)
run([RETROMOCOBOX_PATH '/addRetroMoCoBoxToPath.m']);
% run([MIRT_PATH '/setup.m']);
addpath(SPM_PATH);
% if nEco <= 10
% parpool(nEco); % this line fails on the cluster for some reason...!
% end
isPool = gcp('nocreate');
if isempty(i... |
d34e63d980218e24e67f553cf28052e6f09a0d0cae55edc52bbb1d5420718877 | MATLAB | 4,739 | 111 | %% This function generates arbitrary large field with lgn indexes, given a 3*3HC input
% Input: lambda_SOn_drive: LGNon input for all S cells. There should be
% three unique values
% temp: A template 1*N (same length of number of functions) that composes lambda_SOn_drive
% ... |
e63aa01add9a9caaec9b33e629b92c0a1c079d20b88272a9683bf21878efedfb | MATLAB | 4,741 | 153 | clearvars
close all
addpath(genpath('/storage/stella/MATLAB_toolboxes/')); % insert the path to NIFTI_studio toolbox
%% simple generating three tissue masks (CSF, GM, WM) integrating info from FIRST and FAST (using MNI priors for registration)
folder = pwd;
slice = 86; % just to visualize maps
% get structural mask ... |
69f7f3dab8c58deb5b632bb7325736bebd7a67c092e93b2b9800f0aea9c39923 | MATLAB | 4,743 | 118 | function [ output_args ] = prepareAnnotation(p)
% loads extraction results and starts cell checker
for sub = 1:p.nSubjects
tic
thisSub = p.subjects(sub);
%% load data
% load traces, filters
fpath = fullfile(p.rootDir,'miniscope',['subject' num2str(thisSub)],'jointExtrac... |
6e70d8fca8acbeefee5a7bb184c8a709c238aa0ce30a904d18fb4ca717772115 | MATLAB | 4,743 | 88 | %% NOTE: Add ambient, add synaptic failure, maybe change ref setup
function [oVE,oSpE,oGE_ampa_R,oGE_nmda_R,oGE_gaba_R,...
oGE_ampa_D,oGE_nmda_D,oGE_gaba_D,...
oVI,oSpI,oGI_ampa_R,oGI_nmda_R,oGI_gaba_R,...
oGI_ampa_D,oGI_nmda_D,oGI_gaba_D] = ...
V1NetworkUpdate_... |
2f8dcf6a168de4c808a9bccdcfc012e13a08d8053297db99b44262bc3b43c025 | MATLAB | 4,747 | 144 |
%{
----------------------------------------------------------------------------
First_take number of frames in each tif files
Analyzing imaging data simply
At least for the correct rate
----------------------------------------------------------------------------
%}
function Figure_e_Task_kaiseki_tokyo1_2022021... |
e9f69d337fcb88ba9515ef88164063d66ca6e43abb8aed150112c292334d5ba5 | MATLAB | 4,751 | 209 | function RaguDSPMap(map,ChanPos,mode,varargin)
% Copyright 2009-2011 Thomas Koenig
% distributed under the terms of the GNU AFFERO General Public License
h = gca;
pos = getpixelposition(h);
msize = max(pos(3:4)) / 1000;
%set(h,'XTickLabel',[],'YTickLabel',[],'FontSize',1);
switch mode
case 1
s = ceil(40... |
556d567e09d5b1421f341db3ce3674246a042e4020e60ad3553c0a0ff0e9aeaf | MATLAB | 4,752 | 109 | function spikeData = samplesToWindows(obj, spikeData)
%SAMPLESTOWINDOWS Get spatiotemporal windows around spiking events as 3D arrays
% returns spikesRaw nSamples x nSites x nSpikes
samplesRaw = spikeData.samplesRaw;
samplesFilt = spikeData.samplesFilt;
spikeTimes = spikeData.spikeTimes;
spike... |
8c150dec8f88489b837375f8b7ddbba95dfffb712f1eb53bc35dba622e846c8e | MATLAB | 4,755 | 96 | function P = PVD_CNN_Params()
%% Modes
% ******
P.Im2Im = 3;
%% Input, output and dataset
% **************************
P.Input_Size = [64,64]; % Pixels.
% P.Patch_Size = [32,32]; % Pixels.
P.Input_Half_Size = P.Input_Size ./ 2;
P.Full_Image_Margin = P.Input_Size(1); % Pixels.
P.Image_Format = '.tif';
... |
aebe1a86edb1a2fed4e45ab9047f3a617b4fb7620f2a6942c4503da58b860862 | MATLAB | 4,761 | 96 | function P = PVD_CNN_Params()
%% Modes
% ******
P.Im2Im = 3;
%% Input, output and dataset
% **************************
P.Input_Size = [64,64]; % Pixels.
% P.Patch_Size = [32,32]; % Pixels.
P.Input_Half_Size = P.Input_Size ./ 2;
P.Full_Image_Margin = P.Input_Size(1); % Pixels.
P.Image_Format = '.tif';
... |
bf69f503480b81f0fdba20fe2a8f996e4aa3a0ae6930b8aed87926ea8f819548 | MATLAB | 4,762 | 134 | %% Script to fit linear accumulated growing rate of activity for each raster
% Input
% Cell of Raster for each Condition
% Output
% M: vector of slope for each condition
% B: vector of y-intercept for each condition
% display summarize table
% example:
% >> [M,B]=slope_that_raster(R_Condition,varargin)
function [... |
5fd9c3a89f5bd32f1e14b2d80c7f2ba3789fe1df1cd100ff047ddad1bb5cb645 | MATLAB | 4,766 | 148 | clc
clear
close all
%%
WaitBarOpen = 1;
Sensors = 0;
%%
if(WaitBarOpen)
hWaitBar = waitbar(0,'Running CNN Simulation');
end
% pool = gcp;
%%
NumberOfFeature = 11;
NumberOfSamples = 1000;
Xsize = 144;
Ysize = 192;
% images_origin = uint8( zeros(Xsize,Ysize,3,NumberOfFeature*NumberOfSamples) );
% images = zeros(Xsi... |
bdb43b01391208a399a6bc4999fd0759d830b627e54b4c593123941d1d3f9f9c | MATLAB | 4,766 | 148 | clc
clear
close all
%%
WaitBarOpen = 1;
Sensors = 1;
%%
if(WaitBarOpen)
hWaitBar = waitbar(0,'Running CNN Simulation');
end
% pool = gcp;
%%
NumberOfFeature = 11;
NumberOfSamples = 1000;
Xsize = 144;
Ysize = 192;
% images_origin = uint8( zeros(Xsize,Ysize,3,NumberOfFeature*NumberOfSamples) );
% images = zeros(Xsi... |
0d57b8c94329814fe04ebb41dfd1b0a22635a659839531bdccfb56eb022a6654 | MATLAB | 4,769 | 105 | function [spec_res, update] = spectral_analysis(app)
%SPECTRAL_ANAL Summary of this function goes here
% Detailed explanation goes here
channel_idx = find(strcmp(app.popup_signal_spect.Value,app.popup_signal_spect.Items));
[data,ts,~, ~] = current_signal(app, channel_idx);
data(:,2) = ts(1):ts(1):ts(2);
spec_res = ... |
70e58f0ce6acf0d609aa2d71e5a047e8d7363ef2ccfaadb58f2c03a775e0914b | MATLAB | 4,770 | 154 | %% dendrogram using PN data
clear,clc
close all
load('89_PNs_array_data.mat')
fnames = {'hex10','hex','iaa','two_oct','hxa','two_hep','ani','hex01',...
'msal','lcar','euc','gua','chex','bza','ger','etha',...
'apin','one_oc3','neem','gar','cit','lin'};
odors = {'Hexanol 10%','Hexanol','IAA','2-octanol',... |
19c99ca4d852e9a0092edb8896beb0c6b134740a3e6ca0a3fb7fc13cc3a33563 | MATLAB | 4,772 | 148 | clc
clear
close all
%%
WaitBarOpen = 1;
Sensors = 0;
%%
if(WaitBarOpen)
hWaitBar = waitbar(0,'Running CNN Simulation');
end
% pool = gcp;
%%
NumberOfFeature = 6;
NumberOfSamples = 1000;
Xsize = 144;
Ysize = 192;
% images_origin = uint8( zeros(Xsize,Ysize,3,NumberOfFeature*NumberOfSamples) );
% images = zeros(Xsiz... |
74cd5661fbf16d79d579c68ea07124e7ecf24bb482b3f6778239fcb6162f51bb | MATLAB | 4,772 | 130 | function [fileNames,X,bid,initSz] = brainLoad(folder,mask)
% This function loads in all of the .nii or .nii.gz files within a folder,
% constraining the portion of the images being extracted to a mask if
% supplied. The way files are loaded is by first trying to use matlab's
% image processing toolbox (niftiread.m). If... |
7508d3c02d0efa576ad9f49b21d7815eea3c68583672aeb2759cd132f90f97e6 | MATLAB | 4,772 | 148 | clc
clear
close all
%%
WaitBarOpen = 1;
Sensors = 1;
%%
if(WaitBarOpen)
hWaitBar = waitbar(0,'Running CNN Simulation');
end
% pool = gcp;
%%
NumberOfFeature = 6;
NumberOfSamples = 1000;
Xsize = 144;
Ysize = 192;
% images_origin = uint8( zeros(Xsize,Ysize,3,NumberOfFeature*NumberOfSamples) );
% images = zeros(Xsiz... |
721aecb7857bb96623a0cd3cc7bab134de66ae80e9440afe4fee52864d6a4a00 | MATLAB | 4,773 | 140 | function SaveParameter20190531
global SpikeArray TotalTime qMaxFRratio qMinFRratio WaterOnArrayOriginal WaterOffArrayOriginal render...
TurnMarkerTime WaterOnPoint WaterOffPoint pksP1 locsP1 pksP2 locsP2 tfile fname dpath ADon CCresultDrinkOn CCresultRtouchWon CCresultLtouchWon...
MaxADon MaxA1Rt MaxA2Lt W... |
a87355851ae2f0af9249256d81cca506ac553c366fd844e9c6e2b04985511bb3 | MATLAB | 4,778 | 117 | classdef ncs_wc_reader < handle
properties
sr
max_segments
raw_filename
%channel
opened_file
recmin
recmax
num_scale_factor
TimeStamps
dt
end
methods
function obj = ncs_wc_reader(par, raw_filename)
obj.raw_filena... |
437bb69cf3cebecf6816f88fc69feb510d03f3b6c440044d03c993197c52d00e | MATLAB | 4,779 | 175 | function [rst, varargout] = ksdiscrete(pk, st, spikeflag)
%--------------------------------------------------------------------------
%
% ksdiscrete.m
% written by Rob Haslinger, December 2009
%
% This function performs time rescaling of ISIs based upon the discrete
% time version of the time rescaling theorem as des... |
4f4455f887313c8ba8f5c32c23e7df17a47d2fb67fa847dd6d5db4b37871459f | MATLAB | 4,781 | 146 | function result = neuralTraj(runIdx, dat, varargin)
%
% result = neuralTraj(runIdx, dat, ...)
%
% Prepares data and calls functions for extracting neural trajectories.
%
% INPUTS:
%
% runIdx - results files will be saved in mat_results/runXXX, where
% XXX is runIdx
% dat - structure whose nth... |
68252fb0a48e9644c149a53e4cc8338c56be0e048eedec63f5990a4d19ad2425 | MATLAB | 4,783 | 126 | function topo_fdr_thresholding(spm_mat_file, con_index, cluster_forming_thr, thresDesc, use_topo_fdr, force_activation, cluster_extent_p_fdr_thr, stat_filename, height_threshold_type, extent_threshold)
% write thresholded images on the disk folowing different methods
%
% FORMAT: topo_fdr_thresholding(spm_mat_file, con... |
9a1180f2493713b48bf7e72a9b445c513c955cefa1967126c6637809ec0c04d7 | MATLAB | 4,784 | 138 | function [y1,y2,Pbar,Phat,PSmoothed,Kgain] = KFNotch2(x,f0,fs,varargin)
%
% [y1,y2,Pbar,Phat,PSmoothed,Kgain] = KFNotch2(x,f0,fs,Qbar,Wlen),
% Removing Power-Line noise using a linear Kalman filter and smoother (modified according to the algorithm proposed in our KF Notch Filter paper)
%
% inputs:
% x: vector of ... |
e8a64a67b86bbcb9c574dba46a86e2623348cd5ac7b451a7b7e25a7e4863aab0 | MATLAB | 4,784 | 143 | % Copyright 2024 Eelke Spaak, Donders Institute.
% See https://github.com/Spaak/rift-phase-and-visibility for readme/license.
% Belongs with:
% Spaak, E., Bouwkamp, F. G., & de Lange, F. P. (2024). Perceptual foundation and extension
% to phase tagging for rapid invisible frequency tagging (RIFT). Imaging Neuroscience,... |
9cb35ac22159175d1cad167df7bb54f161d7187d6749645f05ab504f4e2a99a3 | MATLAB | 4,788 | 134 |
% PREPARE DATA TO PLOT NEURONAL ENSEMBLES
Experiment=Experiment(Experiment~='\'); % NAMES PATCH
%% Select Number of Analyzed Rasters ######
% NC = inputdlg('Enter Number of Analyzed Conditions:',...
% 'Conditions', [1 50]);
% NC= str2double(NC{:});
NC=numel(R_Condition);
TxtCnd{1,1}=['Experimental Condit... |
d0cda31aa2650efa0982527fa56f2b7ed6e72125e26d76c1f2151eccef708c09 | MATLAB | 4,788 | 107 | function [gammaSpikeRate,gammaSpikeStats] = computeSpikeGamma(data,fs,spikes,verbose)
% computeSpikeGamma computed the spike-gamma rates over all channels of a
% multichannel data using the spikes detected from the Janca detector [1].
% The spike-gamma code is implemented as described in [2,3].
%
% [gammaSpikeR... |
05ac024e8cf8f02baaf62210043dcb5762868532f02f8237ba35883fdcec2cb4 | MATLAB | 4,792 | 134 | function lick_psth_summary_allcond(cellids,resdir,issave)
%LICK_PSTH_SUMMARY_ALLCOND(CELLIDS, RESDIR, ISSAVE) Average lick PETH.
% ACH_LICK_PSTH_SUMMARY_ALLCOND plots average lick PETH (beam break time stamps
% aligned to an event) for all conditions of a probabilistic pavlovian
% condiitoning task (likely ... |
e4d6435fa6b93c3cda34ca769b7d865e08929546bbf4d550d21961ddabd9cbfa | MATLAB | 4,792 | 110 | clear;
close all;
clc;
% Daniel Sazhin
% ISTART Project (UGDG)
% DVS Lab
% 05/13/2022
% Temple University
% Edited by Jimmy for ISTART-socdoors 05/13/2022
% update 10/29/2022
% This code generates a composite reward sensitivity score using BAS and SR
% data. This code also generates a composite substan... |
98982a194afb3a98b9e4ad8fe4a1111d5d06df3f4173ad045eccb932932d109b | MATLAB | 4,793 | 141 | function NW1_Pattern_2_20201208
path=['C:\Users\C238\Desktop\touchcellLtRt_Hirokane'];
cd(path);
LS=ls;
LtNWFRUnit=[];
RtNWFRUnit=[];
LtNW1Point=0;
LtNW1Fire=0;
LtNW2Point=0;
LtNW2Fire=0;
LtNW3Point=0;
LtNW3Fire=0;
LtNW4Point=0;
LtNW4Fire=0;
LtNW5Point=0;
LtNW5Fire=0;
RtNW1Point=0;
RtNW1Fire=0;
RtNW... |
a1b1091fd90843749d631ed3959d6eabdae82fbf403a56c44d0f4d1ae21a296e | MATLAB | 4,794 | 141 | function NW1_Pattern_2_20200302
path=['C:\Users\C238\Desktop\touchcellLtRt_terashita'];
cd(path);
LS=ls;
LtNWFRUnit=[];
RtNWFRUnit=[];
LtNW1Point=0;
LtNW1Fire=0;
LtNW2Point=0;
LtNW2Fire=0;
LtNW3Point=0;
LtNW3Fire=0;
LtNW4Point=0;
LtNW4Fire=0;
LtNW5Point=0;
LtNW5Fire=0;
RtNW1Point=0;
RtNW1Fire=0;
RtN... |
d9a2ff26bfd481c92ff0d973b8185ad7f2c6d6204ad03597901fe65619173b5f | MATLAB | 4,795 | 119 | function AnalyzeResults15_14Class(Rdata, Rtextdata, outputfileame1, outputfileame2, ntrees)
% close all;
% % parameters
% % % % logfileame = 'SVMOptimizedParamters03.txt';
% outputfileame1 = 'Submission55.csv';
% outputfileame2 = 'Submission55_unbiased.csv';
% % % bins = [50 75 100 120 180 250 300 500 750];%75:6:81;%12... |
3d3729fbfb178cca2319af8ecc56cb47e896ebbd9551e09cb34a99bb82124b7c | MATLAB | 4,803 | 109 | function [ eval_accs ] = eval_ae_decoder_per_ses( p,av_trials_all,err_trials_all,trans_data_all,trans_data_err_all,q,trial_idx_ses,aa_sessions,n_tr,nullspace,n_rep,trans_data_all_dr,rand_control,tone_idx)
%%
for rep = 1:n_rep
%% create two versions of trial_idx_ses: one for training, one for testing
... |
0518087b12e7fde45d0a4310b680394f87532a25813bc2f73c9d9cbec3506c72 | MATLAB | 4,804 | 139 | clc
clear
close all
addpath(genpath(pwd))
%%
% This demo generates one chmm model observation, then compare our approximate inference with the exact inference
%C is the number of channels in CHMM
C = 5;
T = 2000; % T is the number of time samples
channel_num_states(1:C) = randi([2,6],1,C);
while(sum(channel_num_st... |
7437be1e354d881a486cd6a38b2c3e5c631de40b822586c69b8455f4e4befec2 | MATLAB | 4,806 | 123 | % Copyright 2024 Eelke Spaak, Donders Institute.
% See https://github.com/Spaak/rift-phase-and-visibility for readme/license.
% Belongs with:
% Spaak, E., Bouwkamp, F. G., & de Lange, F. P. (2024). Perceptual foundation and extension
% to phase tagging for rapid invisible frequency tagging (RIFT). Imaging Neuroscie... |
c553292025a1432ec0a6baed68d40de490e7c2bbe693bca2bd603a3dd615858b | MATLAB | 4,808 | 87 | %% NOTE: Add ambient, add synaptic failure, maybe change ref setup
function [oRefTimeE,oVE,oSpE,oGE_ampa_R,oGE_nmda_R,oGE_gaba_R,...
oGE_ampa_D,oGE_nmda_D,oGE_gaba_D,...
oRefTimeI,oVI,oSpI,oGI_ampa_R,oGI_nmda_R,oGI_gaba_R,...
oGI_ampa_D,oGI_nmda_D,oGI_... |
be2cf6b68314347f08da471448211129cb0d58183693b0e826381330cb1582d2 | MATLAB | 4,809 | 119 | function cluster_runMultiEchoGRE_eachCoil(reconParsFile,iC,bSaveAll)
%%% NB - this file hasn't yet been updated for retroMocoBox v1.0 syntax...!
if nargin < 3
bSaveAll = 0;
end
load(reconParsFile)
run([RETROMOCOBOX_PATH '/addRetroMoCoBoxToPath.m']);
% run([MIRT_PATH '/setup.m']);
addpath(SPM_PATH);
% if nEco <... |
015348146b9cc415523a948f98d0a6f018ae1869df9ae0e8b53ef9f2774b7828 | MATLAB | 4,811 | 148 | function this = read_freesurfer_file(filename)
% Low level reader of FreeSurfer file
% FORMAT this = read_freesurfer_file(filename)
% filename - FreeSurfer file
%
% Read ASCII triangle surface file and part of binary mgh file.
% See https://surfer.nmr.mgh.harvard.edu/fswiki/FileFormats
%______________________... |
32e662a9212119700473bdc8819725c80a1c9e98cbcee46765c3ed536b87fdba | MATLAB | 4,811 | 123 | classdef (Hidden) record < handle
%
% Class:
% adi.record
%
% Labchart Record
%
% A new record is created in a file whenever settings are changed, or
% whenever the users stops (then starts) a recording.
properties
id %record number (1 based)
n_t... |
ca750ff4429421469b72190748092f44befc6648367760d9cb89539b7eca2d8a | MATLAB | 4,811 | 118 | function [varargout] = etaSquared2_fast(inData1,inData2,varargin)
% -------------------------------------------------------------------------
% [eta2] = etaSquared(inData1,inData2);
% [eta2,eta2Idx] = etaSquared(inData1,inData2,'Distance','true','Smallest',10);
% --------------------------------------------------------... |
5ee9f501aad50534df1c82b04879098f733cf2cbac11698d5fcbb7518c514576 | MATLAB | 4,812 | 172 | function make_model(session, channel, unit)
% Make neural model
%
% Parameters
% ----------
% - session: scalar
% Session number with format: yymmdd
% - channel: scalar
% Channel number
% - unit: scalar
% Unit number
info = get_info();
times = in... |
d4764bf965bd88148299062d355e2b1f40c14b7eeaec6b0dd30d03eda7c7a9c5 | MATLAB | 4,813 | 113 | function [mean_amplitude, median_amplitude] = mean_median_ecg_amp(data, position, length_data)
% function [mean_amplitude, median_amplitude] = mean_median_ecg_amp(data, position, length_data)
% Extract features related to the ECG amplitude
%
% Inputs:
% data: ECG signal as a vector (in microvolts... |
51e4a36c8bcb625d4c5a56c0ac72770ac2eec25564c634c6ae88d7fb17c6ee1f | MATLAB | 4,828 | 98 | function [contourTable, contourArray] = getContourLineCoordinates(cm)
% Extracts coordinates from contour lines created by contour plots.
%
% contourTable = getContourLineCoordinates(cm) creates an nx4 table
% showing the contour level, contour group number, x, and y coordinates
% from the contour lines. cm is a 2xm m... |
a59954044e324e6fbee724a8b17a19d3f49d6383235c7c6a74dd5396f144c738 | MATLAB | 4,829 | 140 |
%{
----------------------------------------------------------------------------
Determine the time window for task relevant neurons
%Start of task
%Sound on
%Sound off
%Before choice
%After choice (0sec)
%After choice (1sec)
%After choice (2sec)
%p = 0.001
%Each epoch, predict the prior, sensory and choice... |
258c8e03dc01e1f3e70a3c8b3c39ab7d910905d31600173b73ea953a770e3448 | MATLAB | 4,830 | 144 | close all
clc
clear
results = importdata('J:\ECGData\PTB\AllDataSmootherResultsPTB06_ComparisonWithWavelet_Backup.txt'); fs = 1000;
% results = importdata('J:\ECGData\Arrhythmia\AllDataSmootherResultsArrhythmia06_ComparisonWithWavelet_Backup.txt'); fs = 360;
% results = importdata('J:\ECGData\Normal\AllDataSmootherResu... |
908c4fe2cf8f298574f78e0a55fd53a6c3081778434f0246771248cc35bcbab0 | MATLAB | 4,833 | 129 |
%{
----------------------------------------------------------------------------
Determine the time window for task relevant neurons
%Start of task
%Sound on
%Sound off
%Before choice
%After choice (0sec)
%After choice (1sec)
%After choice (2sec)
%p = 0.001
%Each epoch, predict the prior, sensory and choice... |
f24363f7c40fa7a4a74f30d86b50105e5757ba00adabdf427af9d69c0cbeb64c | MATLAB | 4,833 | 118 | %
% Test program for generating synthetic multichannel ECGs with beat-wise deviations and additive noise
%
% Open Source ECG Toolbox, version 2.0, April 2008
% Released under the GNU General Public License
% Copyright (C) 2008 Reza Sameni
% Sharif University of Technology, Tehran, Iran -- GIPSA-Lab, Grenoble, Fr... |
d24ca84347dee0336ee8e58471e94c57b2e61f7725af239b1f8688122239f509 | MATLAB | 4,838 | 152 | function [x_den, x_den_smoothed, s, alpha, bl] = common_mode_noise_canceller(x, fs, varargin)
%COMMON_MODE_NOISE_CANCELLER Estimates and removes common-mode noise from multichannel data
%
% [x_den, x_den_smoothed, s, alpha] = common_mode_noise_canceller(x, fs, varargin)
% estimates and removes common-mode noise fro... |
0c6ac85f3536892302455fd4788b4468abd355d62965b8b339a74aa9137daa10 | MATLAB | 4,840 | 239 | %% TODOs
%% create folders for all figs
p = params_2DAA;
% create folders for all figs
dir_paths = {p.out_dir};
for i = 1:7
dir_paths{length(dir_paths)+1} = fullfile(p.out_dir,['fig' num2str(i)]);
end
for i = 1:10
dir_paths{length(dir_paths)+1} = fullfile(p.out_dir,['figS' num2str(i)]);
end
for i = 1:length(d... |
d3edb1a22a333c031ad242d2315db4e7a48c346ea435023e24b7be4ff8d69228 | MATLAB | 4,840 | 156 | % plots the topographies of the liklihood of theta and alpha bursts for
% different windows around stimulus onset.
clear
clc
close all
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Parameters
CheckEyes = true; % check if person had eyes open or closed
Closest = false; % only use clo... |
c309842cd4bd8588eeac10b532d3c4f0cfc62afeb1e7a8e45dac0b4b7854c3f1 | MATLAB | 4,841 | 116 | % Copyright 2024 Eelke Spaak, Donders Institute.
% See https://github.com/Spaak/rift-phase-and-visibility for readme/license.
% Belongs with:
% Spaak, E., Bouwkamp, F. G., & de Lange, F. P. (2024). Perceptual foundation and extension
% to phase tagging for rapid invisible frequency tagging (RIFT). Imaging Neuroscie... |
1efb575cc2cd677412a602f6038ce87716da1ca2acd2d1573688c6c50d83dc21 | MATLAB | 4,844 | 140 |
%{
----------------------------------------------------------------------------
Determine the time window for task relevant neurons
%Start of task
%Sound on
%Sound off
%Before choice
%After choice (0sec)
%After choice (1sec)
%After choice (2sec)
%p = 0.001
%Each epoch, predict the prior, sensory and choice... |
a9c10f44950ce7950bea67e022685e458d282451a9dd4f20e2f79d91f40054e8 | MATLAB | 4,848 | 116 | function [AllAverage] = lick_boxplot(StageData, resdir, WhichStageUserInput,TrialType)
%LICK_BOXPLOT Compare the number of licks for the two cues of the Pavlovian task.
% LICK_BOXPLOT(STAGEDATA, RESDIR, WHICHSTAGEUSERINPUT, TRIALTYPE)Creates
% and saves boxplots to RESDIR, comparing the number of licks for two
... |
8a0188ca2c13a3a70a1e9ae86dd875c2c5334ddf55ce494bb47051419ed77dee | MATLAB | 4,849 | 145 | %% BOXPLOTS - FW in TISSUES HC vs MS
N1 = length(HCsubj);
N2 = length(MSsubj);
g2 = repmat({'GM-hc'},N1,1);
g3 = repmat({'WM-hc'},N1,1);
g5 = repmat({'GM-ms'},N2,1);
g6 = repmat({'WM-ms'},N2,1);
g7 = repmat({'NAWM-ms'},N2,1);
g8 = repmat({'T1L'},N2,1);
g9 = repmat({'T2L'},N2,1);
g10 = repmat({'periles'},N2,1);
x2... |
8c924b7085f01e4e34189489a662986107f7d043f325ba0d0b8ca65193a34110 | MATLAB | 4,851 | 98 | %% This gives an example of a multicriterial genetic algorithm which refits the ToR-ORd model to aim for
% APD 400 (greater than in control) and CaT amplitude of 2e-4 (200 nM),
% which is smaller than in control. This is of course just an artificial
% example with no particular meaning. If you're unfamiliar with this ... |
d66e5e64191284faa0ec13e10c9d2b76b5801d742c296742f46ef55846a99713 | MATLAB | 4,851 | 191 | % dtft_test.m
% test mex versions of DTFT by comparing to m-file versions
for1 = @(om, x) jf_mex('dtft,forward', om', x, int32(1));
adj1 = @(om, Xm, N) jf_mex('dtft,adjoint', om', Xm, int32(N), int32(1));
%
% 1d tests
%
if 1, printm '1d dtft for'
N1 = 32;
M = 10;
om = 2*pi*[0:(M-1)]'/M; % test with uniform frequen... |
07b692961d871a0ad763e88d7c1aa55a8b1ae6ae7b752c45ca04fa3443c627d3 | MATLAB | 4,853 | 152 | function fig4_dos(folder, save)
%% Figure 4: DOS as a function of threshold for different modes
% Subplots/information:
% - DOS matrices for different modes and thresholds (e.g. 3x4 matrices)
% - Sorted plots of DOS per node for all 20 thresholds
%% Load and normalize
if nargin == 0
folder = 'All';
end
load('stru... |
fbfabfec5e649e6bb68e6b6c1c91410f343d2648201c4cabe9df2d398b2181c0 | MATLAB | 4,853 | 144 | function convertFlatmapToSurface(inFile, templateFile, oName, fsPath)
% Converts a FreeSurfer flatmap to a surface file.
%
% This function converts a FreeSurfer flatmap patch (e.g., `lh.cortex.patch.flat`)
% into a FreeSurfer surface file (e.g., `lh.flat`). It adjusts the flatmap's
% vertex indices and coordinates to... |
f7f2b0a583b2db749caac443bc771b1affe5a3b33e47d5ea0783d1b2c41b3dca | MATLAB | 4,855 | 161 | function bootstrapIntan(obj, rhdFiles)
%BOOTSTRAPINTAN Summary of this function goes here
cfgData = struct();
for iFile = 1:numel(rhdFiles)
rawPath = jrclust.utils.absPath(rhdFiles{iFile});
if isempty(rawPath)
continue;
end
fileData(iFile) = jrclust.detect.Intan... |
3726071150b07d6d5b161c34e0cd2beed9dca68291ddabcb4904209fa15108b9 | MATLAB | 4,858 | 133 | function s = convert(tree,uid)
% XMLTREE/CONVERT Converter an XML tree in a structure
%
% tree - XMLTree object
% uid - uid of the root of the subtree, if provided.
% Default is root
% s - converted structure
%__________________________________________________________________________
%
%... |
755944b455a95f50962c3bfb39c164c82b3b71ca91e1321774e99b5d82174da5 | MATLAB | 4,858 | 173 | % applying ICA and Pi-CA after maternal ECG removal
clear;
close all;
load('FOETAL_ECG.dat'); data = FOETAL_ECG(:,2:end)'; time = FOETAL_ECG(:,1)'; clear FOETAL_ECG; fs = 250;
% load('data.txt');
% time = data(:,1)';
% data = data(:,2:end)';
% fs = 1000;
% data = data + 32768;
% data(data>32768) = data(d... |
9c63b80e2e065b6a6261e991e6ed67404842f5c05a3d7400746c52df49bbf462 | MATLAB | 4,858 | 119 | function hFigProj = plotFigProj(hFigProj, hClust, sitesToShow, selected, boundScale, channel_idx, doAutoscale)
%PLOTFIGPROJ Plot feature projection figure
if nargin < 7
doAutoscale = 1;
end
hCfg = hClust.hCfg;
hFigProj.clearPlot('foreground2'); % clear secondary cluster spikes
if strc... |
9eee606b212bbe36d3586a29512ac4bff87f6b8548c686ad99fcdf036dffccf1 | MATLAB | 4,862 | 100 | % Funtion that genera COlr of The Ensembles
% According to the number of ensembles and conditions
% Input
% TotalNG: Total Number of Ensembles
% NC: Number of Conditions
% NGroups: N ensembles in each Condition
% Ouput
% Colormap Matrix NC+1 x 3 RGB
function ColorState=colormapensembles(TotalNG... |
7ebce3323a7279a7ce465ab59c5b8af3573395d45f4ced15c2569fcc4eae998b | MATLAB | 4,864 | 136 | %% unit testing for spmup_despike
% uses medfilt1(x,3) from matlab on a small synthetic 4D set
% the comparison focuses on the median filter itself from which one derives
% the despiked data - but if the filter is bad so will be the despiked data
% outputs the percentage difference, look at what is different and by how... |
8894d7e9b27a883c45211a74d629d240eedd226063be47f235498236fb0659f1 | MATLAB | 4,872 | 156 | function sigInfo = wfdb_desc(headname)
%WFDB_DESC Read and parse a WFDB .hea header into a struct array.
%
% sigInfo = wfdb_desc('recordname')
%
% Fields produced per channel (mirroring your original intent):
% RecordName, channels, SamplingFrequency, LengthSamples, time, date, StartTime
% File, Format, Ga... |
0d75f194109303d8327370880ab13cec058428bc833f5ea182fdb8a9fd05b057 | MATLAB | 4,880 | 57 | %% pls for chromosome 17
clear
%% load up data used in UKB_GxE.m or UKB_GxE_cross_validation.m
load('D:\Canada_2020\UK_biobank\reports\AD\genetics\reports\crossval_inprogress.mat');
chr17snps={'rs117421612_G';'rs12603072_A';'rs12938775_G';'rs12946564_G';'rs2532261_A';'rs2532351_C';'rs2732702_T';'rs28364628_C';'rs333116... |
c6a73b665825a659195685fb1ec87f777eebe497ecdcd254f045175f863372b6 | MATLAB | 4,881 | 142 | function PV_R_L_J(cellids, resdir, spec, issave)
%PV_R_L_J(CELLIDS, RESDIR, SPEC, ISSAVE) Latency and jitter CDF of event evoked
%spiking.
% PV_R_L_J(CELLIDS,RESDIR, SPEC ISSAVE) calculates latency and jitter for
% event evoked spiking of neurons listed in CELLIDS. If CELLIDS is and
% empy cell, parvalbumin+... |
3405639c37f3d61f66e36a4fc7cc5ddf12ded42b27d8b40f0dc44becf9d6e513 | MATLAB | 4,886 | 152 | function [CI,p,sig,padj] = rst_pbH1rep(data1,data2,nboot,alpha,est,q,mu)
%PBH1REP - percentile bootstrap test to compare 2 dependent groups
% [CI,p,sig,padj] = pbH1rep(data1,data2,nboot,alpha,est,q,mu)
% 2 tailed bootstrap test based on the estimation of H1, the
% hypothesis of an experimental effect.
% The 2 groups m... |
e0d8a68d11c94c0ab9977d3df6704e7c6f750f2bcca50d78f93a13a81e61f5eb | MATLAB | 4,887 | 168 | %%datamatrix creation
numbercolturemax = str2num(cell2mat(inputdlg('how many coltures you have?', 'Max Colture Number')));
numbercolture = str2num(cell2mat(inputdlg('How many coltures do you want to analyze?', 'Colture Number')));
%max_c_tot = str2num(cell2mat(inputdlg('How many days do we follow coltures?', 'days'))... |
e0c23fc6a4741c66f14ea373e694b08cef15cccaa807d921fe60ded472b847fa | MATLAB | 4,891 | 110 | function save_trans_results(app)
[int_idxs,~] = listdlg('PromptString',{'Please select intervals ',...
'to be plotted/saved.',''},...
'SelectionMode','multiple','ListString',app.popup_int_spect.Items);
[form_idxs,~] = listdlg('PromptString',{'Please select fileformat ',...
''},...
'SelectionMode','mul... |
b57f327deb05360d49b0302787a16b66ce68b15efd00f79e9f8451377c3164cc | MATLAB | 4,892 | 125 | function [X,oid,mdl,pcao] = rmOutliers(X,varargin)
% load in defaults
options = struct('parallel',true,'rep',1,'repThresh',0.8,'prepro','none','pcaP',0.05,'pcaPermN',5000,'stnd',true,'nonconsec',true,'propOutliers',0.1,'outlierMethod','median','outlierDir','row','outlierThresh',3);
optionNames = fieldnames(options);
... |
bad3032feb980ac3c61f56722bafd9d490c16e434be9a69583bc76d92c98926a | MATLAB | 4,893 | 118 | function detect_split_cells(p)
% we detect split cells via temporal correlation and spatial proximity
% we do this after annotation and save the classification
% this is later used in the data organization step to exclude cells
%% load filters and traces and apply selection from annotation
for sub... |
d50d6bca142aa694a152a7457e07dc9b640beeb79336733f6141ea24afe7384a | MATLAB | 4,893 | 98 | function ePE = PE( x, delay, order, windowSize )
% @brief PE efficiently [UK13] computes values of permutation entropy [BKP02] in
% maximally overlapping sliding windows
%
% INPUT
% - x - considered time series
% - delay - delay between points in ordinal patterns (delay = 1 means successive points)
% - order -... |
1cacfb0cfd6827e539990be2ff899b0e23b11e8e70138c83755b9b1d19f4d6c3 | MATLAB | 4,895 | 110 | function [spec_res, update] = spectral_analysis(app)
%SPECTRAL_ANAL Summary of this function goes here
% Detailed explanation goes here
channel_idx = find(strcmp(app.popup_signal_spect.Value,app.popup_signal_spect.Items));
[data,ts,~, ~] = current_signal(app, channel_idx);
data(:,2) = ts(1):ts(1):ts(2);
spec_res = ... |
c2cb95b3ffebc3f68b3cf07e9417e90fb9a58b62290b50603b79127c0f1b00c1 | MATLAB | 4,895 | 159 | % sobi() - Second Order Blind Identification (SOBI) by joint diagonalization of
% correlation matrices. THIS CODE ASSUMES TEMPORALLY CORRELATED SIGNALS,
% and uses correlations across times in performing the signal separation.
% Thus, estimated time delayed covariance matrices must be nonsi... |
ae703f309fc3176c2e82de14907fe270b64692e2f1881c45059e52027cef5cad | MATLAB | 4,899 | 175 | %% To select the spatial regime of interest across the 10000 initial partitions
% This code find the most stable partitions (lower dissimilarity; VIn) for
% a given topological scale (number of communities). Takes the output in Run_MSCD_10000_par.m
% set path and directory
% ------------------------
options = {}... |
39d8b67776b016672af3fae9a9ffe8a6513411dbbbce6ed3517407d31fae7353 | MATLAB | 4,902 | 163 | function [y1,y2,Pbar,Phat,PSmoothed,Kgain, innovations] = KalmanSmoother(x,b,a,varargin)
%
% [y1,y2,Pbar,Phat,PSmoothed,Kgain, innovations] = KalmanSmoother(x,b,a,q,r,gamma,wlen,mode),
% Removing lowpass noise using a first order linear Kalman filter and smoother
%
% inputs:
% x: vector of noisy signals contaminated wi... |
3afc7495a779955de7ae6f1d3f7bccd3980cff8b1c68b6f0e747e57656eda251 | MATLAB | 4,908 | 158 | function [hdr,data]=read(filename)
machineformat='ieee-le';
ind=findstr(filename,'.');
if ~isempty(ind)
fileprefix=filename(1:ind-1);
else
fileprefix=filename;
end
if exist(strcat(fileprefix,'.hdr'),'file') & exist(strcat(fileprefix,'.img'),'file')
type=0;
hdr_filename=strcat(filepre... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.