sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
cf1419f78ae81aaf0d9209c5f8550b495d0a74a4f781391a6cebb57efb836663 | MATLAB | 2,580 | 109 | function [pf,occH,x1,x2,pX,pY] = PlaceField(S,X,Y,epoch,varargin);
% [pf,occH,x1,x2] = PLACEFIELD(tsa,X,Y,epoch,bins,occH,x1,x2);
% Different Usages
% 1- PlaceField(tsa,X,Y,epoch,bins);
% where bins is the number of bins on X and Y
% 2- PlaceField(tsa,X,Y,epoch,x1,x2);
% you specify the binning spacing x1,x... |
214354785e5ef3293641e0a483f2d183436dde35d0a83afc7611fef7db22c9c8 | MATLAB | 2,582 | 54 |
clear all
close all
addpath('/Volumes/LASA/TBI_OpenNeuro/TBI_openneuro/Hopf_model/TBI_homogeneous/outputs/Grange/HC/');
addpath('/Volumes/LASA/TBI_OpenNeuro/Shared_code/TBI_ON_Lesions_Hopf_mask2SD_weight/')
addpath('/Volumes/LASA/TBI_OpenNeuro/TBI_openneuro/Hopf_model/TBI_ON_Lesions_Hopf_mask2SD_weight_corr/outputs/Gr... |
6eff50a6617bc7ffc7cca34a94d9ff4d7a7811513d1b2f0b5b1f803d601be025 | MATLAB | 2,583 | 72 | function L = CrossCorrFit_Cells(qPre,qPost,sPost,binT,ep)
% [L,params] = CrossValidationCrossCorrPrediction_Cells(qPre,qPost,sPost,ep)
%
% computes the loglikelihood prediction of an ensemble of target spike trains given another ensemble of (predictor) spike trains
% The prediction is built upon a Generalized Linear ... |
eb807a4bee09932b4a88d1a19d81e6f0e9ecf0ca8a3d8b77177bfb313f557813 | MATLAB | 2,583 | 81 | addpath(genpath('/dagher/dagher11/filip/Software/BrainSpace-0.1.2'));
addpath(genpath('/dagher/dagher11/filip/Software/gifti-main'));
addpath(genpath('/dagher/dagher11/filip/Software/netneurotools'));
addpath(genpath('/dagher/dagher11/filip/Software/neuromaps'));
[v_dkt_lh, l_dkt_lh, ct_dkt_lh]=read_annotation('/dagh... |
e0a0fedda4a538fb2014b00e06083a1d8c68dc5638c9919ba506f7f949350135 | MATLAB | 2,585 | 100 | function g = gpgrad(net, x, t)
%GPGRAD Evaluate error gradient for Gaussian Process.
%
% Description
% G = GPGRAD(NET, X, T) takes a Gaussian Process data structure NET
% together with a matrix X of input vectors and a matrix T of target
% vectors, and evaluates the error gradient G. Each row of X
% corresponds to one... |
e266d0374d90cacbdae99cd445ca1b28d71372f2ea1bb630b8d1efc1d8dc7765 | MATLAB | 2,585 | 56 |
clear all
close all
addpath('/Volumes/LASA/TBI_OpenNeuro/TBI_openneuro/Hopf_model/TBI_homogeneous/outputs/Grange/HC/');
addpath('/Volumes/LASA/TBI_OpenNeuro/TBI_openneuro/Hopf_model/TBI_ON_Lesions_Hopf_mask2SD_bin_corr/outputs/Grange');
addpath('/Volumes/LASA/TBI_OpenNeuro/Shared_code/TBI_ON_Lesions_Hopf_mask2SD_bin/... |
476144af6ce849ad7ca34fd05c16d118b3224629caca3cce9151d0335627401d | MATLAB | 2,586 | 112 | function py = madc_pcont_table_sel_angles(d, c, mt)
%% generate contingency table response probabilities given d and c vector
%
% Sridhar Devarajan, Sep 2016
% sridhar@cns.iisc.ernet.in
%
% d and c should be mx1 each
% mt is model type: 'u' for unequal sensitivities and 'e' for equal sensitivities
global model_type
... |
8a7fcc822fbf58b4762e9354193b36dc0692dc21ce0bc489dc8bc38e02a819c4 | MATLAB | 2,587 | 53 | function [dmat4d_cropped,dmat3d_cropped_label] = cropping_images(mat4d_t2,ui8mat3d_mask)
%This function performs a cropping using the center of mass algorithm. Since method 2 uses a pixel
%wise curve fitting algorithm, cropping the scan reduces the computational load.
%Cropping is performed for both the T2 scan ... |
1e42c978a5f5b4331af4d383bdc0023f853f43971908726c5b507a1f508dde1b | MATLAB | 2,588 | 62 | %this function is used to create and save figures with set formats for
%paper, poster or PPT figures:
function figure_making(NameValueArgs)
arguments
NameValueArgs.operation char {mustBeMember(NameValueArgs.operation,{'create','save'})} = 'create'
NameValueArgs.format char {mustBeMember(NameValueA... |
86ab642d50504d7e5cff2689196c2b04a39359c1fb775719513b96be1fe929b8 | MATLAB | 2,589 | 70 | function [calibrationData] = createCalibrationData(EEG, EMG, labels, SR, epochLen)
% CREATECALIBRATIONDATA Calculate parameters for mixture z-scoring
% Zeke Barger 100119
%
% Arguments: (note that these are data, not paths to files)
% EEG - a 1-D matrix of EEG data
% EMG - a 1-D matrix of EMG data
% lab... |
b0a17193050c79a1f871acec70858d7714723ab25a170e5e77034a120e2a5338 | MATLAB | 2,590 | 54 |
clear all
close all
addpath('/Volumes/LASA/TBI_OpenNeuro/TBI_openneuro/Hopf_model/TBI_ON_Hopf_hc_tp2/outputs/Grange/');
addpath('/Volumes/LASA/TBI_OpenNeuro/Shared_code/TBI_ON_Lesions_Hopf_mask2SD_weight/')
addpath('/Volumes/LASA/TBI_OpenNeuro/TBI_openneuro/Hopf_model/TBI_ON_Lesions_Hopf_mask2SD_weight_corr/outputs/Gr... |
ba7a46f883b7a5e7726f02f8bc9697cb14cabf2bb14b56b3b761608fe7ce1bbe | MATLAB | 2,590 | 91 | function creates_info_table(data_folder, system, info_table_path,user_parse_filename_function)
fid = fopen(info_table_path,'w');
write_header(fid,user_parse_filename_function);
switch system
case 'Doric'
lookdown_Doric(data_folder, fid,user_parse_filename_function);
case 'RWD'
... |
a6dad77fbbd8ba7a21f95a480cc21879f8a4417554153a1b1e89c91bb5ce07cb | MATLAB | 2,591 | 90 | function [H0,Hm,HeI,HeS,Hstd,B] = XcJitter(t1,t2,binS,nbBins,varargin)
% [H0,Hm,HeI,HeS,Hstd,B] = XcJitter(t1,t2,binS,nbBins,'optionname',optionvalue)
% Computes jiterred cross-corr and returns an average and a intervalof
% confidence
%
% INPUT:
% t1,t2 : spike times in 10^-4 s
% binS: bins ~size (in ms)
%... |
b4bb0b7fe3d800e7fff0f7a957e147c6e274d6fb78eeed7f68ff0ecc4dd8dc93 | MATLAB | 2,592 | 55 |
clear all
close all
addpath('/Volumes/LASA/TBI_OpenNeuro/TBI_openneuro/Hopf_model/TBI_ON_Hopf_hc_tp2/outputs/Grange/');
addpath('/Volumes/LASA/TBI_OpenNeuro/TBI_openneuro/Hopf_model/TBI_ON_Lesions_Hopf_mask2SD_bin_corr/outputs/Grange');
addpath('/Volumes/LASA/TBI_OpenNeuro/Shared_code/TBI_ON_Lesions_Hopf_mask2SD_bin/'... |
3b5b51690508bc35f5a7887ca751b9b774cd90c9baa5b29b56cc8e7c238f71a4 | MATLAB | 2,593 | 94 | % tCFS_E1_figure2
% job=[];
% job.concatGFX= 1;
% job.plotPFX=0;
% job.plotGFX=0;
%% set up some directories.
% homedir = 'C:\Users\mdav0285\OneDrive - The University of Sydney (Staff)\Desktop\tracking-CFS';
homedir='/Users/matthewdavidson/Documents/GitHub/tCFS-ver1/'
cd(homedir)
cd(['DATA' filesep 'E1 mat f... |
aab5b213cd268cf0356546ed1d6126ba638ddd803a606b824406fea54422bcef | MATLAB | 2,593 | 96 | clear
[task_info,supPath] = loadDBAndSpecifyDataPaths('Vermis');
PROBABILITIES =[25,75];
req_params = reqParamsEffectSize("both");
lines = findCspkSspkPairs(task_info,req_params);
raster_params.time_before = 0;
raster_params.time_after = 800;
raster_params.smoothing_margins = 100;
raster_params.SD = 20;
compariso... |
9fd6d81451917d16097ee67676e1dbd7d9b12d39234fc96554a6d87062381ff8 | MATLAB | 2,594 | 92 | function PlotTracks(image,tracks,varargin)
a = unique(tracks(:,4));
time_list = tracks(:,3);
color_scheme = lines(length(a));
flag = 1;
if nargin == 3
close all
display_figure = imshow(image(:,:,1)); hold on;
% pause(5);
set(gcf, 'position', [200, 50, 1600, 900]);
vv = VideoWriter(varargin{1... |
80dc8d6b0ddc12d1e6b566cc9b9f38076058e7214eab1245c7b64caa854a76dc | MATLAB | 2,599 | 92 | function [h1, h2] = mlphint(net);
%MLPHINT Plot Hinton diagram for 2-layer feed-forward network.
%
% Description
%
% MLPHINT(NET) takes a network structure NET and plots the Hinton
% diagram comprised of two figure windows, one displaying the first-
% layer weights and biases, and one displaying the second-layer weight... |
0860110bede9ed9dbaefcee5de975572c60fb7ac310d1e40d6dcf023905b55aa | MATLAB | 2,603 | 86 | function vmp = bv_readvmp(fname)
% vmp = bv_readvmp(fname)
%
% :description
%
% Reads in a version 1 (BV 2000) or version 2 (BrainVoyager QX) VMP file.
%
% :inputs
%
% fname file to read, e.g. 'myvolstats.vmp'
%
% :outputs
%
% vmp vmp structure. List this function to see the field
% ... |
730f606b369ce1673aa740fe5bf1364fc1a9d88966b2c48ae33c4339e0c85025 | MATLAB | 2,605 | 84 | % generate masked images
% last update: October 26 2022
% Amirhossein Farzmahdi
clear
close all
clc
% add path
addpath(genpath('functions'))
images_dir = 'mat_files/';
% loading data
load (images_dir+"names.mat")
load(images_dir+"imgs.mat")
load(images_dir+"bw_masks.mat")
load(images_dir+"5000_masks.mat")
% setting... |
232540fb94ca529672befa81df5691fb00832eb47c301abceb436937d1a55871 | MATLAB | 2,611 | 99 | function [x, t, nin, nout, ndata] = datread(filename)
%DATREAD Read data from an ascii file.
%
% Description
%
% [X, T, NIN, NOUT, NDATA] = DATREAD(FILENAME) reads from the file
% FILENAME and returns a matrix X of input vectors, a matrix T of
% target vectors, and integers NIN, NOUT and NDATA specifying the
% number o... |
0232b53e9dc191acf34bf76ad1d7201535839c394fed4a56d1b81dee18535fe1 | MATLAB | 2,612 | 82 | % Accelerometer data preview
%
% Descriptions tba
%
% $Author: Peng Li, Ph.D.
% $Date: Oct 16, 2025
%
% +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
% (C) Peng Li 2019 -
% +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%
cla... |
4d51c777b57f6388d328633b0aaa2eabf5b0d9c910c059f3b2a2feb65ecf2ecc | MATLAB | 2,614 | 94 | % Preprocessing unit test
%
% csp
tol = 10e-10;
% Generate oscillatory data
cfg = [];
cfg.n_sample = 50;
cfg.n_channel = 16;
cfg.n_time_point = 512;
cfg.fs = 256;
cfg.n_narrow = 3;
cfg.freq = [1 2; 4 8; 8 12];
cfg.amplitude = [10 13 11];
cfg.narrow_class = [1 0; 0 1; 1 1];
cfg.narrow_weight = [];
[X, clabel] = simula... |
aa0d7b3cd256a522dc17261a7a61beef65563f5ce82f0be48d51b15d61ce2f56 | MATLAB | 2,619 | 86 | clear
[task_info,supPath] = loadDBAndSpecifyDataPaths('Vermis');
req_params.grade = 7;
req_params.cell_type = {'PC ss', 'PC cs', 'CRB','SNR','BG msn'};
req_params.task = 'choice';
req_params.num_trials = 70;
req_params.remove_question_marks = 1;
ts = -raster_params.time_before:raster_params.time_after;
lines = find... |
dfb6fe2c7cea19424050dbebee9aa85930626110a63267c4406b7428ff9ce074 | MATLAB | 2,619 | 82 | clear all;
addpath('/Volumes/LASA/TBI_OpenNeuro/TBI_openneuro/timeseries/inputs_sch1000/');
addpath('/Volumes/LASA/TBI_OpenNeuro/Shared_code/Hopf_TBI_ON/');
load schaefer_MK.mat;
load tseries_openneuro_controls_tp2_sch1000.mat; % Load your data
% Parameters of the data
TR=2; % Repetition Time (seconds)
NPARCELLS=1000... |
96335bb29cefb399ae9e2293f606baec4cd1bc7c09cf0c9e3098076f41a79332 | MATLAB | 2,621 | 82 | clear all;
addpath('/Volumes/LASA/TBI_OpenNeuro/TBI_openneuro/timeseries/inputs_sch1000/');
addpath('/Volumes/LASA/TBI_OpenNeuro/Shared_code/Hopf_TBI_ON/');
load schaefer_MK.mat;
load tseries_openneuro_controls_tp1_sch1000.mat; % Load your data
% Parameters of the data
TR=2; % Repetition Time (seconds)
NPARCELLS=1000... |
928d100c6bb21297b3b8a616d3914890e88e89949311af5efbfb6eeec167adca | MATLAB | 2,622 | 100 | %% eaxmple cells
figure;
raster_params.time_before = 399;
raster_params.time_after = 800;
raster_params.smoothing_margins = 100;
raster_params.SD =10;
raster_params.align_to = 'targetMovementOnset';
ts = -raster_params.time_before : raster_params.time_after;
angleAroundPD = [0,180];
col = {'m','c'};
data = importdata... |
9abcdb8f0a28016b7ac3a57c0e76f53871e59a24d08ab839577c16bdddd42dc7 | MATLAB | 2,623 | 80 | % function r = correlmat(x,y)
%
% Custom made correlation function, faster than Matlab versions, but less
% general (e.g. cannot deal with complex data). Returns correlation
% matrices of either one input matrix or of several input matrices
% (columnwise). If you don't have bsxfun (prior to Matlab 7.4), please
% ... |
cb31667e013d3092d137f4599d6af1c4cbf9c1ea26a63599e56b6cb6c3a86811 | MATLAB | 2,624 | 95 | function [Ty,diff,p]=yueneeg(a,b,percent,alpha)
% function [Ty,diff,p]=yueneeg(a,b,percent,alpha)
%
% Computes Ty (Yuen's T statistic).
% Ty=(tma-tmb) / sqrt(da+db), where tma & tmb are trimmed means of a & b,
% and da & db are yuen's estimate of the standard errors of tma & tmb.
% Ty is distributed approximately as S... |
ed23b2bfa91698946ec210220993e7bab7419c3e4f049b81f5e91956106e4c9f | MATLAB | 2,625 | 104 | clear all
close all
%%
% check the miss
% process the strings to get AAL in front
% run fslmerge from here
% list of dti stuies to exclude
dtistudies={
'P18' % there would be also study P13 but we keep it since it has fMRI results
'P19'
'P20'
'P21'
'P22'
'P40'
'P48'
'P49'
'P50'
'P59'
'P71'
'S03'
'S04'
'S18'
'P62'
'... |
8a903a8ee4b1e8321f6573bc5cd245224309ef6166b78eb815b8fb47a5fc8f41 | MATLAB | 2,626 | 81 | clear
[task_info,supPath] = loadDBAndSpecifyDataPaths('Vermis');
cell_type = {'PC ss','PC cs', 'CRB','SNR', 'BG msn'};
BIN_SIZE = 100;
req_params.grade = 7;
cell_type = {'PC ss','PC cs', 'CRB','SNR', 'BG msn'};
req_params.task = 'saccade_8_dir_75and25|pursuit_8_dir_75and25';
req_params.num_trials = 100;
req_params.re... |
cd55105be83520487b3e6c9d0367c6c080b135ca94745108cfa6040d98084f54 | MATLAB | 2,626 | 76 | function [recon_energy, recon_FC_r]= CC_moran_signals(U,signals,n_null)
% =========================================================================
% Generate 1000 permuted functional activity by Moran_randomization
% the raw rs-fMRI time series across brain regions further calculate reconstruction accuracy
% =... |
761d33c27893f7d2d1ea19ea0e685e5c47a79ce41d8d01de74293b9dbf97a623 | MATLAB | 2,627 | 60 | %% Section 1. Single round 2P uncaging data WT, Receptor Antagonist and Laser
% Uncaging Control
start_dir = pwd;
ramping_dir = 'G:\Michelle_Event_Detection\EventDet_2PGABAGluUncSameCell_localnet_Cx43fl\PostEvtDet\WTCX43CBX_FullDatasets\ramping_2022-02-25_14-44-10';
% file_names = {'ramping_2021-05-24_002_Control.c... |
6c655635fc5875425e9add86ad8edb878ec3e97f334977620ae4b5eba5e9ccdc | MATLAB | 2,632 | 78 | function mr_montage(vol,slices,method,croprect)
% creates a montage image for the slices specified in the slices vector
% License:
%=====================================================================
%
% This is part of the Princeton MVPA toolbox, released under
% the GPL. See http://www.csbmb.princeton.edu/mvpa fo... |
377a4d2838eaf2a53c6744f0c80adc20ac7ee1c15edf993a0aface2c144737f2 | MATLAB | 2,633 | 65 | function plot_hist_deviation(performance, id, meth, save_flag)
% _
% This function is written to plot the deviation (theta = physical stimulus
% direction - recorded response) of responses from the presented motion
% direction for every stimulus and coherence pooled over all subjects
%
% IN: performance: structr... |
48346aadca320516a67476ca36c438873699767382d7ccf62e4005254cfe4185 | MATLAB | 2,633 | 96 |
%% Add path
addpath(genpath('../../Ionnic Channel'),genpath('../../Tools'), genpath('../../Synapses'), genpath('../../Datas'));
%% Import data from neuron (FS)
dt = 0.01;
Vmem = -90:dt:60;
l_V = length(Vmem);
%% Matrix Initialization
pinf = zeros(1, l_V);
taup ... |
c1a872af1e00abb20996e8697c1f71ab771c0ba0090813e56bf0e3cf1111ed3d | MATLAB | 2,634 | 89 | % Classifier unit test
%
% Classifier: ensemble
rng(42)
tol = 10e-10;
% Random data
X = randn(1000,100);
clabel = randi(2, size(X,1),1);
%% ensemble with 1 learner should be identical to testing the classifier directly [two-class LDA]
cfg = [];
cfg.feedback = 0;
cfg.classifier = 'ensemble';
cfg.hyperpara... |
e10a545c8da40cb4155413ab1a2a9a0c8940c63ced4674952fc4feb0cd327991 | MATLAB | 2,634 | 77 | function pp_surfacerender(sub_id, p)
% function pp_surfacerender(sub_id, p)
%
% Creates a 3-D rendered image of the cortical surface based on the white-
% and grey-matter tissue probability maps generated via pp_segment.m
% (prefix 'c'). Rendered images are produced with SPM and converted into
% 3-D printable .stl for... |
06bbde69fdecb7865eeb9d7cb67d7eab63aec020268bd191950c5e52d48190ef | MATLAB | 2,638 | 84 | function [h_test,p_test,ci_test,stats_test, percent_diff]=unpaired_ttest_spikes_211130(table1,table2,table1_duration,table2_duration)
%go by subregion
%ensure table 1 and 2 have the same number of subregions
subregions_table1=unique(table1{1}.Subregion,'stable');
subregions_table2=unique(table2{1}.Subregion,'stable');... |
cce7a2e0d35051eb7d5d6185a9d62f0fc9e439d944e891e0d464efb95728539e | MATLAB | 2,642 | 79 | function [gamma_fit, gamma_range] = fitGammaRange_fromDmin(dur_bins, ave_sizes, d_min)
% Function for adaptively fitting the size ~ duration scaling curve
% Input strut x_reps_str is loaded from the results directory; provide the
% desired parameter values through eta_val, eps_val, tau_val, and
% rep_string. x_reps_str... |
ec655aeb793e682924514123bcea4b637ce1a7196584c04a8e69bf2424e4c081 | MATLAB | 2,643 | 81 | function output = BaseEvalMain_web_pt_fn(UsedSets, dataPaths, resultsPaths)
%BaseEvalMain_web_pt_fn - Description
%
% Syntax: output = BaseEvalMain_web_pt_fn(input)
%
% Long description
% clear all
% close all
format compact
clc
% script to calculate distances have been measured for all included s... |
04444660a81f41496741e00a3cb5677b81f0eb4b69ee45ea040b1e3164ff3dcc | MATLAB | 2,644 | 84 | % run after @DirectDistanceDataAugmentationTypeComparison
Ids = any(DepthTypeProb>0.25, 2);
A = distprob(nBC+1:end, 1:nBC);
A = A(Ids, :);
A = A(:, :);
B = DepthTypeProb(Ids, dtypes);
B = B(:, :);
C = B.*A;
C = C./max(C, [], 2);
[d, D] = max(B.*A, [], 2);
D = dtypes(D);
D(d > maxx) = 8;
[~, sids] = sort(D, ... |
52c0c72a4da6656a51d99ffce51b8d44caf72a53839f68034f8547b9d1d5d95f | MATLAB | 2,644 | 78 | %This script scans an patterns OCT Volume. Uses multiple depths to extend depth of focus
%I assume that prior to running this script, user placed focuse at the top
%of the tissue.
clear;
currentFileFolder = [fileparts(mfilename('fullpath')) '\'];
%Line placement (vertical - up/down, horizontal - left/right)
vLi... |
d126facb80b36829c69528158b3234e672b27cebbe2fa9addbf068b4bd87dbda | MATLAB | 2,644 | 78 | function [sigO, Rsquare, failflag] = AssembleClipbyQuality(sigI, clipids, method)
if nargin == 2
method = 'top';
end
assert(size(sigI, 2) == length(clipids))
clips = unique(clipids);
nclip = length(clips);
nrepeat = size(sigI, 1);
if nrepeat == 1
sigO = sigI;
Rsquare = nan;
return
end
if... |
f3597b7d860149ec0da5419ea2ca356559aa95a9096dc10fe4971c863657df17 | MATLAB | 2,647 | 74 | function vidObj = msCleanSegments(vidObj,corrThresh,distThresh,overlapThresh)
%MSCLEANSEGMENTS Summary of this function goes here
% Detailed explanation goes here
% vidObj.corrThresh = corrThresh;
vidObj.distThresh = distThresh;
vidObj.overlapThresh = overlapThresh;
vidObj.originalSegments = vidObj.se... |
07529311cf18cd7176130d43822c3df939116c067015231cada120375e137f2c | MATLAB | 2,649 | 80 | N = 300:100:1000;
replicates = 10;
iter = 200;
newtonIter = 100;
sparsity = 0.01;
SRtarget = 0.95;
residualTresh = 1e-6;
timeIter = zeros(length(N), replicates);
timeNewton = zeros(length(N), replicates);
stepConvergedIter = zeros(length(N), replicates);
stepConvergedNewton = zeros(length(N), replicates);
breakOnConv... |
9f1aaf3ff1da13bdbdde7024c529fa758424265ba66e8dc53ea0913b6fa4688e | MATLAB | 2,651 | 58 | % this script changes the voxel size and keeps the bounding box of images
% (you can change the bounding box easily too)
%
% it creates all result files in a new directory
%
% this can be use for all images, including T1 etc.
%
% For the special case that you want to change the resolution of beta
% images in a ... |
8cd5ca6456eeb0445c117a5d833c9d1acb1182fcb962ed7addfb390bc189e9b7 | MATLAB | 2,652 | 68 | function display_results_registration2d(moving,fixed,...
displacementField,originalSize,gamma)
% DISPLAY_RESULTS_REGISTRATION2D Displays registration results for 2D
%
% display_results_registration3d(moving,fixed,displacementField,originalSize,gamma)
%
% INPUT ARGUMENTS
% moving - Moving image
% fixe... |
cb91a85fd67bf4db332505c6da7e0755da2bbac6d0b2ecdaf539a7a0e8e582f6 | MATLAB | 2,652 | 88 | function [confmat] = confusion(guesses,desireds,varargin)
% [CONFMAT] = CONFUSION(GUESSES,DESIREDS, ...)
%
% Calculates the confusion matrix for your conditions, i.e. the
% number of times it guessed blah when it should have guessed bloo
%
% This script will output the distribution of guesses for each
% condition. Thi... |
d36dcffc6fdf8942b1ea47f56c9ad523d01f167ff41d7ded9a5ca0212276d918 | MATLAB | 2,655 | 130 | function parameter_value = get_parameter(theta, ang, sessions, param, ctab)
% computes parameter value specified in 'param' from theta
cnt=0;
for iSess = sessions
cnt=cnt+1;
if iSess == 1
parameter_value(cnt,:)=get_par_helper(theta{iSess}(1,:),ang,param,ctab{iSess});
else
parameter_value(c... |
cd2b93f381109920b54926b5a9e57c2bd9f36f4278af146cb6f3937289234ce5 | MATLAB | 2,657 | 76 | function [confmat guesses desireds] = multiple_iterations_confusion(results,varargin)
% [CONFMAT GUESSES DESIREDS] = MULTIPLE_ITERATIONS_CONFUSION(RESULTS,...)
%
% Loops over the iterations in results, concatenating the
% results.iterations(i).perfmet.desireds and guesses, and then
% feeds in the concatenated versions... |
e7fa750664c278b2ad6dc9ef5c9270f3f61b1013d458a982985bf4f9fcc902a1 | MATLAB | 2,657 | 102 | function [H,E] = calculateHERef(I)
% Calculates H&E color vectors (HERef) for the input image I
%
% Input:
% I - RGB input image, to calculate HERef for;
%
% Function variables:
% Io - (optional) transmitted light intensity (default: 240);
% beta1 - (optional) OD threshold for transparent p... |
b5dede7e144ae3104fd95709c8e71d63d62fcb470a5b429102a9f21d757dcf2f | MATLAB | 2,660 | 95 | function [thetaMod,thetaPh,thetaTrghs,thetaPks,goodEp] = OscillationPhase_Theta(lfp,S,ep)
% [thetaMod,thetaPh,thetaTrghs,thetaPks] = ThetaPhase(fbasename,channel,ep)
% optional:
% [thetaMod,thetaPh,thetaTrghs,thetaPks] = ThetaPhase(fbasename,channel,ep,folder)
% to indicate another folder where the lfp file is located... |
be49d17a25b1d54137562e4352a024aa50a916d502eeb52b95f24aade9c3dd89 | MATLAB | 2,660 | 83 | function [connmat] = vol2connmat(source, conndef)
% VOL2CONNMAT creates the matrix containing the voxel
% neighbourhood structure.
% Use as [connmat] = vol2connmat(source, conndef)
% source should contain the fields dim and inside
% supported values for conndef are 6 (default), 18 and 26
% otherwise conndef is interpr... |
b985e23cf02313d51d02dbd467e4342643f101e1d1ab6f903a1f83b4119e95e3 | MATLAB | 2,661 | 73 | function matmap = bv_makematmap(flat_srf,smp_map_data)
% matmap = bv_makematmap(flat_srf,smp_map_data)
%
% :description
%
% Creates a 2D matrix containing a map from an SMP file.
% An SMP contains its map in a 1D vector, so making a 2D
% matrix requires information about the 2D position of
% each value in the flat map.... |
71a6854cda322c59390999fa4ec94142235a7411131aa1f617d974677375cf05 | MATLAB | 2,662 | 81 | function [pm,pd,dx,dy] = ...
phase_gradient_complex_multiplication( xph, pixel_spacing, varargin )
% *WAVE*
%
% PHASE GRADIENT COMPLEX MULTIPLICATION take the gradient of the phase maps,
% returning datacubes of direction
% ... |
dbe2849ecc01789d711b05df474076380d298acd325aad4a1ca983a1bfd11d94 | MATLAB | 2,662 | 116 | function [bases, param] = makeSmoothTemporalBasisCosLog(duration, n_bases, dt, ...
coverage, delay, log_scale, norm_on, plot_on)
%
% Input
% duration: the time that needs to be covered
% n_bases: number of basis vectors to fill the duration
% dt : time step
% coverage: density of coverage (2 is usually goo... |
467f4939e43dac109b2cc4a33550efa77fdaa4748006a2c3f7a9d477c70814d2 | MATLAB | 2,664 | 89 | % fix_preprocess_dimensions unit test
%
rng(42)
tol = 10e-10;
% Random data
N = 100;
X = randn(N,40);
clabel = randi(2, N, 1);
cfg = [];
cfg.preprocess = {};
cfg.preprocess_param = {};
oversample_param = mv_get_preprocess_param('oversample');
undersample_param = mv_get_preprocess_param('undersample');
zscore_param ... |
3836dafdf0b44fa5f645ebef0a5582e82ba413ed9f2aaaa88d0a14353c30cbfc | MATLAB | 2,666 | 92 | function [component_r,permutation_P,weight_img_r,weight_img_p,weight_beh_r,weight_beh_p,cca_output]=CCA_img_beh_jin(img_path,beh_path,component_num,cov_path,pca_ind,pca_percentage,perm_time,perm_pfwer,cca_output_path)
%% loading data
c = fix(clock);
disp('===============================================================... |
c9dac55b5fdf59abcfc34ea816a5e92d7f2fe6005056f01ff85acff24b5ac69f | MATLAB | 2,668 | 86 | %
% [Sout,SNout] = Sout_vsh_ctf_fast(r_sphere,R,EX,EY,EZ,Lout)
%
% Calculate the external SSS basis Sout for a CTF system
% using vector spherical harmonics
%
function [Sout,SNout] = Sout_vsh_ctf_fast(r_sphere,R,EX,EY,EZ,Lout)
% Copyright (c) 2016, Elekta Oy
% ---------------------------------------
%
% Redistributio... |
59b259a6f673dc62d4dcf539f7b583b6d35fee3b3a2936678894c46af9d6daae | MATLAB | 2,671 | 88 | N = 300:100:1000;
%N = [200];
replicates = 10;
iter = 100;
newtonIter = 10;
sparsity = 0.01;
SRtarget = 0.95;
residualTresh = 1e-6;
solutionMatchTresh = 1e-3;
timeIter = zeros(length(N), replicates);
timeLinsolve = zeros(length(N), replicates);
stepConvergedIter = zeros(length(N), replicates);
for i = 1:length(N)
... |
187b3b84a917ffe59888768a4b84ddc380e08ec6bf0913dedd116786861a1d56 | MATLAB | 2,677 | 111 | function [out]=logRegFun(y,x,lambda,tol,maxrounds)
% Generic IRLS logistic regression algorithm.
%
% [OUT] = logRegFun(y, x, lambda, [tol, maxrounds])
%
% input:
%
% y--(1,nSamps) vector of binary outcomes (0 1);
% x--(nFeat,nSamps) matrix of feature values (real numbers), one
% feature vector for each sample
% ... |
2e23966dd9d0eaa17cdf7ee30137a4637e9c8d0aa9439486bb76a8b24e904791 | MATLAB | 2,677 | 87 | % USAGE
%
% data = Make_MeanWaveF_FromDat(filename,<options>)
%
% filename file to read
% <options> optional list of property-value pairs (see table below)
%
% =========================================================================
% Properties Values
% ------------------------------... |
e71c417469728e80389412dbf6c279c79fc007a1d0a0c9a118ecb8077c6d9f61 | MATLAB | 2,677 | 79 | function [displacement] = transformation2displacement(transformationMatrix, imSize)
% TRANSFORMATION2DISPLACEMENT Converts a transformation matrix to a displacement field
%
% [displacement] = transformation2displacement(transformationMatrix, imSize)
%
% INPUT ARGUMENTS
% transformationMatrix - Transformation to conver... |
f8dfdca301b6c1671d131228df857b1aae4050b165bece3f4565841b6caf21b7 | MATLAB | 2,679 | 86 | %
% A simple matlab function to load from the .clu and .res files the vectors G and T
% from many electrodes
% Usage: [T,G,Map,Par]=LoadCluRes(FileBase,ElGpsToLoad, ClusToLoad)
% Enter the FileBase without the extension .clu or .res
% ElGpsToLoad - list of electrode groups to load (load them all by default)
% ClusToLo... |
e5d0291cb1819b6181a935066f90d50803c708a8e9d69909985e6b07c924dc4d | MATLAB | 2,680 | 83 | %
% [Sin,SNin] = Sin_vsh_ctf_fast(r_sphere,R,EX,EY,EZ,Lin)
%
% Calculate the internal SSS basis Sin for a CTF system
% using vector spherical harmonics
%
function [Sin,SNin] = Sin_vsh_ctf_fast(r_sphere,R,EX,EY,EZ,Lin)
% Copyright (c) 2016, Elekta Oy
% ---------------------------------------
%
% Redistribution and use... |
1ffc11b18445f09312f2733f7a52323b367bf068c8ea0d44856ff79b3b5aff5b | MATLAB | 2,682 | 61 |
clear all
close all
outdir_HC='/Volumes/LASA/TBI_OpenNeuro/TBI_openneuro/Hopf_model/TBI_homogeneous/outputs/Grange/HC/';
outdir_TBI='/Volumes/LASA/TBI_OpenNeuro/TBI_openneuro/Hopf_model/TBI_homogeneous/outputs/Grange/TBI/';
addpath('/Volumes/LASA/TBI_OpenNeuro/Shared_code/Hopf_TBI_ON/helper_functions/'); %code_path
ad... |
3e11005f6ffb9d5bc429ebde2d1beb6449a109fdfdff284fcea741fe87ff0870 | MATLAB | 2,682 | 94 | function [perfmet] = perfmet_maxclass_ignore_rest(acts,targs,scratchpad,varargin)
% Like PERFMET_MAXCLASS but ignores rest timepoints.
%
% [PERFMET] = PERFMET_MAXCLASS_IGNORE_REST(ACTS,TARGS,SCRATCHPAD,...)
%
% Standard PERFMEX_MAXCLASS considers a guess to be correct
% if its maximally active row (the unit that it gu... |
618a963a2107b554eb18c846a0771cf383666f6c4d7b33ee5c724d9ec2b47c24 | MATLAB | 2,682 | 61 |
clear all
close all
outdir_HC='/Volumes/LASA/TBI_OpenNeuro/TBI_openneuro/Hopf_model/TBI_ON_Hopf_hc_tp2/outputs/Grange/';
outdir_TBI='/Volumes/LASA/TBI_OpenNeuro/TBI_openneuro/Hopf_model/TBI_homogeneous/outputs/Grange/TBI/';
addpath('/Volumes/LASA/TBI_OpenNeuro/Shared_code/Hopf_TBI_ON/helper_functions/'); %code_path
ad... |
1f217795280a44bdeb09a41a3385b845b0e7a8facdc13c69985e126ccbad8d73 | MATLAB | 2,685 | 41 | close all;clear;clc;
addpath('\\storage1.ris.wustl.edu\kerschensteinerd\Active\Emily\BasicFunctions\OpenSource');
figure('Name','sankey demo4_1','Units','normalized','Position',[.05,.2,.5,.56])
% (Unequal inflow and outflow data)
links={'Injected at P4-P6(378 mice)','dead before imaging',0.35;
'Injected at ... |
83006d9c6e4fe7fbad70b552d478f84a61476b5fccd852d74a281e7c7e84456e | MATLAB | 2,686 | 57 | function [anterdir,posterdir,dorsaldir,ventraldir,leftdir,rightdir]=apdvlr_axes(coords,guess,scale_factor,str,ant_dx, normal_vector,chosen_point)
midpoint=mean(coords,1,'omitnan')';
[coefs,~]=pca(coords);
dorsaldir_counter=0;
for i=guess(:)'
% dorsaldir_counter=dorsaldir_counter+dot(midpoint,coefs(:,2))-dot(co... |
5756e578efee2bddd535790e362e3b775310c9c5cf5f11295e416309291672fb | MATLAB | 2,692 | 95 | function fig = plot_dff_fragments(step1, step2)
i1 = step2.i1;
i2 = step2.i2;
D = step2.D;
x = step2.x;
mean_frag_raw = step2.dff_PETA.matrix_mean;
std_frag_raw = step2.dff_PETA.matrix_std;
mean_frag_zscore = step2.dff_PETA.z_mean;
std_frag_zscore = step2.dff_PETA.z_std;
zscored = s... |
78fb85eaac131382b3b7eab4813bd704939426be5ec249234968a2d1282af7d2 | MATLAB | 2,692 | 112 | clear
[task_info,supPath,MaestroPath] = loadDBAndSpecifyDataPaths('Vermis');
TASK= "both";
MONKEY = "both";
EPOCH = 'reward';
req_params = reqParamsEffectSize(TASK,MONKEY);
windowEvent = 0:500;
lines = findLinesInDB(task_info,req_params);
cells = findPathsToCells (supPath,task_info,lines);
cellType = cell(length(... |
c6a64e91f3ef634273994e01a8f66ca80c2b4d71a13bb94a181c4a8a957571f6 | MATLAB | 2,700 | 100 | %% Behavior figure
clear
[task_info,supPath,MaestroPath] = ...
loadDBAndSpecifyDataPaths('Vermis');
TASK = "both";
req_params = reqParamsEffectSize(TASK);
prob = [25, 75];
lines = findLinesInDB (task_info, req_params);
cells = findPathsToCells (supPath,task_info,lines);
timeFailRelativeToMotion = cell(length(... |
570d2e797a500adb0e040ecc941045d3cf7a0787e0b169ba1cc533c0324479fe | MATLAB | 2,701 | 98 | % Classifier unit test
%
% Classifier: svm
rng(42) %% do not change - might affect the results
tol = 10e-10;
mf = mfilename;
%% check classifier on multi-class spiral data: linear classifier should near chance, RBF kernel should be near 100%
% Create spiral data
N = 500;
nrevolutions = 2; % how often each cl... |
5609210a6dea53d62581cdff26840a6bc751943acd7cfd5b715df5cc80306720 | MATLAB | 2,705 | 73 | function [spon_areas]=reorganize_NMI_outputs_210905(channel_pairs, spon_areas,if_cw,parent_dir)
spon_areas_organized=channel_pairs;
for i=1:length(spon_areas)
if if_cw(i)
channel_pairs=load(strcat(parent_dir,"\","matching_table_cw.mat"));
channel_pairs=table2cell(channel_pairs.matching_table);... |
eebe69fde9e78c50fd7282dc5774d9af7f792659d322b7152d67e4509e005aba | MATLAB | 2,708 | 121 | function SID = load_imetronic_data(filepath)
SID(1).name = 'LIGHT';
SID(1).num(1).name = 'HLED';
SID(1).num(2).name = 'LED1';
SID(1).num(3).name = 'LED2';
SID(1).num(4).name = 'LED3';
SID(1).num(5).name = 'LED4';
SID(1).num(6).name = 'LED5';
SID(1).num(7).name = 'LED6';
SID(2).name = 'LEVIER';
SID(2).num(1).name = 'L... |
6190c2705fb983ccef0c7d9725615dfb4ea54250ed9ab23ed443197264ab9be9 | MATLAB | 2,709 | 57 | %% Identifying responding uncaging cells for Fig 2
% List the indices of tseries in each condition in which the uncaging cell was a "responder"
% "responder" cells are any cells with post-stim dFF values 3std above baseline
% From 'dFF_Responders_MC20220908.m'
%
% *note that this is a different designation for... |
fa091fd7d5f8dabbef14f28078a2d6c17c9a49cfe657eabb35ab8c97cab3444b | MATLAB | 2,709 | 78 | function [him h] = imagetxt(X, varargin)
% IMAGETXT - Plots an image with numbers in each square.
%
% Usage:
%
% [hIM hText] = imagetxt(X, ...)
%
% IMAGETXT plots a given matrix X using IMAGESC, but then
% additionally plots text objects in the center of each pixel. This
% is useful for plotting correlation maps, in w... |
23dc8e7a69b5959564bebfea15c401bd096d095920039c38521e6b1291f3c343 | MATLAB | 2,712 | 103 | function CopyDat(fnameIn,fnameOut,varargin)
% USAGE
% CopyDat(fnameIn,fnameOut,'optionNames',optionalues)
% copy a given number of seconds of data from one dat file into another one
%
% INPUT
% - fnameIn : source file
% - fnameOIut : target file
% options:
% - 'duration' : duration ... |
b424e4c89ab447a8d615a28d1e642ab76ffdd0351e622f1fdff2a79362f2b43e | MATLAB | 2,712 | 74 | %This analysis code was used in:
%Mares I, Ewing L, Papasavva E, Ducrocq E, Smith FW, Smith MLS (in press).
%Face recognition ability is manifest in early dynamic decoding of face-orientation
%selectivity – evidence from multi-variate pattern analysis of the neural
%response. Cortex.
%The code was originally created b... |
a82318d96ab4cf2e0e751fc0d67b59e90804e38a612199888c28a4cbc1159d5d | MATLAB | 2,716 | 94 | % Probability Tuning curves
supPath = 'C:\noga\TD complex spike analysis\Data\albert\pursuit_8_dir_75and25';
load ('C:\noga\TD complex spike analysis\task_info');
req_params.grade = 7;
req_params.cell_type = 'CRB';
req_params.task = 'pursuit_8_dir_75and25';
req_params.ID = 4000:5000;
req_params.num_trials = 50;
req_pa... |
e0f5d753289334726c50342d7d206adf4e4d62ff5ae9c713da7223015386ef1d | MATLAB | 2,718 | 103 | function L = CrossValidationSpatialCheck_HDInfo_Cells(S,lambda,X,Y,ep,ang,angHisto,B,varargin)
nbEp = 10;
dispBar = 1;
binSize = 0.5; %in cms
nbRand = 10;
exDisp = 0;
if ~isempty(varargin)
exDisp = 1;
end
epV = regIntervals(ep,nbEp);
L = NaN(nbEp,length(S),nbRand);
aep = Restrict(ang,ep);
da = Data(aep);
... |
40ee34edb64e85e35b72891f28f1b9eff198d763b674e5d5fb182b95e5ccdcd7 | MATLAB | 2,721 | 86 | function FindHDCells_Motive(varargin)
% This function computes some Head Direction cell statistics
% Must be launched from the folder containing data
% Folder must have the same name as position file basename.
% Written for Motive.
% Adrien Peyrache 2012-2018
load('Analysis/SpikeData.mat','S');
nbC = length(S);
if ... |
c038981c13cbd6f6957c224ef12a5ae43ac38c31b4f2049d0e4abea56c364abd | MATLAB | 2,721 | 88 | function [cmds, errs, msgs] = gitSubmodulesInit(repo, options, preview)
cmds = {};
currdir = pwd;
if ~exist('repo','var') || isempty(repo)
repo = [pwd, '/'];
end
if ~exist('options','var')
options = 'init';
end
if ~exist('preview','var')
preview = false;
end
repoFull = filesepStandard_startup(repo,'full'... |
10eaa9ef83d44f5f832cb7976bdd72c59055cbdcdee9d95bc1b076fc4a3063af | MATLAB | 2,722 | 85 | function [sigma,shrinkage]=cov1para(x,shrink)
% function sigma=cov1para(x)
% x (t*n): t iid observations on n random variables
% sigma (n*n): invertible covariance matrix estimator
%
% Shrinks towards one-parameter matrix:
% all variances are the same
% all covariances are zero
% if shrink is specified,... |
d69813745f389f5e8e70055613dd772e8aa29bea11d0f27008e811d1ecf65e5a | MATLAB | 2,722 | 72 | function output = ComputeStat_web_pt_fn(UsedSets, dataPaths, resultsPaths)
format compact
% script to calculate the statistics for each scan given this will currently only run if distances have been measured
% for all included scans (UsedSets)
MaxDist=20; %outlier thresshold of 20 mm
time=clock;t... |
d1c3a5547b6bd045e6c8e643498ff4e5e14a569731ca964bd3f515c83d483025 | MATLAB | 2,723 | 79 | MaestroPath = 'C:\Users\Owner\Desktop\DATA\albert\';
supPath = 'C:\noga\TD complex spike analysis\Data\albert\pursuit_8_dir_75and25';
load ('C:\noga\TD complex spike analysis\task_info');
req_params.grade = 10;
req_params.cell_type = 'CRB|PC';
req_params.task = 'pursuit_8_dir_75and25';
req_params.ID = 4000:5000;
req_p... |
58ad7c4e690b0097e20b257c9f7ccc95e76cf51b5651b581afaa487e03ebb4a3 | MATLAB | 2,726 | 103 | % colorednoise pink/red/blue/violet noise
%
% y = colorednoise( N, color )
%
% N - number of samples to be returned in row vector
% color - {'pink'}, i.e. 1/f. alternatives include 1/f^2 (red), f (blue), and f^2 (violet).
% y - row vector of colored noise samples
%
% The function generates a sequence of colored no... |
9ed39f94ecbbb361b6af16abbf8cba0c14ffe9e605f43e14f5d3b98bab613061 | MATLAB | 2,726 | 102 |
%% Add path
addpath(genpath('../../Ionnic Channel'),genpath('../../Tools'), genpath('../../Synapses'), genpath('../../Datas'));
%% Import data from neuron (FS)
dt = 0.01;
Vmem = -900:dt:50;
l_V = length(Vmem);
%% Matrix Initialization
uinf = zeros(1, l_V);
tauu ... |
670f57552f66d828e7192e84236c07cd2c3fcf1fd9c5c9436043dd41d02c2505 | MATLAB | 2,727 | 69 | function cf = train_naive_bayes(param, X, clabel)
% Trains a Gaussian Naive Bayes classifier.
%
% Usage:
% cf = train_naive_bayes(param, X, clabel)
%
%Parameters:
% X - [samples x features] matrix of training samples or
% [samples x ... x ... x features] matrix with additional
% ... |
ef13c988cf19d4df2d7c6bfdba683901a92521b4723554835d80e9b30157fe0f | MATLAB | 2,727 | 89 | %This analysis code was used in:
%Mares I, Ewing L, Papasavva E, Ducrocq E, Smith FW, Smith MLS (in press).
%Face recognition ability is manifest in early dynamic decoding of face-orientation
%selectivity – evidence from multi-variate pattern analysis of the neural
%response. Cortex.
%The code was originally created b... |
033869c92583d6be152cf8f56e8e5696efb467867cc00700931ae62a2a2ad77b | MATLAB | 2,731 | 82 | function [combined_table]=combine_similar_times_210726(table)
%7/26/21 changed from 0.05 change in conduction time to 0.10
if all(~ismember({'Subregion','Electrode Pairs','Spike Area','Conduction Time','Unit Pairs','Direction'}, table.Properties.VariableNames))
error('This table does not have the appropriate vari... |
1690277b3beb859e3c1228cccfbf47e1547d53ab6eaffccb8597c319dd2ac70d | MATLAB | 2,733 | 93 | % split into single and multi groups.
% new. Use trials from dcNew var
% For sbj 12 and after
function plotPerformanceBarChartROINames(sbjNum,perfVar,tInd,featureName,saveOp,sortOp,maxTOp)
figSaveDir = ['C:\Users\mn0mn\Documents\ResearchProjects\spatailAttentionProject\ProcessedDatafNIRS\Experiment' num2str(sbjNum)... |
ecaa980e37a417a56fbac9347f4cc2127bd390e450b88efc1b179e3b4af8b89a | MATLAB | 2,733 | 74 | %% Plot PC activity during VORD and cancellation
function fH_traces = plotCancSplitTrace(I, K1, K2, K0)
% Plot inputs to PC during a step of cancellation stim
% Parameters
% split_target_retina = 1; % plot target and retinal slip separately or not?
learnStr = {'Low', 'Normal','High'};
Psource = [];
T_smooth = 0... |
64582e7f44f7b051a35b8fe1236ce8e01e2aac0ccf979122798479924adcb3ba | MATLAB | 2,735 | 83 | %% TENTH
% Create a table that will mean the EC activation across iterations and
% fold
%% Set Up the environment
clear all
clc
pmDataPath='/Users/federica/data/GridMagination/3Iso/Script/00_pm_data';
addpath(pmDataPath)
% Subject List
global data
data=pm_data_GridMagination_CONT(0); % pm_data_GridMagination_EB(... |
ba59559d8e1e20ef37c63253441ca4b033bcdb7ec3c256d6e2c5e61de1a2d589 | MATLAB | 2,745 | 75 | function export = export_data(p)
data = [];
names = {};
%%% Load reconstruction data %%%
% Get relevant variables from 'p'
delay = p.psvr.delay;
% For each label...
for l = 1:numel(p.psvr.all_labels)
p.psvr.label = p.psvr.all_labels{l};
% Load results
stats_file = dir(fullfile(p.dirs.data, 'analysis',... |
09fd225d65bdcf5a3ed94f611f6594d8a595ec923ef096423c7631062459e9c3 | MATLAB | 2,748 | 84 | function histologyInstructionsToStackConfig(subjectPath)
% This function converts histology instructions to stack config.
% Written at Jan 10, 2020.
%%
%sp = s3GetAllSubjectsInLib();
%subjectPath = sp{1};
deleteOriginalFileWhenDone = true;
%% Figure out if this subject has the older version of histology i... |
c9c9634723fae6f2d959e85cb6f8ecba135ba39d35e8a02cd0ad8917472053c8 | MATLAB | 2,748 | 61 | % rsquared_phantom
clear all;close all
[sig_out,topographies] = roi_tsss('zero',1);
[sig_out2,topographies2] = roi_tsss('five',1);
[sig_out3,topographies3] = roi_tsss('twenty',1);
[sig_out4,topographies4] = roi_tsss('onethirty',1);
%%
error_stan_5 = mean(mean((topographies2.nil - topographies.nil).^2,2));
err... |
5f028a52d49fb0d0eebaf049742ceef86c62f376eaa91f6a8c7020e33a40df5b | MATLAB | 2,752 | 86 | % Script to generate and save look-up table for the Hurwitz zeta functions
%%%%%% 2022-01-18 versions
% a_min = 1.6;
% a_max = 2.5;
% a_res = 0.005;
% grid_a_vals = a_min:a_res:a_max;
%
% % cdf_Paxm = hurwitzZeta(a_hat, x_vals)/hurwitzZeta(a_hat, x_min);
% grid_x_vals = [1:99 unique(round(logspace(2, 4, 101)))];
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.