sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
0b74cf3ba4999a20a225baae2acdfe296bb44b8c1af2cf57a0b5ba94422602fe
MATLAB
17,973
549
function MakeDemoRawVideo(moviename,varargin) defaults.fps = 20; defaults.compression = 'None'; allowedcompressions = {'Indeo3', 'Indeo5', 'Cinepak', 'MSVC', 'RLE', 'None','Uncompressed AVI','Motion JPEG AVI'}; useVideoWriter = exist('VideoWriter','file'); mencoderoptions = ''; mencoder_maxnframes = inf; [moviename,av...
8acbc3d2f97f9d01ad3f135ea803c1dd3f2ae4398463c8af0074bac5652acc46
MATLAB
17,997
621
clear clc % f = gcf; % exportgraphics(f,'Fig1_Original.png','Resolution',600) MotionData = load('MotionData.mat'); MusculoskeletalData = load('MusculoskeletalData.mat'); %% Motion Data MotionData = MotionData.MotionData; % Joint Angles SHLa = MotionData.GenericCat.Angles.AngShou.Total*(pi/180); ELBa = MotionData.Ge...
2d6083bd3cebe7bfe89520eb4105a96903b80b530e1980e794ae04198772c0a6
MATLAB
18,002
617
clear clc % f = gcf; % exportgraphics(f,'Fig1_Original.png','Resolution',600) MotionData = load('MotionData.mat'); MusculoskeletalData = load('MusculoskeletalData.mat'); %% Motion Data MotionData = MotionData.MotionData; % Joint Angles SHLa = MotionData.GenericCat.Angles.AngShou.Total*(pi/180); ELBa = MotionData.Ge...
7be6742294b60796bf1cf6106a41fc1c9cb8bd89e7a23201549fd80ed432ffce
MATLAB
18,002
617
clear clc % f = gcf; % exportgraphics(f,'Fig1_Original.png','Resolution',600) MotionData = load('MotionData.mat'); MusculoskeletalData = load('MusculoskeletalData.mat'); %% Motion Data MotionData = MotionData.MotionData; % Joint Angles SHLa = MotionData.GenericCat.Angles.AngShou.Total*(pi/180); ELBa = MotionData.Ge...
67c7fa7ca98c833352cce2f1fc76a19c02a06a539a326f31ed18fdedeb4f6c06
MATLAB
18,003
618
clear clc % f = gcf; % exportgraphics(f,'Fig1_Original.png','Resolution',600) MotionData = load('MotionData.mat'); MusculoskeletalData = load('MusculoskeletalData.mat'); %% Motion Data MotionData = MotionData.MotionData; % Joint Angles SHLa = MotionData.GenericCat.Angles.AngShou.Total*(pi/180); ELBa = MotionData.Ge...
eb58a225c4e722b6973b0f7270d3c200947b17c6f48146517648952c890917f0
MATLAB
18,005
617
clear clc % f = gcf; % exportgraphics(f,'Fig1_Original.png','Resolution',600) MotionData = load('MotionData.mat'); MusculoskeletalData = load('MusculoskeletalData.mat'); %% Motion Data MotionData = MotionData.MotionData; % Joint Angles SHLa = MotionData.GenericCat.Angles.AngShou.Total*(pi/180); ELBa = MotionData.Ge...
7a14b3bf9ca4a79dfc2b7c264729d4a4d1eb2c619d625e597c2b47f2b137ebd8
MATLAB
18,007
618
clear clc % f = gcf; % exportgraphics(f,'Fig1_Original.png','Resolution',600) MotionData = load('MotionData.mat'); MusculoskeletalData = load('MusculoskeletalData.mat'); %% Motion Data MotionData = MotionData.MotionData; % Joint Angles SHLa = MotionData.GenericCat.Angles.AngShou.Total*(pi/180); ELBa = MotionData.Ge...
d5313bd7dece1be0597b18e5657859d8ea37b783e958b820a3513af562adeb1a
MATLAB
18,011
619
clear clc % f = gcf; % exportgraphics(f,'Fig1_Original.png','Resolution',600) MotionData = load('MotionData.mat'); MusculoskeletalData = load('MusculoskeletalData.mat'); %% Motion Data MotionData = MotionData.MotionData; % Joint Angles SHLa = MotionData.GenericCat.Angles.AngShou.Total*(pi/180); ELBa = MotionData.Ge...
f3fbd7d8fc940f8adace46a086fb50b3191e7f6e01fc1f042adb663c3cf6f0d7
MATLAB
18,011
617
clear clc % f = gcf; % exportgraphics(f,'Fig1_Original.png','Resolution',600) MotionData = load('MotionData.mat'); MusculoskeletalData = load('MusculoskeletalData.mat'); %% Motion Data MotionData = MotionData.MotionData; % Joint Angles SHLa = MotionData.GenericCat.Angles.AngShou.Total*(pi/180); ELBa = MotionData.Ge...
2bf295ce5542b693ee39b6cc420cafcdb09b70785b79ed4850819dea5788a6f5
MATLAB
18,012
438
function bbLabeler( objTypes, imgDir, resDir ) % Bounding box or ellipse labeler for static images. % % Launch and click "?" icon for more info. % % USAGE % bbLabeler( [objTypes], [imgDir], [resDir] ) % % INPUTS % objTypes - [{'object'}] list of object types to annotate % imgDir - [pwd] directory with images % re...
58f6f32c64781bfa9a591cbe12d3846ac4bfa40c9149ba493fce00effcc78091
MATLAB
18,013
619
clear clc % f = gcf; % exportgraphics(f,'Fig1_Original.png','Resolution',600) MotionData = load('MotionData.mat'); MusculoskeletalData = load('MusculoskeletalData.mat'); %% Motion Data MotionData = MotionData.MotionData; % Joint Angles SHLa = MotionData.GenericCat.Angles.AngShou.Total*(pi/180); ELBa = MotionData.Ge...
f47213a470706ccfcf196815ce0ac4e4e4e45cd1aefef085908e59c8443385e7
MATLAB
18,013
618
clear clc % f = gcf; % exportgraphics(f,'Fig1_Original.png','Resolution',600) MotionData = load('MotionData.mat'); MusculoskeletalData = load('MusculoskeletalData.mat'); %% Motion Data MotionData = MotionData.MotionData; % Joint Angles SHLa = MotionData.GenericCat.Angles.AngShou.Total*(pi/180); ELBa = MotionData.Ge...
a9bedb3c08117a045f3e78c249fbc8eefde074e9e592f7c80fd606c7d621701e
MATLAB
18,014
620
clear clc % f = gcf; % exportgraphics(f,'Fig1_Original.png','Resolution',600) MotionData = load('MotionData.mat'); MusculoskeletalData = load('MusculoskeletalData.mat'); %% Motion Data MotionData = MotionData.MotionData; % Joint Angles SHLa = MotionData.GenericCat.Angles.AngShou.Total*(pi/180); ELBa = MotionData.Ge...
f4fd963a5cebb35e0b2227593792a6eb436f90e4194e10c13329e03cace03096
MATLAB
18,015
621
clear clc % f = gcf; % exportgraphics(f,'Fig1_Original.png','Resolution',600) MotionData = load('MotionData.mat'); MusculoskeletalData = load('MusculoskeletalData.mat'); %% Motion Data MotionData = MotionData.MotionData; % Joint Angles SHLa = MotionData.GenericCat.Angles.AngShou.Total*(pi/180); ELBa = MotionData.Ge...
3f609425b33b1aa9fe71af13485ce0afae831ff8d46d3636c87225f781146aed
MATLAB
18,022
615
clear clc % f = gcf; % exportgraphics(f,'Fig1_Original.png','Resolution',600) MotionData = load('MotionData.mat'); MusculoskeletalData = load('MusculoskeletalData.mat'); %% Motion Data MotionData = MotionData.MotionData; % Joint Angles SHLa = MotionData.GenericCat.Angles.AngShou.Total*(pi/180); ELBa = MotionData.Ge...
ac2937c1b1a42c57f7414534753881c6cbcd96b1618a4e5bd240e8d013b3af1c
MATLAB
18,023
616
clear clc % f = gcf; % exportgraphics(f,'Fig1_Original.png','Resolution',600) MotionData = load('MotionData.mat'); MusculoskeletalData = load('MusculoskeletalData.mat'); %% Motion Data MotionData = MotionData.MotionData; % Joint Angles SHLa = MotionData.GenericCat.Angles.AngShou.Total*(pi/180); ELBa = MotionData.Ge...
ac8303977756d4c60d798f0d90ee8287d844655abf1778bb237b56bb4d559524
MATLAB
18,025
618
clear clc % f = gcf; % exportgraphics(f,'Fig1_Original.png','Resolution',600) MotionData = load('MotionData.mat'); MusculoskeletalData = load('MusculoskeletalData.mat'); %% Motion Data MotionData = MotionData.MotionData; % Joint Angles SHLa = MotionData.GenericCat.Angles.AngShou.Total*(pi/180); ELBa = MotionData.Ge...
ad0ebe130a85189299c9ba4e36618561130649368504b96318bd1336bf9d0cbb
MATLAB
18,025
618
clear clc % f = gcf; % exportgraphics(f,'Fig1_Original.png','Resolution',600) MotionData = load('MotionData.mat'); MusculoskeletalData = load('MusculoskeletalData.mat'); %% Motion Data MotionData = MotionData.MotionData; % Joint Angles SHLa = MotionData.GenericCat.Angles.AngShou.Total*(pi/180); ELBa = MotionData.Ge...
b3103197ef9251dad2b43da68129dc96d9fcc650ec1efeb76aa445d492e0a3ca
MATLAB
18,026
554
% freq_inter_band.m % v 0.0.2b fix % Estudios interbandas % Experimental % %----------------------------------------------------------------------------------- %----------------------------------------------------------------------------------- % % LAN = freq_inter_band(LAN) % parametros definidos en estructura ...
68cf7ce0e223f6021c58c717854109fadb2d173b272621847792866c2e6fb5f8
MATLAB
18,042
458
function [ record ] = saveTableDatasource( path, saveName, dataSource, omitHeavyCoordinates,... omitHeavyLGs, waitbarhandle, headpr) % Don't directly use this function. Use dspace_data.saveCollection instead. % % % Note: In many Matlab version file sizes are limited to 2gb or saving % ...
e6380fe641a921b3b6b7279676218e1fbbe45044e236da0d496ca864e0c17772
MATLAB
18,081
430
function hh = rotateXLabels( ax, angle, varargin ) %rotateXLabels: rotate any xticklabels % % hh = rotateXLabels(ax,angle) rotates all XLabels on axes AX by an angle % ANGLE (in degrees). Handles to the resulting text objects are returned % in HH. % % hh = rotateXLabels(ax,angle,param,value,...) also allows one...
7e8e4243d01a82b34de639fc62640122c4e14745b1a7e08ac169c66a3593f438
MATLAB
18,089
492
function [settings, button] = settingsdlg(varargin) % SETTINGSDLG Default dialog to produce a settings-structure % % settings = SETTINGSDLG('fieldname', default_value, ...) creates a modal % dialog box that returns a structure formed according to user input. The % input should be given in the form of 'field...
0cb26f05a53bad9f16f3e91a09ca428a451bc993e41536785cad9fd35101c84a
MATLAB
18,093
313
%% File Lists and Locations home='/Users/meaghanperdue/data_acg'; QC_csv_name = 'SE_PRESS_QC_Metrics_acg.csv'; tissue_csv_name = 'Tissue_CSV_Name_acg.csv'; MRS={ 'PS10001_PS14_006_2058/PS10001_PS14_006_2058_P39936.7' 'PS10006_PS14_053_2563/PS10006_PS14_053_2563_P17408.7' 'PS10007_PS14_054_2562/PS10007_PS14_054_2562_P...
5eee6922f2a72d24e2fd0c7de6ca6fb8e12c61916d23c25152550433881a28fa
MATLAB
18,104
405
function [map,num,typ] = brewermap(N,scheme) % The complete selection of ColorBrewer colorschemes (RGB colormaps). % % (c) 2014 Stephen Cobeldick % % ### Function ### % % Returns any RGB colormap from the ColorBrewer colorschemes, especially % intended for mapping and plots with attractive, distinguishable colo...
51c3cee595cba7f3d3b04c4aa183debd27e222c8ca81e5e96f5ee32a4f7468f9
MATLAB
18,115
567
function data = ft_denoise_pca(cfg, varargin) % FT_DENOISE_PCA performs a principal component analysis (PCA) on specified reference % channels and subtracts the projection of the data of interest onto this orthogonal % basis from the data of interest. This is the algorithm which is applied by 4D to % compute noise can...
8cb44877472198db63f95e3bd2034a19d9077b1321d691e80658667f6d92e7a7
MATLAB
18,124
601
function tfrqview(tfr,sig,t,method,p1,p2,p3,p4,p5); %TFRQVIEW Quick visualization of time-frequency representations. % TFRQVIEW(TFR,SIG,T,METHOD,P1,P2,P3,P4,P5) allows a quick % visualization of a time-frequency representation. % % TFR : time-frequency representation (MxN). % SIG : sign...
f0bd61f34eb4fa9d40c98186dcf56c1f8e746dea60a3b680425a13077e1e8e02
MATLAB
18,140
524
function [h, T2] = ft_plot_slice(dat, varargin) % FT_PLOT_SLICE plots a 2-D cut through a 3-D volume and interpolates if needed % % Use as % ft_plot_slice(dat, ...) % or % ft_plot_slice(dat, mask, ...) % where dat and mask are equal-sized 3-D arrays. % % Additional options should be specified in key-value pairs an...
c344eafe7bee8a8f35c962338f9911db25e14c02f8d37b0ae28ccba5c911f931
MATLAB
18,164
452
function [dat] = read_edf(filename, hdr, begsample, endsample, chanindx) % READ_EDF reads specified samples from an EDF datafile. It neglects all trial or % data block boundaries as if the data was acquired in non-continous mode. % % Note that since FieldTrip only accommodates a single sampling rate in a given % datas...
b26ab368a5e4cdd7ade223607285ec5fc684f9667ad29da68580de5f9fe211e4
MATLAB
18,175
521
function [data] = ft_math(cfg, varargin) % FT_MATH performs mathematical operations on FieldTrip data structures, % such as addition, subtraction, division, etc. % % Use as % data = ft_math(cfg, data1, data2, ...) % with one or multiple FieldTrip data structures as the input and the configuration % structure cfg in ...
a88b5197eb62d97c46920ae268c8b02486f2dc16e10db54b880643b43866ac7c
MATLAB
18,181
706
function [mask Header_Out] = w_Automask(Data, OutputFile, Verb) % function [mask Header_Out] = w_Automask(Data, OutputFile, Verb) % Input: % Data - Could be the following format: % 1. A single file (.img/hdr, .nii, or .nii.gz), give the path and filename. % 2. A directory, under which...
7727bb9a3135f0fe46bfce7d9d3a6ccb1dc813bc40ab025c30e7eb25b4f065af
MATLAB
18,191
489
function replaytrajectory = decode_events(modelParam, animalprefix, savedir, savedata, varargin) % Adapted from code for Shin et al., 2019, Jadhav Lab % Previous function name was preplay_decoding_CA1_singleday.m % Original function name from Wenbo was replay_decoding_CA1_singleday.m % % INPUTS: % animalprefix = ani...
184e4a64e6b31448ff6198303dc256939aed8e0093290f9e62ae4394f71f5d65
MATLAB
18,224
433
function mri = ctf_read_mri(file) % ctf_read_mri - read a CTF .mri file % % mri = ctf_read_mri(fileName) % % The CTF MRI File format used by MRIViewer consists of a binary file with % a 1,028 byte header. The MRI data can be in 8-bit (unsigned character) or % 16-bit (unsigned short integer) format and consists of 256 ...
da9159a3588d484a951426776c75543d0766f58ae059022dc2801698e7f248c9
MATLAB
18,230
449
% Author: Milena Capiglioni, University of Bern % Contact: milena.capiglioni@extern.insel.ch % Last update: Nov.2023 % If you use/modify this code for your future publication, please cite the % corresponding article: "Stimulus-Induced Rotary Saturation imaging of %visually evoked neuroelectric response: preliminary r...
125304f621dee955dcb17b68d86e1b9e5a67444302b67a76787a8541b6a218c4
MATLAB
18,238
463
classdef (Abstract) SurpassObjectReader < matlab.mixin.SetGet & dynamicprops % SurpassObjectReader Surpass object reader base class % % © 2015–2016, Peter Beemiller (pbeemiller@gmail.com) % % See also CellsReader | FilamentsReader | SpotsReader | SurfacesReader properties (SetAcc...
74be17a3b37408d49419dd711241feca0d06c4efc97ff4c79657acdfb6068f39
MATLAB
18,257
567
function data = ft_denoise_pca(cfg, varargin) % FT_DENOISE_PCA performs a principal component analysis (PCA) on specified reference % channels and subtracts the projection of the data of interest onto this orthogonal % basis from the data of interest. This is the algorithm which is applied by 4D to % compute noise can...
8d5d2c8dd47c0b9a153f9b48f176fd1f595f6260e862949ab806f346aaf98601
MATLAB
18,263
417
function [Yc,Ye,Ya,clscor] = boney_segment_refineSPM(Yo,Ym,Yc,Ya,Ybraindist0,tis,tismri,refine) % == REFINE SPM DATA == % * Create meninges class? % - This is not realy working cause the intensities are changing too much. % Hence, it is better to evaluate the whole mid structure. % - Would thresholding by thi...
8bc662b63bc1efcfb02256e88acb5957dc0c2211ccfbb5fc329897eee058f0f1
MATLAB
18,282
384
function [] = Twave_personalisation_POMs_ToRORd_IKs_IKr_not_converged(nb_models, celltype, stimAmp, stimulus_function_str, result_dir) % Population of models generation for T-wave personalisation % Adapted from scriptDemonstration_2_ParameterComparison.m: %% Setting parameters param_baseline.bcl...
ffb12f25ab8b926a491be51498c31ca050ddc87560dd429f74f27673c609b93e
MATLAB
18,285
526
function data = ft_math(cfg, varargin) % FT_MATH performs mathematical operations on FieldTrip data structures, % such as addition, subtraction, division, etc. % % Use as % data = ft_math(cfg, data1, data2, ...) % with one or multiple FieldTrip data structures as the input and the configuration % structure cfg in wh...
25f5a12220d2376cc13fcee779ff88d85a298bb9de3ebb4c2eb4b1cae4aa89d8
MATLAB
18,297
489
% Address the basic question, when x is the salient category, what % percentage of units are tuned to x. function SlidingTimeDPrimeMotorVersion(config,varargin) [varargin,DateName] = Utilities.ProcVarargin(varargin,'DateName',[]); [varargin,Pmethod] = Utilities.ProcVarargin(varargin,'Pmethod','fdr'); [va...
cb3b2fb8f08f4cee410e6d93bd57eff622ce72c1a1d4493befdedb090b0f1967
MATLAB
18,302
656
% paper_figures_2019.m %% setup gd = '/Users/rachel/Google Drive'; % gd = '/Local/Users/denison/Google Drive'; dataDir = sprintf('%s/NYU/Projects/Temporal_Attention/Code/Expt_Scripts/Behav/data', gd); fitDir = sprintf('%s/NYU/Projects/Temporal_Attention/Code/Models/TA_Model/fit/startpoints', gd); mrDir = sprintf('%s/...
93da9341afaa1649d29d1eb394d22a8a7e8677420aa1b67efae30b5aa1b4ced1
MATLAB
18,338
537
function parcel = ft_sourceparcellate(cfg, source, parcellation) % FT_SOURCEPARCELLATE combines the source-reconstruction parameters over the parcels, for % example by averaging all the values in the anatomically or functionally labeled parcel. % % Use as % output = ft_sourceparcellate(cfg, source, parcellation) % ...
ca1644f7b071dcc1efedbde27c2bae6596d3621348de6b1fa59de7a7bc07ad26
MATLAB
18,358
422
function loc_list_plot(data) if isempty(data)~=1 fig = figure(); set(gcf,'name','Localizations List (2D)','NumberTitle','off','color',[0.1 0.1 0.1],'units','normalized','position',[0.3 0.15 0.4 0.7],'menubar','none','toolbar','figure'); defaultToolbar = findall(fig,'Type','uitoolbar'); a = ...
7d74d4cb31da0c3dfbb7c76689e2cf9b56a737e0cb4dc6eab95d1244e5438fbe
MATLAB
18,371
472
function ft_volumewrite(cfg, volume) % FT_VOLUMEWRITE exports anatomical or functional volume data to a Analyze % or BrainVoyager file. The data in the resulting file(s) can be % further analyzed and/or visualized in MRIcro, SPM, BrainVoyager, % AFNI or similar packages. % % Use as % ft_volumewrite(cfg, volume) % wh...
d97d51009bb57ee46a8bd8cd2202e16bada6326e8af0d9656c71cab60e57d6b5
MATLAB
18,379
329
function y_T1ImgDefacer(AutoDataProcessParameter) % FORMAT y_T1ImgDefacer(AutoDataProcessParameter) % Input: % AutoDataProcessParameter - the parameters for auto data processing % AutoDataProcessParameter.DataProcessDir='/home/data/YCG_AllData/YAN_Work/Monkey/Analysis/Cebus/CP1F/T1CoregAverage'; % AutoData...
2ca1ba980554f02daf53b1af72a511d0bec6748d7734d749f0c045a370b1cc6f
MATLAB
18,382
278
function spindle_calculation_default() %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Calculate spindle data summary (from .csv format output) % % Info: Opens csv output from 'detect_spindles' pipeline and computes % summary stats. % % Download: https://github.co...
05902234b5a5300a2be738f83c53b641be16086b584bcf7a3fd1b41e7eed5fed
MATLAB
18,385
472
function ft_volumewrite(cfg, volume) % FT_VOLUMEWRITE exports anatomical or functional volume data to a Analyze % or BrainVoyager file. The data in the resulting file(s) can be % further analyzed and/or visualized in MRIcro, SPM, BrainVoyager, % AFNI or similar packages. % % Use as % ft_volumewrite(cfg, volume) % wh...
0d94a412b9909d97dced2a062d511113ad4117532fa71bbc5193a825023a0642
MATLAB
18,411
501
function [SleepScoreLFP,PickChannelStats] = PickSWTHChannel(basePath,scoretime,SWWeightsName,... Notch60Hz,NotchUnder3Hz,NotchHVS,NotchTheta,SWChannels,ThetaChannels,... rejectchannels,OVERWRITE,varargin) %UNTITLED Summary of this function goes here % Detailed explanation goes here % Optional % 'noPromp...
d7bbb7a18f55ebd74123a4cd2ce7f19db806757378a20c1ab99632c72a65e6c6
MATLAB
18,432
543
function [cfg] = ft_movieplotTFR(cfg, data) % FT_MOVIEPLOTTFR makes a movie of the time-frequency representation of power or % coherence. % % Use as % ft_movieplotTFR(cfg, data) % where the input data comes from FT_FREQANALYSIS or FT_FREQDESCRIPTIVES and the % configuration is a structure that can contain % cfg.pa...
e5dd2a2155f7ca1df86beac40a998f930d164c12e73a033527ca3c7923aec21f
MATLAB
18,443
403
classdef SpectrogramPanel < TimelinePanel properties audio % The frequency range is shared by all panels and is stored in the second half of obj.controller.displayRange. % The FFT window shared by all panels and is stored in obj.controller.windowSize. saturation = [0.01 0.99] ...
512a5334b6b6d87297c572f4eb8ab6ac7424893c60bb2fb7533aaac5df042832
MATLAB
18,458
711
function RT = rt_read(cfg,LAN) % v.2 % <*LAN)<| % Read event file for reaction time analysis and modeling % % RT = rt_read(cfg) % % :: file or variable name where the data are. % cfg.filename = 'nombredearchivo.log' % % :: Format % cfg.type = 'presentation' --> .log % ...
187d09686fae845ae3c747c4c94b2d6a0c37b92a8e2f2e8c4d59e0ed05315fc7
MATLAB
18,462
562
function errorbarjitter(data,h,varargin) % SYNTAX % % errorbarjitter(data) % errorbarjitter(data,h,param1,val1,param2,val2,...) % % e.g. % errorbarjitter(data,1,'barends','yes','colors',color_array) % % % Plots mean (or median)±SD plus jitter plot of raw data % Columns are categories, rows are individual sampl...
d645c118b1df5cffc20bf5ff485a32f9725ebccdcee17ae53762cd90247d2e08
MATLAB
18,462
399
function grpData = h_plotGroupFcn3(handles) % global FV_img [currentInd, handles, currentStruct, currentStructName] = h_getCurrendInd3(handles); fig = findobj('Tag','h_imstack3Plot','Selected','on'); if isempty(fig) fig = figure('Tag','h_imstack3Plot','ButtonDownFcn','h_selectCurrentPlot3','Selected','on...
8db8b6fb726562be235bbd7e16c9516589af6f445d5c2815b1ad03b50975a5e3
MATLAB
18,483
503
function [varargout] = ft_plot_vector(varargin) % FT_PLOT_VECTOR visualizes a vector as a line, similar to PLOT. % % Use as % ft_plot_vector(Y, ...) % or as % ft_plot_vector(X, Y, ...) % where X and Y are similar as the input to the MATLAB plot function. % % Optional arguments should come in key-value pairs and ca...
ec107bca5d565deedb8cdeabe3fb49254bc7dce311b731c8922f4a81da60de49
MATLAB
18,484
541
% calib_stereo % Script for Calibrating a stereo rig (two cameras, internal and external calibration): % % It is assumed that the two cameras (left and right) have been calibrated with the pattern at the same 3D locations, and the same points % on the pattern (select the same grid points). Therefore, in particular, the...
2e7bf652ae2bd993c20e7d9a0aa193ed975476b11a9f7b569ef6e636021507ff
MATLAB
18,496
529
function data_view_update(input) global time global play global data global t global FIG global GUI_handle global replay_index; global parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% if strcmp(input,'load') %load data parameters=list_of_parameters; replay_index=[]; GUI_handle=gcbf; FIG=figure; if exist...
55fb1103ed6b67a5aec011b37252911c956a812532c3e00114ecacef02bade8d
MATLAB
18,519
307
% TSCOMBINEOVER Combine Time Stamped Data one level up the heirarchy. % TSCOMBINEOVER(STATNAME,USESTAT, MODEFLAGS) creates a stat called % STATNAME that is the collection of USESTAT (appended end to end) and % stored a level up in the Experiment hierarchy. Statname represents the % name for the new stat and U...
8f96b381b825470f3a4549053db0b1e82064cd8e0bf45658a447d827b1475f95
MATLAB
18,528
459
function [dat] = read_edf(filename, hdr, begsample, endsample, chanindx) % READ_EDF reads specified samples from an EDF datafile. It neglects all trial or % data block boundaries as if the data was acquired in non-continuous mode. % % Note that since FieldTrip only accommodates a single sampling rate in a given % data...
7e65a7be3d597cabe0a141a62ae7f4b513b36e507bcca61473e8c136b3c93773
MATLAB
18,533
366
% TSAPPLYSTAT Apply a function to a statistic or statistics to % generate another statistic or statistics or to make a graph % % Syntax ER = TSAPPLYSTAT(NEWSTAT,USESTATS,FUN,arg1,arg2,etc) % NEWSTAT is a string or cell array of strings; USESTATS is likewise a % string or cell array of strings; FUN is a function to b...
16791b5716c2e43a6b44332890232aea5f379c08a42bc22ce86b3b965825e7a9
MATLAB
18,537
405
function [expanded_matrix, comparison_type_matrix_time, comparison_type_matrix_session, comparison_type_matrix_decay, comparison_type_matrix_time_from_onset_firstday, comparison_type_matrix_time_from_onset_secondday] = ... scale_time_course_matricies(input_matrix, all_imaging_days, included_days, latest_date, rept...
e4a007abdcc820d6e6011b349e2e6ea0513477968a38a45553cb6d938719ee95
MATLAB
18,548
601
% adjusted_ADJUST() - Automatic EEG artifact Detector optimized for % pediatric data % % Usage: % >> [art, horiz, vert, blink, disc,... % soglia_DV, diff_var, soglia_K, med2_K, meanK, soglia_SED, med2_SED, SED, soglia_SAD, med2_SAD, SAD, ... % soglia_GDSF, med2_GDSF, GDSF, soglia_V, med2_V, nuovaV, s...
698d8770b4980274f9f40bec20962dd55bd5cf5f32d192ec6b25ce4ecf89b3cc
MATLAB
18,553
413
function grpData = h_frameAnalysisGrpPlot3(handles) [currentInd, handles, currentStruct, currentStructName] = h_getCurrendInd3(handles); fig = findobj('Tag','h_imstack3Plot','Selected','on'); if isempty(fig) fig = figure('Tag','h_imstack3Plot','ButtonDownFcn','h_selectCurrentPlot3','Selected','on'); end f...
723b8e014a0bbf9d48815dda7b94f2c8c9dd77299ba8b4d57b634b3e38b83891
MATLAB
18,586
541
classdef LabelCoreTemplateController < LabelCoreController % Template-based labeling controller % % Owns all graphics for template labeling mode. Receives GUI callbacks, % extracts GUI state (mouse position, modifiers), delegates data logic % to LabelCoreTemplateModel, and syncs graphics in response to model events. % ...
50994d25205f1ecfc03170797fbe9d495459b4c3fcfbede08660fded07fb709b
MATLAB
18,602
546
function [outim] = ft_sliceinterp(cfg, ininterp) % FT_SLICEINTERP plots a 2D-montage of source reconstruction and anatomical MRI % after these have been interpolated onto the same grid. % % Use as % ft_sliceinterp(cfg, interp) % or % [rgbimage] = ft_sliceinterp(cfg, interp), rgbimage is the monatage image % %...
aa2e93267aecf326e89372e1b296037cebc136c0863a4eb3a661e1b30ae6d706
MATLAB
18,618
586
%load data: contact lead author %% allIdx=unique([aoCellIdx;vsCellIdx;aoRewardIdx;vsRewardIdx]); otherIdx=setdiff([1:1:size(dfofUse,1)],allIdx); otherIdx=[otherIdx intersect([aoCellIdx;aoRewardIdx],[vsCellIdx;vsRewardIdx])']; save('otherIdx.mat','otherIdx') dfofOther=dfofUse(otherIdx,:); dfofFOther=fieldDistri...
e145e2181658ba068d654a84acd626b9fa740819f8bb3a4369ee4e40843b8544
MATLAB
18,629
481
classdef MetaPath < apt.ShellToken % apt.MetaPath - Locale and role-aware path representation for multi-context execution % % This class extends apt.Path with additional metadata required for APT's % multi-backend execution environment. It tracks both the execution locale % (where the path will be used) and t...
c7a19928d810f506da4e4873ab2241a6d3fc93c0b77a5e6106edfc3cf7f4a400
MATLAB
18,635
618
%go_calib_optim_iter_fisheye % %Main calibration function. Computes the intrinsic and extrinsic parameters. %for fisheye cameras. %Runs as a script. % %INPUT: x_1,x_2,x_3,...: Feature locations on the images % X_1,X_2,X_3,...: Corresponding grid coordinates % %OUTPUT: fc: Camera focal length % cc: Principa...
a23f46a52769a25a27b396bca79ac0fdb31ed73f1136fc2b23b7be33d5a9808c
MATLAB
18,640
633
% load data % contact Lead Author for data % SPATIAL SELECTIVITY ANALYSIS in common vs unique populations % 1 - number of fields % 2 - width of fields % 3 - infield-nonInField %% width and number of fields % % for avr1-vvr1 % useData = allFields_1; mice = 1:31; % 4-19 / 1-31; % trackLen = 2...
88768a86c11eea6ea6d7d1b13954c257b187acde39a002cb61202baa38123164
MATLAB
18,673
383
classdef Introduction_to_Dataspace % Dataspace (short: dspace) is a set of data structures, analysis functions and % a graphical user interface intended to facilitate data analysis in various % fields of science. % % Dataspace is build with practical application in mind - to be % as ...
9f35560137593beaf4a1d5b1d014b0373948dbadbe1bd1684ed5a7e8a11c3f2e
MATLAB
18,689
430
% Parse params.json and set default values if not specified % % Cristina Gil, TUM, 01.02.2024 function params = define_params(fname) %% Read json file with all the parameters if isempty(fname) fname = 'params_example.json'; end fid = fopen(fname); raw = fread(fid,inf); str = char(raw'); fclose(fid); params = jsond...
4935c023019e4cea2d2b00d3475957ddf9881f0c94fa5a9270821f7cf706a682
MATLAB
18,693
218
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Script to perform batch tissue correction on LCM .csv files % Script is designed to analyze LCM .csv files saved in participant folders in a % larger study directory (example on line below) with the ID of the csv % folder matching that of ...
e48e99d13c352002dcb28fd168ef955ce8fa4e29b1b8ac8dd1847ad8e7b20e7b
MATLAB
18,717
431
function [visual_feats] = GetVisualFeatures(trk, calib, subject_ID,target_ID, samplerate, frame_range, nose, plotit) % % GETVISUALFEATURES calculates estimated visual features of a target fly % in a subject fly's visual field during free behavior assays that have been % tracked with FlyTracker (https://github.com/kris...
615442e9d0263a5d72bcdb9371124093362e4e1c0f352d28b276129b287eac9c
MATLAB
18,718
548
%% choose session datRoot = '/Volumes/LaCie/Farries recordings/'; rat = 'IM1055'; sesList = dir([datRoot rat '/20*']); sesList = arrayfun(@(x) x.name, sesList, 'UniformOutput', false) iSes = 10; sesDir = [datRoot rat filesep sesList{iSes} filesep] % load behavior data load([sesDir 'behavior - RL.mat']) nTr = length(t...
c03748f1e37566b6fca1c956f09d4647497b466f4d64106e27c9387f143d9d09
MATLAB
18,722
466
function dataout = ft_denoise_tsr(cfg, varargin) % FT_DENOISE_TSR performs a regression analysis, using a (time-shifted set % of) reference signal(s) as independent variable. It is a generic % implementation of the method described by De Cheveigne % (https://doi.org/10.1016/j.jneumeth.2007.06.003), or can be % used t...
376964a0090fcb22d83d16d350e24e3cfd3e4b3d2d702540d8ae10d6b8c3b4e9
MATLAB
18,732
566
function data = loadjson(fname,varargin) % % data=loadjson(fname,opt) % or % data=loadjson(fname,'param1',value1,'param2',value2,...) % % parse a JSON (JavaScript Object Notation) file or string % % authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu) % created on 2011/09/09, including previous works from % % ...
c95fca208c26a1fb81fcd93e3f91d6b322f4afd27cf7cda99b3c646d42633b4c
MATLAB
18,774
412
function [J,data] = jacobian_spec_FD(mesh,varargin) % JACOBIAN_SPEC_FD Calculates spatial distributions of sensitivity of % field registerd on the mesh boundary to changes of chromophores % concentrations and Mie scattering amplitudea nd power per mesh node. % This function is specialized to be called for NIRFAST...
4d84c999128cd24cfacde85b3b9af4a84867f6bcff283479aafebebd146b5402
MATLAB
18,782
462
function dataout = ft_denoise_tsr(cfg, varargin) % FT_DENOISE_TSR performs a regression analysis, using a (time-shifted set % of) reference signal(s) as independent variable. It is a generic % implementation of the method described by De Cheveigne % (https://doi.org/10.1016/j.jneumeth.2007.06.003), or can be % used to...
9dd3469d77df67ebe52a33f97c251935245e1688ef85fc8062ca33b64321d407
MATLAB
18,789
414
%% This file creates the figures and table data for the simulated experiments % Figures 1-4 and Table 1 %% Figure 1 % make sure you have run Simulation_varyDelta_SetParameters with the % correct parameters first. fontsize=10; Variable = {'Dfit', 'beta_fit', 'K_fit'}; SNR = [5,10,20]; Dvec = [3e-4,5e-4]; be...
5851aa689b3082d5c5d4212b649fdd17aea853e8ab50f9aac2b65b60e5792d82
MATLAB
18,791
461
function [data] = ft_megrealign(cfg, data) % FT_MEGREALIGN interpolates MEG data towards standard gradiometer locations by % projecting the individual timelocked data towards a coarse source reconstructed % representation and computing the magnetic field on the standard gradiometer % locations. % % Use as % [interp]...
a64f63e7244d82d69023bd4c8c853a818edc043843b60a3e12a9ce7396ac7b57
MATLAB
18,794
499
clearvars -except datastruct cellNames = fieldnames(datastruct.ANESTH.D1); idx = {}; % Loop through each field for i = 1:numel(cellNames) currentField = datastruct.ANESTH.D1.(cellNames{i}); if isfield(currentField, 'ResponsiveMetrics_WN') && ~isempty(currentField.ResponsiveMetrics_WN{1,1}) idx{...
4db39ca323959014f8029d46c2e8399f6786c713314f607de779549b81c6b6de
MATLAB
18,810
474
function GLCM_3D(varargin) % GLCM on 3D space [fileList,maskFiles,OPT,SPACE] = ParseParams(varargin); tlboxDir = fileparts(mfilename('fullpath')); currentDir = pwd; MNIMaskVol = load_untouch_nii([tlboxDir '/data/T1_Mask.nii']); maskMNI = MNIMaskVol.img>0; fprintf('Starting Time: %s\n',datestr(now)); for i=1:len...
4fd6f879f26becdba285055ae2fc3571d2cd27bb7d77f0bdf73ae1691202e4ad
MATLAB
18,814
500
function hs = ft_plot_sens(sens, varargin) % FT_PLOT_SENS visualizes the EEG, MEG or NIRS sensor array. % % Use as % ft_plot_sens(sens, ...) % where the first argument is the sensor array as returned by FT_READ_SENS or % by FT_PREPARE_VOL_SENS. % % Optional input arguments should come in key-value pairs and can incl...
1746b3479d7e46e09d2a0dfc323143e6818c294e57084d8bd1164b7d15bbac05
MATLAB
18,887
346
% Copyright (c) 2016, Jordan Sorokin % All rights reserved. % % Redistribution and use in source and binary forms, with or without % modification, are permitted provided that the following conditions are met: % % * Redistributions of source code must retain the above copyright notice, this % list of conditions and ...
ec746126659d7f5f8fa6c20d45dce3e118a5213c193a62e9e10adfd9c3414885
MATLAB
18,928
454
classdef FilamentsReader < SurpassObjectReader % FilamentsReader Read Imaris ims file Filaments object data % % © 2015–2016, Peter Beemiller (pbeemiller@gmail.com) % % See also ImarisReader | SurpassObjectReader properties (SetAccess = 'immutable', GetAccess = 'public', Transient...
93bc66f8afb73d3bdbc6f690fdcf948cde4cf614cc28a52f7c6d695dc51f80f3
MATLAB
18,971
470
function [map,num,typ,scheme] = brewermap(N,scheme) %#ok<*ISMAT> % The complete selection of ColorBrewer colorschemes (RGB colormaps). % % (c) 2014-2020 Stephen Cobeldick % % Returns any RGB colormap from the ColorBrewer colorschemes, especially % intended for mapping and plots with attractive, distinguishable colors....
a7a4b25806ab8317b9d4e41a728e9c6729f845710bae10bc9f9c1ef751ec3f27
MATLAB
18,971
470
function [map,num,typ,scheme] = brewermap(N,scheme) %#ok<*ISMAT> % The complete selection of ColorBrewer colorschemes (RGB colormaps). % % (c) 2014-2020 Stephen Cobeldick % % Returns any RGB colormap from the ColorBrewer colorschemes, especially % intended for mapping and plots with attractive, distinguishable colors. ...
1de64849ad8ee4c9ca4ebccc6dfd288767b4506d8877b5bf0293e1df06daecb9
MATLAB
18,972
420
function [Yc,Ye,Ya,clscor] = boney_segment_refineSPM_R3(Yo,Ym,Yc,Ya,Ybraindist0,tis,tismri,refine) % == REFINE SPM DATA == % * Create meninges class? % - This is not realy working cause the intensities are changing too much. % Hence, it is better to evaluate the whole mid structure. % - Would thresholding by ...
4997a983b00ece10522774582d4ff1caee892c554071c858c83ccd5e7085abdb
MATLAB
18,981
523
function varargout = DPABI_CALCULATOR_TOOL(varargin) % DPABI_CALCULATOR_TOOL MATLAB code for DPABI_CALCULATOR_TOOL.fig % DPABI_CALCULATOR_TOOL, by itself, creates a new DPABI_CALCULATOR_TOOL or raises the existing % singleton*. % % H = DPABI_CALCULATOR_TOOL returns the handle to a new DPABI_CALCULATOR_TO...
cb26973f1739b5326518abc23a7f3a9704f4de68e5e15416da2e16c5ced02204
MATLAB
18,990
517
function [hs] = ft_plot_mesh(mesh, varargin) % FT_PLOT_MESH visualizes a surface or volumetric mesh, for example describing the % realistic shape of the head. Surface meshes should be described by triangles and % contain the fields "pos" and "tri". Volumetric meshes should be described with % tetraheders or hexaheders...
8cc2822278f57906d7beabd7485551fc6d997af09f04a952ada730261068a8a7
MATLAB
18,991
471
%% computeSDO_populateSDOArray (V4) % Given supplied point-process and time series data sets, compute the % stochastic dynamic operator for every supplied combination. % % Hardfork update to actually pass in the xtDataCell and ppDataCell classes % directly; making the evaluation more straightforward and function-calls...
8f3ef5d5845457c279173dc965b896e1bb2f1132b767e014c8741b59f3e86544
MATLAB
18,992
455
function out = htmlTable(varargin) % Display a Matlab cell array or numeric matrix as an html table % %PMTKauthor Gus Brown %PMTKurl http://www.mathworks.com/matlabcentral/fileexchange/18329 %PMTKmodified Matt Dunham % % INPUTS: % 'data' the data to display, an array or cell array % 'rowNames' ...
95a074e2fee5472e22b6d9688042ea78636e5528b169e53b4a5091db090b7380
MATLAB
18,995
587
function [cl, dat, cl_extent, dat_extent] = iimg_multi_threshold(inname, varargin) % :Usage: % :: % % [cl, dat, cl_extent, dat_extent] = iimg_multi_threshold(inname, varargin) % % Multi-threshold application and orthview display of blobs % % :Inputs: % % **inname:** % Either the name of an image file or a ...
1872f5332dea1a754def0bfb7f6c1dc7b0b0eea8f00b9ac6ffef87b7cabae2bc
MATLAB
19,029
508
function [varargout] = ft_plot_vector(varargin) % FT_PLOT_VECTOR visualizes a vector as a line, similar to PLOT. % % Use as % ft_plot_vector(Y, ...) % or as % ft_plot_vector(X, Y, ...) % where X and Y are similar as the input to the MATLAB plot function. % % Optional arguments should come in key-value pairs and ca...
10ebbf9ba5be453c65fa926eb870b354a5765aaf0fa19ccdb4111ecfdb522169
MATLAB
19,048
494
function [coef,alphas,offset,looe] = fracridge(X,fracs,y,tol,mode,standardizemode,wantlooe) % function [coef,alphas,offset,looe] = fracridge(X,fracs,y,tol,mode,standardizemode,wantlooe) % % <X> is the design matrix (d x p) with different data points % in the rows and different regressors in the columns. % <fracs> is...
1481cd7e1dc365be0078d5aa195f663dc594e003101122f1e33b2ec89f5f6cc8
MATLAB
19,068
377
%% Script for analysis of food-blob interactions (Sapkal et al 2024 Fig. 5f-h) % This only works with speicific folder,subfolder arrangement as in % superfolder/genotype subfolders/fly folders/tracking data % add path of edmond.de folder % run each section in order from start to end, one section at a time. subFo...
baf0fa03a64a0e7b3a6d9eb70e17802597faddeb5c1a254e59cc8f792db175d5
MATLAB
19,125
403
function [RawData, AllVolume] = yw_Harmonization(ImgCells, MaskData, MethodType, AdjustInfo, ParallelWorkersNum,OutputDir) % [HarmonizedBrain, Header, OutNameList] = yw_Harmonization(ImgCells, MaskData, MethodType, OutputDir, Suffix) % Harmonizes brain imaging data across multiple sites using various methods. % % Input...
e7fd5cf1b7eebd2494b93f7ddfc3be62aa7e1f2320a00965cf78b868ddb3c9e9
MATLAB
19,135
332
%% Analysis of free walking FlyTracker output from co-activation experiments (Fig2) % This only works with speicific folder,subfolder arrangement as in this % data subFolders = dir(pwd); realSubFolders = subFolders([subFolders.isdir]'); realSubFolders = realSubFolders(3:end); % Initialise video temporal par...
e854b747fa6aa9e2fe866cd18a826e5c70d6504aa17a8ce5df25009d5890c20f
MATLAB
19,189
394
function Multi_Histogram_Figures(AllHistogramData,TempSaveDir) OS=computer; if strcmp(OS,'MACI64') dc='/'; else dc='\'; end FigPosition=[50 50 800 800]; FigAxesPosition=[0.2 0.2 0.6 0.6]; FigFontSizes=[22 20]; close all if ~isempty(AllHistogramData.Ov...
c35ee0e8cbf17b88cb10dd0503e3f43b9460a3ce4a0e7850635aebe93b8f041f
MATLAB
19,192
297
function event_related_results(stat_path,exp_folder,q_level,ground_truth) % ======================================================================== % Ruslan Masharipov, July, 2024 % email: ruslan.s.masharipov@gmail.com % ======================================================================== load([stat_path filesep...
93a92d5c85c12c3aabb0b9802bf314a600f262f19ef72a3b20ba85da2b76b2c3
MATLAB
19,238
422
function [Yc,Ye,Ya,clscor] = boney_segment_refineSPM_R3(Yo,Ym,Yc,Ya,Ybraindist0,tis,tismri,refine) % == REFINE SPM DATA == % * Create meninges class? % - This is not realy working cause the intensities are changing too much. % Hence, it is better to evaluate the whole mid structure. % - Would thresholding by ...
6132b52d20a388aebc56ee6d89bee4950d4529c39100d7bb97cd3156d150fc3e
MATLAB
19,249
496
function [type] = ft_senstype(input, desired) % FT_SENSTYPE determines the type of acquisition device by looking at the channel % names and comparing them with predefined lists. % % Use as % [type] = ft_senstype(sens) % or % [flag] = ft_senstype(sens, desired) % % The output type can be any of the following % 'c...