sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
1030368b0079ccc8b21508eb98144938d5beeb4f65c3bbf9650423f8c8555794
MATLAB
1,632
22
function [output_mat] = lorenzliver(input_x,rho,tmax) % Solve over time interval [0,100] with initial conditions [input_x,1,-input_x] % ''f'' is set of differential equations % ''a'' is array containing x, y, and z variables % ''t'' is time variable sigma = 10; beta = 2.667; [t,a1] = co...
309e00ee58d8117ffc623cd674b549d4c9aad9fb6eee9c2796df578d0cdf7322
MATLAB
1,632
87
clear load a2_1_averagingSaccades iMonkey = 3; close all figure(1) clf for iMuscimol = [0,9,12] +1 %for iMuscimol = [0,9,12] +1 %for iMuscimol = [0,1,4] +1 k = 1; amp = [1:k:20]; clear m u l for iAmp =1:numel(amp)-1 cAmp = amp(iAmp); I = sacAllAmp{iMonkey, iMuscimol}>amp(iAmp) & sacAllAmp{iMonkey, iMuscimol}<a...
11cef1a013159ee2a3735c1c94b2cae9f6d4d5af70f938f8125f1d354817e269
MATLAB
1,634
48
function [imgAB, alphaAB] = alpha_comp_over(imgA, imgB, alphaA, alphaB) %alpha_comp_over - Alpha composite one image over another % % [IMG_AB, ALPHA_AB] = alpha_comp_over(IMG_A, IMG_B, ALPHA_A, ALPHA_B) % alpha composites IMG_B on top of IMG_A, using the alpha masks ALPHA_A % and ALPHA_B. % % This function is n...
33c8e493fceadd5a888cc9254cc678e68e4fdde8b395a4976bdf4fa05479770e
MATLAB
1,636
49
function plot_frame(self, varargin) % Copyright (C) 2017 Matthew J.P. Barrett, Kim David Ferrari et al. % % This program is free software: you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation, either version 3 of the Licens...
f87db304a4d26c756bdeeb4b40315b6aa8a3a2c2a936b2474286bd3c3184cf4b
MATLAB
1,639
81
clear close all %save(mfilename); imSize = [733, 977]; hmSize = [210, 280]; hmSize = [733, 977]; hmScale = mean(hmSize./imSize); pix2deg = 34.910; filesAll = dir('../../Images_Movies_Functions/analyze1/data0_Image/image_*'); I = arrayfun(@(x) x.isdir, filesAll); filesAll = filesAll(I); nFile = numel(filesAll); im...
f8dbf05dba5b1d5385b8d3f728df552776336e6decd7e8e2411405605abad9bb
MATLAB
1,639
39
classdef (HandleCompatible) ICalcVelocityStreaks %ICalcVelocityStreaks - Interface for classes that calculate velocity % % The ICalcVelocityStreaks class is an abstract superclass that % implements (or requires implementation in its subclasses via abstract % methods or properties) functionality related to calcul...
35bfabdff41b2ea24af1e794e1f35fa3221896b91c9fc5da5455c92a4ac7fdc3
MATLAB
1,640
81
%{ clear close all force warning on imSize = [733, 977]; load('a0_0_bhv2trialStrct.mat'); UMonkey = [1,3]; NIImage_IndividualAndGroup5 = [... 7 11 25 27 38 39 40 47 49 53 56 60 9 22 28 41 42 43 44 50 52 55 59 ]; % no...
570b976450b7eeaedca1ec7d347358310fbc9912b9f6f20410e55295724e4479
MATLAB
1,643
50
function t2n_renameNrnmech(newname,path) % This function renames the nrnmech dll file to the name specified in newname. % Also deletes all .o and .c files created during dll compilation by % NEURON. % % INPUTS % newname string with new name for dll file % path (optional) path to the main folder of the model (cont...
977430f185803a5c32535b096dccd0653d9cf8e8350d79b116bae2474aecd87e
MATLAB
1,645
43
%calculating the average vaule of each individual fiber bundle core %Last modification: 02/01/2023 % by Peisheng Ding (peisheng.ding@mpi-halle.mpg.de, peisheng.ding@mail.utoronto.ca) function A_cores= average_cores(Image, Cores_Stats,blank_field,radii) % %------------------------------------------------------...
9c093f797209f8e483dbdfd90c6eaf01d2e4d71c4677a6b73a032695e4f250d5
MATLAB
1,645
54
function simulate_EEG(masterFolder,arrayID,S) addpath('/lustre04/scratch/nbrake/code/simulation_code'); baseFolder = '/lustre04/scratch/nbrake/data/simulations/parameter_sensitivity_analysis_2'; load(fullfile(baseFolder,'parameters.mat')); fid = fopen(fullfile('/lustre04/scratch/nbrake/code/simulation_code','mod_file...
2b63d8fccc7ec8d40d06056aae2d5923ddd38e0691e912c3d3d8b37423a85fb5
MATLAB
1,647
43
function [] = iso_compl_v5(RespMatComb,Quantity,CSel,RelHumidities) % Comparison of the responses towards the highest concentration - ISO compliance % area([0,7],[RespMatComb(CSel,3)*1.3 RespMatComb(CSel,3)*1.3], RespMatComb(CSel,3)*0.7,'FaceColor','r','FaceAlpha',0.3, ... 'LineStyle', 'none'); % ISO bound...
4a63cf5401b05f77f06fa96a102a9639df9cdbdceea4eccc21bdf887674a19bd
MATLAB
1,647
51
function live2pHoloSocket global ExpStruct global websocket seqNum = numel(find(diff(ExpStruct.triggerPuffer)==1)); if seqNum > numel(ExpStruct.bigListofSequences) sendThis = [1000]; sendThisSI = []; elseif seqNum ==0 disp('0 trials') sendThis = []; ...
565b3aa1700aee1ee8ef9f08f34a684d6d734ecb4b07e1005abab2e744159582
MATLAB
1,648
47
function check_plotList(self) % Copyright (C) 2017 Matthew J.P. Barrett, Kim David Ferrari et al. % % This program is free software: you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation, either version 3 of the License, or ...
762af680ad7e3a29bdf6704da5c62e5118cbb25c9a8f71f2d4eee226a239585c
MATLAB
1,648
35
function [fluor, stillScans] = LoadROIfluor(expt, fluor, loco) % Load ROI-level fluorescence signals from file generated by GetROIfluor, without needing memory-hog ROI structure savePath = strcat( expt.dir, expt.name, '_ROIfluor.mat' ); tic fprintf('\nLoading %s', savePath); if exist(savePath, 'file') load(sa...
32e1aea77959ba985d44a91cff8b58ef608e4895a6491f282bdc76d7f17096ca
MATLAB
1,653
42
function [DataMatrix, Labels,MouseIDs,Days,sessionNames] = AverageSessionDataOld(DataMatrixSrc, LabelsSrc ,MouseIDsSrc,DaysSrc,sessionNamesSrc) sessionNum = zeros(1,length(sessionNamesSrc)); SessionNameWithoutBout = cell(1,length(sessionNamesSrc)); for k=1:length(sessionNamesSrc) curName = sessionNamesSrc{k};...
82cc3145668dad1e36f8793e909c376599ecade50c162efc70955beb8e40d540
MATLAB
1,654
49
function releases = getGitHubReleaseHistory(verbose) % Return a structure containing the release history on GitHub % % gURL = zapit.updater.getGitHubReleaseHistory(verbose) % % Purpose % Return the project's GitHub release history. This can be used to determine % if the installed version is...
0b359c710b52482a2cc11d4c1593253fae69a3a5f8d5c368fffa64fc2bfd9a56
MATLAB
1,657
53
%% Run Experiment For Set Duration % % <html> % This examples shows how to use Matlab to control the Synapse mode and % monitor recording status <br> % This uses the 'ExperimentSetTime' example experiment, but it could run with any % experiment <br> % </html> %% Housekeeping % Clear workspace and close exist...
7e2597bb5a1118b9f4951f6312472c9181f2708c95250c2fea94f4b95e6f9048
MATLAB
1,659
55
function mycolor = getmycolors(colorSet) % myCOLORsHEX = {'#009ADE','#C77CFF','#FF1F5B','#FFC61E','#F28522','#A0B1BA'}; if nargin < 1 || isempty(colorSet); colorSet = 1; end if colorSet == 1 % myCOLORsHEX = {'#009ADE','#C77CFF','#FF1F5B'}; myCOLORsHEX = {'#0E4BEF','#5a005a','#FF0090'}; myCOLORsHEX = {...
645e075225fd678b2f7a17370b19cbf964df5942e52da9f7bee5b7e3537c05f0
MATLAB
1,660
71
function [h]=rmHrfTwogammas(t,params) % Create an HRF based on the SPM two gamma model. % % [h]=rmHrfTwogammas(t,params) % % t: a range of latencies % params(1): peak gamma 1 % params(2): fwhm gamma 1 % params(3): peak gamma 2 % params(4): fwhm gamma 2 % params(5): dip % Final hrf is: gamma1/max(gamma1)-dip*gamma2...
9f36d75869d185e21d6aa89569df7b0f2ace1f136ad351a2a0f9fc0a4aabd1a1
MATLAB
1,664
68
%% rsquared % % [R^2] and adjusted [R^2] statistics % % <matlab:open('rsquared.m') code> % %% Syntax % % [RSQ,RSQADJ] = rsquared(X,E) % %% Arguments % % See also <mvgchelp.html#4 Common variable names and data structures>. % % _input_ % % X multi-trial time series data % E ...
4222c3338ded5c2285ed4ec2105e9aabd4161658b37c4a1c886a705eb858b5bf
MATLAB
1,665
37
classdef (SharedTestFixtures={matlab.unittest.fixtures.PathFixture(... fullfile(fileparts(mfilename('fullpath')), '..', '..', '..', 'inputOutput'), ... 'IncludeSubfolders', true)}) ... testio_CSIloadtwix < matlab.unittest.TestCase properties dataFile end methods(TestMethodSetup...
e8ec78037e51cdc3ed9c4b2cdb7d2b4ef32996767ad06626273b2f4818d1162b
MATLAB
1,666
22
function J = customcolormap_preset(preset_name) switch(preset_name) case 'pasteljet' J = customcolormap([0 .25 .5 .75 1], {'#9d0142','#f66e45','#ffffbb','#65c0ae','#5e4f9f'}); case 'red-yellow-blue' J = customcolormap(linspace(0,1,11), {'#a60026','#d83023','#f66e44','#fa...
950af36b54bba4ea95715fc04ea49fa07bf4c6c86ded2fb42ceca3c3137a0755
MATLAB
1,668
42
function annotate_signals(self, objPI, hFig, currROI, params) %annotate_signals - Add annotations to 'signals' plot % % The function 'annotate_signals' calls function 'annotate_traces' with % adjusted parameters to produce annotations for ROI responses % one-by-one. % % See also CalcDetectSigs, CalcDetectSigsCl...
9eb2b3d74a87397860d039f9757b6273e0efd89d07483f400667bab764c23824
MATLAB
1,668
52
function varargout = plot_imgs(self, objPI, hAxes, varargin) % Copyright (C) 2017 Matthew J.P. Barrett, Kim David Ferrari et al. % % This program is free software: you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation, eithe...
6aeb06ef24f2735da970a6b6b6df6e06264e6c61fd5ebee7d9fa12bb2cf2de06
MATLAB
1,669
54
function[simsig simsigmod snr] = gen_simsig(sigy1_freq, sigy2_freq, Fs, ... numsec, noise_ratio, amp_ratio) % function[simsig simsigmod snr] = gen_simsig(sigy1_freq, sigy2_freq, Fs,... % numsec, noise_ratio, amp_ratio) % % This function generates a PAC containing signal 'simsig' and a % corresponding modulating s...
91067051a316382081536d00377c51bdd249d06d96d25c8fe68c82811428487c
MATLAB
1,669
39
function [calibratedPoints,rotMat] = rotateAndScaleCoords(template, refPointsStereotaxic, refPointsSample) % Calculate rotation and displacement of sample with respect to stereotaxic coords and apply to data % % function [calibratedPoints,rotMat] = zapit.utils.rotateAndScaleCoords(template, refPointsStereot...
05ef5a5ca655bcbcff7d36d68474de1a80a7d2154d9b64124a6b7ca4e82102bc
MATLAB
1,670
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
393511005cc08ebba04a3779dd5f0aca8fa106fba9cc7ce775fc2534e97fb939
MATLAB
1,670
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
3af442e285f284143140736969d34daaa0f187183aebbe2169db684b173c809e
MATLAB
1,670
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
49a8db15090df949c83037a2d9fee6cefa91c547a3cb921bc33d5d1aa4247863
MATLAB
1,670
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
7231198474c8af7203d12c6687bf8bd204603197d01b32d5ffdcef68a45e640c
MATLAB
1,670
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
7f76c9d079a27f04e4bcddead013878673fc1045ee549e22bfa4dbdfa176fa0e
MATLAB
1,670
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
d757a529e20db06c5fe29dafcb4b96e4a98ca48c5bb8b1917d0249cc25fad3a5
MATLAB
1,670
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
f9eb1a2071ed6e69ac0b872881876a25301f78e21443f15605a260c17da88798
MATLAB
1,670
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
bcb2653f5ccace2b6bd345f29a595127ec48686be711d4d361229faca44da239
MATLAB
1,671
53
function [data, bgLevel] = subtract_bg(data, bgPct) %subtract_bg - Helper function to subtract the image background % % This function is not intended to be called directly. % Copyright (C) 2017 Matthew J.P. Barrett, Kim David Ferrari et al. % % This program is free software: you can redistribute it and/or modif...
4bbc7b65f60eac286231713d7c3527fc2d00d941a5816d8620063c6b996229af
MATLAB
1,672
62
function getIPaddress % Get the IP address of the local machine % % function zapit.interfaces.getIPaddress % % Purpose % Return IP address(es) to help user connect to TCP/IP server from a different PC on % the same network. It is common for PCs to have multiple IP addresses. e.g. A Windows ...
568e6518c0456b4ee4f49f7c07df643b195b4a7094323489367d8ee7964bb02e
MATLAB
1,673
58
clear close all force imSize = [733, 977]; hWB = waitbar(0,'checking the trials ...'); %load tirals info load('a0_0_bhv2trialStrct.mat'); I = arrayfun(@(x) isfield(x.analyze,mfilename), dataTrl); if any(I) I(I) = arrayfun(@(x) x.analyze.(mfilename), dataTrl(I)); end NTrial = find(~I); nTrial = numel(NTrial); ...
b80b665d58503e02168677a2df508c03c32c779ee23f38ccec1dadb85126080e
MATLAB
1,673
56
% the pattern separation toolbox: analyse spike train ensembles % Copyright (C) 2022 Alexander D Bird function [estRR_obj] = estimate_RR(input,output,options) %ESTIMATE_RR Estimates the redundancy of the input and output ensembles. if nargin<3 || isempty(options) options='-par'; end n_trial_in=size(in...
cb8c57f2d09ee550dcd7b7f71758cc0f9c187cce812c8d4afbba848e7ddfa101
MATLAB
1,673
47
function stats = get_ROI_stats(roiMask, pixelSize) %get_ROI_stats - Extract descriptive statistics about ROIs % Copyright (C) 2017 Matthew J.P. Barrett, Kim David Ferrari et al. % % This program is free software: you can redistribute it and/or modify % it under the terms of the GNU General Public License as pub...
2c8c568f91a29f20a47b032ddbc47b8cadca9f1501028e6ea97a0cc625f87ca7
MATLAB
1,677
56
%% check_delete_tree %% test 1 dLPTCs = load_tree ('dLPTCs.mtr'); for counterN = 1 : 10 for counter = 1 : length (dLPTCs{1}) delete_tree (dLPTCs{1}{counter}, ... find (BO_tree (dLPTCs{1}{counter}) > 5), 'none'); end end %% test 2 tree = sample2_tree; delete_tree (t...
502c1772d82e031fefc22d12eb3ee83644f5455e3ec838d9cf0f9d18f175918e
MATLAB
1,680
84
clear all load('RvsVData') G = [-157.5:45:157.5]'; v = reshape(RvsV(:,1),10,8)'; r = reshape(RvsV(:,2),10,8)'; nCase = zeros(8,1); for i=1:8 nCase(i) = sum(~isnan(r(i,:))); end vDat = reshape(v',80,1); rDat = reshape(r',80,1); iOut = find(isnan(rDat)); vDat(iOut) =[]; rDat(iOut) = []; sym = ['bo';'b+';'bs';'bx';...
bdc4e457cf74b2ea1be4baf2d003f0559ee7c1ac8d1b709f9d5f2f6eb089d03c
MATLAB
1,680
48
% op_filter.m % Jamie Near, McGill University 2014. % % USAGE: % [MRSIStruct,lorenzianFilter]=op_filter(MRSIStruct,lineBroadening); % % DESCRIPTION: % Perform lMRSIStructe broadening by multiplying the time domain signal by an % exponential decay function. % % INPUTS: % MRSIStruct = input data in matlab struct...
291b0e81751d13f077751c8ad33bcd94fb36528641039a41bc165faf5806499d
MATLAB
1,681
53
function pparam = mv_rearrange_preprocess_dimensions(pparam, dim_order, max_dim) % mv_classify and mv_regress rearrange the data dimensions such that the % dimensions are in the order [samples, search dimensions, features]. % The preprocess parameters have some fields referring to dimensions; these % need to be adapted...
0aec0cfc940b80b1d25ca1e388c27656d6fa0269806f5ae0726ca6b446420d69
MATLAB
1,682
49
function Y = MovingPercentile(X, pct, win, alignment) % X = matrix to calculate moving percentile on (along first dimension) % pct = percentile to calculate % window = width of window to calculate percentile of % alignment = 'pre', 'post' or 'center' position of window relative to index tic if mod(win,2) == 0 ...
dcd21d69ccb05b6b6d8b63d744ea1518d62377a62d78413af7586dee539c3811
MATLAB
1,682
46
function [hRaw, strRawImgType] = create_constructor_rawImg(varargin) %create_constructor_rawImg - Class method to create a concrete RawImg % subclass constructor. % Copyright (C) 2017 Matthew J.P. Barrett, Kim David Ferrari et al. % % This program is free software: you can redistribute it and/or modify % it u...
bb87a10ede4103dee13f92e45288f78693f3a6646311ce8cd4e8f974213bb8e1
MATLAB
1,683
46
function subclassOut = choose_subclass(classParent, strType, varargin) %choose_subclass - Helper function for choosing a subclass % % This function is not intended to be called directly. % Copyright (C) 2017 Matthew J.P. Barrett, Kim David Ferrari et al. % % This program is free software: you can redistribute i...
95368875965343fcee0a72dcfd159a7a950be41ab3312373f980f1013a45e68e
MATLAB
1,684
46
cd 'C:/Work/MatlabCode/projects/BrainMetabolismModeling/BrainMetabolismModeling' load('data/MinModel.mat') %Data for Fig. 4E, S2 simulateCombSimpleModel(minModel, 'data/simpleModelOutputRedMitMob.mat', 0.15, 0.1, 0.1, 0.1, 0.1, 0.5, 0.4, 0.2); simulateCombSimpleModel(minModel, 'data/simpleModelOutputTransport.mat', 0....
9ae040ad48a2dfd6fb08731f93eda0e39c3be14c0cdc758172de764f9b697b0c
MATLAB
1,684
42
function bMask = LK_MaskBehavioralSampling(cfg) % % LK_MaskBehavioralSampling creates a mask based on the number of discrete % observations per factor level. Each factor is checked separately and % independently from the other factors. % % Input is a structure with fields % data --> time x n matrix (for n fact...
9218d96a229d22c0182d7531cf45cfafa82a9d19b722a7143eb0ac5974a76d51
MATLAB
1,685
66
clear clc close all filename = [pwd,'\temporary data\test_block','.cnt']; cnt1 = loadcnt(filename,'dataformat','int32'); for epoch = 1:length(cnt1.event) type(epoch) = cnt1.event(epoch).stimtype; typeoffset(epoch) = cnt1.event(epoch).offset; end trigger=cnt1.event.stimtype; stimTime = 5; epochTime =...
47ebf96e4d7d83b52188f3eef9eaf33fc753412872e7294f93687cfe16206648
MATLAB
1,686
48
function [pixelMask, groupMask, significantMask] = ROIsToMask(self) %ROIsToMask - Create mask from ROI pixel data % % [pixelMask, groupMask, significantMask] = ROIsToMask(OBJ) requires a % CalcFindROIsFLIKA object and returns three subsequent stages of ROI % masks produced by the FLIKA algorithm. % % See also C...
35c81a028c10db39d189834a03f69fd01f1840f4c62f915268927a2038360683
MATLAB
1,687
41
function vec_gNa = range_conductanceNa(nainfo,tree,options) % nainfo: gbar, slope if nargin < 1 || isempty(nainfo) warning ('You need to define the information for the Na conductance disribution') end if numel(nainfo.region) == 1 isregion = find(strcmp(tree.rnames,nainfo.region)); isregion = tree.R == isr...
887026221c8938c7e8fadbb9fd31d7cd757686368195b9249a80280df185970a
MATLAB
1,687
50
function cleanUp % Example - run a sub-function automatically when the caller function ends % % function cleanUp % % Purpose % Demo of how to run a sub-function when the main function ends. % The use of try/catch statements means that the "cleanUp" function % will run even if the calle...
01687d2d4b17d4a6294c137a96347513ea61a5c6f282e67a82ad1a857dc38b7d
MATLAB
1,688
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
05755e48dbf241237a43ee6ee53b6546ebb78387db0eda480334de52f97011ea
MATLAB
1,688
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
29633ea5b73c2081783050f7a7a722db8b6ff14b8ed3ec2b03c37bbabb452dc3
MATLAB
1,688
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
533b19e250345a020c7325feea62b3ccc6ac1e456ac524b700f2c40dd5721e3a
MATLAB
1,688
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
542561cd661b80a27efba000746f223a31f56cc0deb6b176b5b64a794b2f1212
MATLAB
1,688
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
5e0a013ffb87722f71e26f5ff9d6cbd2f68aa505216c663660c973bc46e5f05a
MATLAB
1,688
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
88ba08e7aebda9773f852e4f3a1fdc3299fac97c1169d8b0438cb1ca39c57a45
MATLAB
1,688
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
befc137ca92859e8d1752440230d02e48688a41ad1a9ad13cd2764530c4aced6
MATLAB
1,688
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
5cc1a553291c5bfc3a5a09a56919a4744b81ef80d6d70b0669db7398272d223d
MATLAB
1,689
50
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
8a07116d1361f7670e47300b88dee9c6c296bca4c9c7a0f442a0d0940f11c7cf
MATLAB
1,689
48
function params = getExtraParams(params) params.recomputePredictionsFlag = true; params.analysis.zeroPadPredNeuralFlag = true; params.analysis.reluFlag = true; params.analysis.spatial.sparsifyFlag = 0; params.saveDataFlag=0; params.verbose = 0; % normalization falg params.analysis.normNeuralChan = 0; params.analysis....
4ba839b958dd9f24107245076cdd41de710fbcf845a367037ad28f50b222d569
MATLAB
1,693
54
function refreshImage(obj) % Add an image to empty axes or re-plot an image with new XData and YData % % zapit.gui.main.controller.refreshImage % % Purpose % Insert and empty image into axes. Calling this method with no image in hImAx or an % image with empty CData will cause a new image to ...
74f74b5a240ed6bfbe7cd693a92375cb4bb5a78cbc8e8c413be9b8fd5fd99162
MATLAB
1,693
63
%% check_plot_tree tree = sample_tree; %% test 1 clf; hold on; shine; axis off dLPTCs = load_tree ('dLPTCs.mtr'); for counterN = 1 : 10 for counter = 1 : length (dLPTCs{1}) tree = dLPTCs{1}{counter}; plot_tree (tree, rand (1, 3), [], [], [], '-p'); ...
3fed6e09a405a532181e702910844a78eb616714d4b9267ec8af479c3499f75c
MATLAB
1,694
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
4bbc7fcc7ca625075a1491114c45c6fb0500b0594c0430837499b950c204d554
MATLAB
1,694
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
7f71ddae30e3f3745a0884fb73e7033d0344ef6f1897a34517ce1b269f7b8386
MATLAB
1,694
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
ac9858ff51fdf2bfbde98b92f7ccd57b71f5f3cb34c1322972ff4cec5cc6cfbb
MATLAB
1,694
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
5505b5791c969b8d30c3230a177d676aac8b6ec4a4a4ee117c4ab0d13b1a9d0c
MATLAB
1,695
45
function [Corrs,Pvals] = abcd_edgewise_correlation_iterative_reliability_single_factor(rmats,factor,binsize,iter) %UNTITLED Summary of this function goes here % Input: rmats = 2D matrix (subject x edge) % factor = behavioral item to correlate with RSFC % Should be n x 1, where n = subje...
40d8a26f7f6819fca612d86881d784fa3acb998c3d71b1ddb5df3a2ace8179df
MATLAB
1,696
61
function [All, outVars] = getTuningCurve(All, opts, outVars) % general settings visAlpha = opts.visAlpha; numExps = numel(All); for ind=1:numExps uVisID = unique(All(ind).out.vis.visID); uVisID(uVisID==0)=[]; oriCurve=[]; oriCurveSEM = []; oriTrialCount =[]; for i=1:numel(uVisID) ...
683aa410d10adfb6f2e148ce90b67821bab6424b46f1511f7d4048948d580701
MATLAB
1,697
44
function cpObj = copyElement(obj) %copyElement - Customised copyElement class method to ensure that the % rawImg property and the children (which are both handle objects) are % recursively copied. % Copyright (C) 2017 Matthew J.P. Barrett, Kim David Ferrari et al. % % This program is free software: you ca...
7646b3ca2ab23b2ff25e8885dff2f21b46bdd42d17d26d6532f7f6825ba89122
MATLAB
1,697
43
function checkScannerCalibClocked(obj) % Run through the scanner calib locations using a clocked AO task. % % zapit.pointer.checkScannerCalibClocked() % % Purpose % Run the beam rapidly over all of the coordinates in the scanner calibration % grid. This method starts the scanners but does no...
31290559b5deb1f1873e001b9596c5aff083096f45603a693e58ac22645cca03
MATLAB
1,699
37
function channelToUse = choose_channel(self) %CHOOSE_CHANNEL - Compares image channels to a set of processable channels %and in case there is more than one appropriate channel, asks the user %which channel to use. Can deal with a single RawImg object or an array of %RawImg objects. % Copyright (C) 2017 Matthew J.P....
321aafae9dcb6375cdc945c1c2b3f24e496c1d538de4fe06a117dd6390b8f07b
MATLAB
1,700
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
3d7ee90bef42b27d26e7e4c4c818cc3660130432d4886e4c33ded1c437eff805
MATLAB
1,700
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
48bfce00ce155dd6d68b1ece7367ca28c62bf5c847dc77898a898d78acb8e882
MATLAB
1,700
61
%% check_rot_tree %% test 1 dLPTCs = load_tree ('dLPTCs.mtr'); for counterN = 1 : 50 for counter = 1 : length (dLPTCs{1}) tree = dLPTCs{1}{counter}; rot_tree (tree, [], '-m3d'); end end %% test 2 rot_tree (sample_tree, [], '-s -m3dX'); tprint ('./panels/ro...
48dd7226ae93b05d70b38d576066a0c78c454ce830004fe17b657697710bbf3d
MATLAB
1,700
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
4ec03ca59a0496817eaf48277f7a48c06e32f5045c8a03e000496118cd98f28f
MATLAB
1,700
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
5d211ddb11ebd73b10d4863e863f89bda94737f2c28f44d67d16f22b14b1a0cd
MATLAB
1,700
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
ad7338ec24485c4f75f54008171abb28e41c8218592f9b3d4bb6b3f3492721b3
MATLAB
1,700
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
c54e032759242511390c677b2ec8511ba80d623cdfec9a28bdbc4113c3151013
MATLAB
1,700
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
d04013de2eade0ce515dc236bf07ae1b3afc2aa6593b612d7fa65f0e1231001c
MATLAB
1,700
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
ac74bca61f862803f220e8bff0d6a408945411496f0e4ee6d81118a4f6ca1db5
MATLAB
1,701
42
function params = st_cleanParams(params) %----------------------------------- %--- For speed we do our computations in single precision. %--- But we output in double (for compatibility). %----------------------------------- params.analysis.x0 = single(params.analysis.x0); params.analysis.y0 ...
0275a6d161c1d8eb6fa38b82a3e86b1802174bd051b0cd24a9a28a5ae2ad826a
MATLAB
1,703
79
% op_lorentzianPeak.m % Jamie Near, McGill University 2014. % % USAGE: % out=op_lorentzianPeak(n,sw,Bo,lw,ppm0,amp); % % DESCRIPTION: % Generate a noiseless spectrum containing a single lorentzian peak with % desired parameters (frequency, amplitude, linewidth, etc.). % % INPUTS: % n = Number of points in spect...
2dc187f35faf9a9c9604392c2353281b752cfa6862c986bebd1124d248fc20ea
MATLAB
1,703
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
8d1d38622ef5812e337dc1b4278d84b310bfaac590b1df9a726f177d69052e3f
MATLAB
1,703
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
e49cadeed0b0608d9d7be2c7110b9f299297e234e9202fc17dfc015290c20c70
MATLAB
1,703
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % -------------...
1ce7487baa30d68d01c5c7b9a493ef57f5e17c752664162ffe0a5a03aa11c7aa
MATLAB
1,706
80
% op_gaussianPeak.m % Jamie Near, McGill University 2014. % % USAGE: % out=op_gaussianPeak(n,sw,Bo,lw,ppm0,amp); % % DESCRIPTION: % Generate a noiseless spectrum containing a single gaussian peak with % desired parameters (frequency, amplitude, linewidth, etc.). % % INPUTS: % n = Number of points in spectrum. %...
17297eb7267b670034b64ce533d2e42e44bbd75617a1368bdc638071f200ceb4
MATLAB
1,708
53
tfce = tfceMex_maxtree(t, E, H, calc_neg, faces) % Apply threshold-free cluster enhancement (TFCE), computed exactly % FORMAT tfce = tfceMex_maxtree(t, E, H, calc_neg, faces) % t - T map (3D volume, or Nx1 vector for surface data) % E - TFCE parameter for extent % H - TFCE parameter for height %...
057c16bd43b854a97d3f33516bb946602a88aace20db045de27a8176a9291bdc
MATLAB
1,714
46
%rf_single2dualBand.m %Peter Truong, Sunnybrook Research Institute 2021. % % USAGE: % [rf,AMPINT]=rf_single2dualBand(rf_struct,tp,df); % % DESCRIPTION: % Creates a dualband RF pulse from user a single band RF pulse with a duration % of tp(ms). If the original rf pulse set at frequency = f_orig, the % second band wil...
d0286cb16f7ef1c51714c8ea9c5a74e06b2393c5ebeb5df0fb929ae05c2ae3cb
MATLAB
1,714
51
function qc = motionQc(result, motionFile, motionModel) %MOTIONQC Compare phase regressors and selected SVD component with motion. arguments result struct motionFile {mustBeTextScalar} motionModel (1,1) string = "motion+derivatives" end motion = readmatrix(motionFile); if size(motion, 1) ~= size(result.re...
339aad1e31b694e0cf68fcc129a2c6c3ab15ffda2c8dc0b9f387553b699e602c
MATLAB
1,717
45
load(fullfile(dataFolder,'EEG_data','data_sample_time_series.mat'),'time','eeg','ptID'); load(fullfile(dataFolder,'EEG_data','data_time_information.mat')); t0 = timeInfo.infusion_onset-timeInfo.object_drop; red = clrsPT.qualitative_CM.red; CM = clrsPT.iridescent(1e3); black = CM(end,:); marsh_model_analysis; fig =...
7f3cbb500162f0d762f13f187cb523cbd1af4cba7b3a59ea6736da1405c03d56
MATLAB
1,717
71
% CPLOTTER Plots a contour. % (scheme package) % % HP = cplotter (c, color, DD) % ---------------------------- % % Plots a 2D contour obtained from contourc (see "contourc"). A contour is % defined by: % c = [contour1 x1 x2 x3 ... contour2 x1 x2 x3 ...; % #number_of_pairs y1 y2 y3 ... #number_of_...
a153c63f4d97a40efa8a7964c8bfcd4ee079fdc339fac8e38b2d25eb5cae0a2c
MATLAB
1,719
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % ------------...
c17500426f93232b11e6bc5b5904c20c68a686358e34fc39d7630626e8f774a7
MATLAB
1,719
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % ------------...
c5f18af0335d84575af426393b3d022ee674574b7c8384678bc025b8bccf9c0d
MATLAB
1,719
51
% Parameter configuration for TS extraction for resting state fmri % Parameter configuration for TS extraction for resting state fmri % _________________________________________________________________________ % Stanford Cognitive and Systems Neuroscience Laboratory % % $Id rest_ts_extraction_config.m $ % ------------...
7f9764cfc8833bef1f5bf3abbaa5e031162e27261cd5457d6b5e044f14ea5d20
MATLAB
1,720
52
function soundAsync(y,fs,bits) % soundAsync Play vector as sound, asynchronously. % soundAsync(Y,FS) sends the signal in vector Y (with sample frequency % FS) out to the speaker on platforms that support sound. Values in % Y are assumed to be in the range -1.0 <= y <= 1.0. Values outside % that range are clippe...
aa18929095603a4475f88cd1458703a17c7fdcda540aa80885f9fe8cdfe44da2
MATLAB
1,721
60
clear; clc; close all %% Figure9 subs=30; frequency=60; condition=2; category=3; load([pwd,'\temporary data\Sub_score.mat']); size(Sub_score); %30 subject *2 condition *60 frequency *3 comfort/flicker/preference aver_subs=squeeze(mean(Sub_score,1));%2*60*3 for fre=1:frequency for criterion=1:catego...
e1a7a349360456e66070e1c18a04feeff060a4385ab2e1acf9d548a5cba47c43
MATLAB
1,721
67
% op_addphase.m % Jamie Near, McGill University 2014. % % USAGE: % out=op_addphase(in,ph0,ph1,ppm0,suppressPlot); % % DESCRIPTION: % add zero and first order phase to a spectrum. % % INPUTS: % in = input spectrum in matlab structure format % ph0 = zero order phase to add (degrees) % ph1 ...
bc5ef9cf25f0c271df13ce0f82f1972a2e0182d54d71cc1319290cb1fbdcf665
MATLAB
1,723
37
classdef test_respiration < matlab.unittest.TestCase methods (Test) function extractsDominantChangingComponent(testCase) t = linspace(0, 2 * pi, 12); image = zeros(3, 3, 2, numel(t)); image(1, 1, 1, :) = sin(t); image(2, 2, 1, :) = 0.1 * cos(t); r...