sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
2bd6416e0eed9b138232cd5fc95d631eec9611a0500a942f51d1aab5a7c555b0 | MATLAB | 1,315 | 42 | function [cROIs, Cs, cROIs_BG, Cs_BG, coherence, skew, sz, patchID, tElapsed, dimensions] = mcb_DNMF(paths_to_videos, options)
% [cROIs, Cs, cROIs_BG, Cs_BG, coherence, skew, sz, patchID, tElapsed, dimensions] = mcb_DNMF(path_to_video, options)
%
% Jason Moore, 2025
if(~iscell(paths_to_videos)... |
64c9a9097eae124f132e6bbfc77f066f622d2e45c659f54049834f9e1bdf2377 | MATLAB | 1,315 | 32 | function [accept,th] = Check_centralized_component(data,center_range,side_range,wnd,overlap,param)
% [accept] = Check_centralized_component(data,center_range,side_range,wnd,overlap,param)
%
% input: data: filtered event (in HFO range)
% center_range: range of event at the center (default: remove 1/10 sam... |
90e6a16273e9d42d243a7ac440bbffc9237e22a99f2a8b3edb56f7e5ed26b954 | MATLAB | 1,315 | 44 | function [binnedx, binnedy, stdx, stdy, rho, pval] = divideintobins(x, y, nbins, corrtype, summaryFunc)
% take two vectors and divide x them into nbins, then compute the mean
% response of y for each x
if ~exist('corrtype', 'var'); corrtype = 'Spearman'; end
if ~exist('summaryFunc', 'var'); summaryFunc = @nanmean; end... |
fead8f33c6fccb6e4cecdcbf3c969807c66a685afc065bc10b1e5f7914d549a4 | MATLAB | 1,315 | 42 | function Dh=dwindow(h);
%DWINDOW Derive a window.
% DH=DWINDOW(H) derives a window H.
%
% Example :
% plot(dwindow(tftb_window(210,'hanning')))
%
% See also WINDOW.
% F. Auger, August 1994, July 1995.
% Copyright (c) 1996 by CNRS (France).
%
% This program is free software; you can redistribute it and/or modify
% ... |
5003cd232aec6bbc5f20f37eafbde3d11245a53d08caba65d5b7486ee62a070a | MATLAB | 1,316 | 47 | function colorim = h_createMGBImage(red,green,blue,climitr,climitg,climitb)
warning off MATLAB:divideByZero;
green = double(green);
red = double(red);
blue = double(blue);
if ~(exist('climitg')==1)|isempty(climitg)
temp2 = sort(green(:));
climitg = [temp2(round(0.05*length(temp2))),temp2(round(0.99*l... |
bd5eeb1e607defda4e24cb8dd2cb9fb726856baa1bd21d5be7c2549b5bfa6547 | MATLAB | 1,316 | 44 | function [sector_endpoints, num_sectors] = generate_sector_points_2(sector_vector, num_sector_weights, min_sector_spacing, have_min_sector_spacing)
num_sectors = datasample(sector_vector, 1, 'Replace', true, 'Weights', num_sector_weights);
sector_endpoints = zeros(2*num_sectors, 1);
num_endpoints = length(sector_endpo... |
0824039908dbcba3a9b71b1380d5cec3f2138f27f60a6bea4bf789cd47f8dacf | MATLAB | 1,317 | 37 | function [calibrationError, calibModelError] = test_calibration(frame, camPts, numTrials)
nCamera = round(size(camPts,2)./2);
numPoints = zeros(1,nCamera);
frame_good = cell(1,nCamera);
camPts_good = cell(1,nCamera);
calibrationError = zeros(numTrials, nCamera);
calibModelError = zeros(numTrials, nCamera);
... |
0c313e75c3490892068a6058ac94d6bfc7fc2d934adfe0d2229b7148809538db | MATLAB | 1,317 | 54 | %% shows two representative FOVs and their ROIs
clear
basePath = 'D:\InVivo\Imaging\2022-08-23_Grids-Imaging\';
%% load and display grids on surface
figure
imshow(imread([basePath '\FOV1-Grid\MAX_file_00004.tif']))
%% laod and display 200 um deep
figure
imshow(imread([basePath '\FOV1-200um\imaging\MAX_2... |
25ffeaa31a74baf63bf26cd00c6fb71812d25e5125f33b5aac4cb5a4227ba6f9 | MATLAB | 1,317 | 50 | function run_decode(x,winsize,stepsize,prctokeep,folderout)
load sphoutMAT
addpath(genpath('/scratch/work/eglerean/isctest/external'))
mask = load_nii('/scratch/cs/networks-pm/effects_externalfactors_on_functionalconnectivity/data/mri/conn_matrix/movie/group_mask_mult.nii');
N=30;
% let's fix the slide
%for x =... |
2a284798ed9fe19163c459623f28c5e83806361ba356e957f9d3572a12de0c2d | MATLAB | 1,317 | 45 | %load('JPSTHCell.mat')
[nrows,ncols]= size(JPSTHCell);
nElec=zeros(nrows,1);
cor=zeros(nrows,1);
dist=zeros(nrows,1);
for ck = 1:nrows
nElec(ck) = JPSTHCell{ck,2};
cor(ck) = JPSTHCell{ck,3};
dist(ck) = JPSTHCell{ck,4};
corStim(ck) = JPSTHCell{ck,5};
distStim(ck) = JPSTHCell{ck,6};
JPv... |
ddd596f5a2466885edbfd03d2a94755229ac166ff02cef4931414e0744ca1713 | MATLAB | 1,317 | 57 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Fixed point algorithm to iteratively optimize a set of weights (MU
% filter) to maximize the sparseness of the source (MU pulse train)
% Input:
% w = initial weigths
% X = whitened signal
% B = separation matrix of MU filters
% maxi... |
9df75fad3ab0cf3745814f5ceffe2856d52f14dd3add77079416dc3da09fe7b3 | MATLAB | 1,318 | 47 | function [paths, base_path] = dir_paths(path, type)
%DIR_PATHS Returns the full paths of a directory listing.
% Usage:
% paths = dir_paths % lists paths in pwd
% paths = dir_paths(path)
% paths = dir_paths(path, 'files') % 'files', 'folders' or 'both' (default)
% [paths, base_path] = dir_paths(...)
%
% See also... |
be91631c08e1371488194e42e20c1c5c57916f07020fa1e13c10abd61925df19 | MATLAB | 1,318 | 50 | function [vX] = VBA_spm_vec(varargin)
% vectorises a numeric, cell or structure array
% FORMAT [vX] = spm_vec(X);
% X - numeric, cell or stucture array[s]
% vX - vec(X)
%__________________________________________________________________________
%
% e.g.:
% spm_vec({eye(2) 3}) = [1 0 0 1 3]'
%__________________________... |
d9f1e8b8ced20f0d661551fab6ef2b030401748bb10b8727b2d31978d3b0ac80 | MATLAB | 1,318 | 25 | function mscmd_merge_across_channels(timeseries_path,firings_path,firings_out_path,opts)
if (nargin<4) opts=struct; end;
if ~isfield(opts,'min_peak_ratio'), opts.min_peak_ratio = 0.7; end
if ~isfield(opts,'max_dt'), opts.max_dt = 10; end % max difference between peaks of same event peak on different channels
if ~... |
ef87126968c42e7eeaaa442cee38a47f3f52ac844c023672ad5268300cbb8062 | MATLAB | 1,318 | 67 | % _ _
% ___ _ __ __ _| |__ ___ ___ _ __| |_
% / __| '__/ _` | '_ \/ __|/ _ \| '__| __|
% | (__| | | (_| | |_) \__ \ (_) | | | |_
% \___|_| \__,_|_.__/|___/\___/|_| \__|
%
% gets snippets from the raw data
% usage:
%
% V_snippets = getSnippets(self,channel, spiketimes)... |
f13c31b37819617935664f2df9b5e096ba4d7f0c49ead51efdf8df1768db0a41 | MATLAB | 1,318 | 47 | function colorim = h_createGORImage(red,green,blue,climitr,climitg,climitb)
warning off MATLAB:divideByZero;
green = double(green);
red = double(red);
blue = double(blue);
if ~(exist('climitg')==1)|isempty(climitg)
temp2 = sort(green(:));
climitg = [temp2(round(0.05*length(temp2))),temp2(round(0.99*l... |
27b2834bbf5e08da51ea4970c3025b29212160b69e0226eb40aef5b5d955afd2 | MATLAB | 1,319 | 37 |
%% Load data
%
% This short script shows how to load the behavioral data from a participant
% from the list of anonymous participant identifiers that was tested in a
% restless two-armed bandit task in partial and complete feedback conditions
% using the same design as in (Findling, Skvortsova et al., 2019, Nature... |
3882f59df62bbadd6ec91e8f7af8e8bf3e74f4145bcbca116cb219ffd8a82ecd | MATLAB | 1,319 | 33 | function [sens] = ft_transform_sens(transform, sens)
% FT_TRANSFORM_SENS applies a homogenous coordinate transformation to a
% structure with EEG electrodes or MEG gradiometers. For MEG gradiometers
% the homogenous transformation matrix should be limited to a rigid-body
% translation plus rotation.
%
% Use as
% sen... |
784982bd42901723e8f6a5369416d5698e3b5188ae78e2852213cdba26055ad1 | MATLAB | 1,319 | 44 | % run_paper_nov26.m
% Collecting data with new parameters for publication.
% Let map_on sweep from 2.5 to 250 and map6_on = map6_off.
% tau2map6_ratio = [10, 5, 1, 0.1]
% clear the workspace
clear;
% define save directory
save_dir = fullfile('data', 'nov26_paper_run_false');
[~, ~, ~] = mkdir(save_dir);
% calculate... |
b8a128067daf20bd6b12e314fe4885a621b1671b082dde01edef3d11f13cb654 | MATLAB | 1,319 | 56 | function [B, Z, evals, Xrecon, mu] = pcaPmtk(X, K, method)
% An efficient PCA implementation
% X is n*d - rows are examples, columns are features
% If K is not specified, we use the maximum possible value (min(n,d))
% B is d*K (the basis vectors)
% Z is n*K (the low dimensional representation)
% evals(1:K) is a vector... |
e7e6933ea69e87a42f0b7f0ee3e04b4b4a3e1599c84703a01f1456dda5cbbd91 | MATLAB | 1,319 | 37 | function [O_trans2,Spacing2]=inversegrid(O_trans,Spacing,sizeI,MaxRef)
% Calculates the (numeric) inverse of the current b-spline grid
%
% [O_trans2,Spacing2]=inversegrid(O_trans,Spacing,sizeI,MaxRef);
%
% Example,
%
% % Read two greyscale images of Lena
% cd ..
% Imoving=imread('images/lenag1.png');
% Istati... |
e9b12996363160bc3f1c2103719bdde57e676c4c9b0f7177b3ab916cc0b829da | MATLAB | 1,319 | 46 | function [Aa,bout,bb,ul] = mapacp_getborders(seg,bwdwm)
% example
% seg = MRIread2('atlas2mtr.nii'); seg = seg.vol;
% A = getweightedadjmatrix(seg);
%
% Alexandru V. Avram, Ph.D.
% NIH 2022
ul = unique(seg(seg>0)); % find all unique labels
bout = seg*0;
A = zeros(length(ul));
for k = 1:length(ul)
% e... |
62707fc8dc80ed99ed26452c1938bf7e43a9e966d1ea9c3badfa7e380e4e16c9 | MATLAB | 1,320 | 47 | function [retflag, edges] = checkedges(e)
% retflag=0 no problem
% retflag=1 3d mesh might be multiple material or invalid
% retfalg=2 3d mesh is invalid (or at least open)
% retflag=3 both open surface and multi-material
retflag=0;
edges = [e(:,[1 2]);e(:,[1 3]);e(:,[2 3])];
[edges ix jx] = unique(sort(edges,2),'rows... |
7678fb2c12813557c0110e4bfb50a6f407856d90318769f9d5fd8c8e09675cc0 | MATLAB | 1,320 | 44 | % TRI3TRANSROT Translate and rotate a triangle in 3D to a reference
% configuration in 2D.
%
% [TRANS,ROT,V2,V3] = TRI3TRANSROT(V) produces a translation vector TRANS
% and a rotation matrix ROT such that the transformation
% @(X)(ROT*(X + TRANS)) moves the vertex V(:,1) to the origin, the ver... |
e707342a949e8150bd40be3925b2b5f5f6fe4574b2d22ceb6c0d708aa5183bc8 | MATLAB | 1,320 | 45 | function writeToGridSimNameJson(newSimFilename)
% writeToGridSimNameJson("grid_yyyy-mm-ddThh-MM")
%
% Adds a row to the JSON file gridSimName.json
% The row key is gridX where X is the ith row of the file
%%
% Set up
%if ~exist('+utils','dir'); addpath('..src'); end
Config = utils.setConfig;
gridSimJsonFilePath = Co... |
5815fa926e4bdcad0db220faa2c9a1eb0375a01765f554d4c73fbf8eccb0d9ea | MATLAB | 1,321 | 58 | function newmatrix = wlAux_pruneMatrix(oldmatrix, passfunc)
% function newmatrix = wlAux_pruneMatrix(oldmatrix, passfunc)
%
% This function removes a subset of the event records from an event matrix.
% Events for which "passfunc" returns "true" are kept; events for which
% "passfunc" returns "false" are removed.
% Eve... |
d7953c4b6384f28138f83320dababfa7b6b25272ecf473c32d1f45fb25b76f8e | MATLAB | 1,321 | 55 | function [x] = quantize(x, qlo, qhi, Nq)
%quantize Makes the data vector x take discrete values only
%
% [qx] = quantize(x, qlo, qhi, Nq)
%
% or
%
% [qx] = quantize(x, qvals)
%
% The input data x are discretized. In the first syntax, allowed
% values are the Nq equally spaced points running from qlo to ... |
e3082f10140f64e531282faa344b6cd532a7616e96f50cb370f7900ca4ea6ac2 | MATLAB | 1,321 | 48 | function [n] = VBA_spm_length(X)
% Length of a vectorised numeric, cell or structure array
% FORMAT [n] = spm_length(X)
% X - numeric, cell or stucture array[s]
% n - length(spm_vec(X))
%
% See spm_vec, spm_unvec
%__________________________________________________________________________
%
% e.g.:
% spm_length({e... |
359fef30a68a6cf6a8d3709c90d173ed26a95af0f08cd641e2472f1fe0b1882e | MATLAB | 1,322 | 51 | function hideFigures()
% Hide all future generated figures until the showFigures() function is run
% This file is from pmtk3.googlecode.com
fprintf('figure display has been turned off\n');
set(0, 'defaultFigureVisible', 'off');
set(0, 'defaultAxesVisible', 'off');
tdir = tempdir();
fullpath = fullfile(tdir, 'matla... |
6168f698413ea24e5bd1f017c90ea7299d394ca76618b0379bc939001316a6e6 | MATLAB | 1,322 | 48 | %% Demo of RBF Expansion for linear regression
%
%%
% This file is from pmtk3.googlecode.com
[xtrain, ytrain, xtest, ytest] = polyDataMake('sampling','thibaux');
lambda = 0.001; % just for numerical stability
%sigmas = [0.05 0.5 50];
sigmas = [0.5 10 50];
%sigmas = [0.1 0.5 50];
K = 10;
centers = linspace(min(xtrain... |
8533a24a3d1f9b80a9e79a7475c25c3017d5027ec36671218ef4e4255636e6d1 | MATLAB | 1,322 | 49 | function handle = write_mrc(handle, image, header)
% ------------------------------------------------------------------------
% Author: Chang Qiao
% Email: qc17@mails.tsinghua.edu.cn
% Date : 2020/5/15
% ------------------------------------------------------------------------
position=ftell(handle);
switch he... |
bd54d6d64056f73c7423ea6f906c005732e48f7612681f011667d05348cf451c | MATLAB | 1,322 | 48 | %% Fit a discrete HMM via hmmFit and dgmTrain, comparing the results
%
%%
% This file is from pmtk3.googlecode.com
setSeed(0);
obsModel = [1/6 , 1/6 , 1/6 , 1/6 , 1/6 , 1/6 ;
1/10, 1/10, 1/10, 1/10, 1/10, 5/10 ];
transmat = [0.95 , 0.05;
0.10 , 0.90];
pi = [0.5, 0.5];
T = 30;
%% sample... |
0e0625aafa9040804779efd73f60c4f3d92884460c29663f203b76c23dfc71de | MATLAB | 1,323 | 28 | function [azi,ele] = sph2nav(azi,ele)
%SPH2NAV Coordinate Transform
% [azi,ele] = sph2nav(azi,ele) converts spherical coordinates to
% navigational coordinates.
%
% Input:
% azi ... azimuth (0 <= azi < 360)
% ele ... elevation (-90 <= ele <= 90)
%
% Output:
% azi ... azimuth (-180 <= azi <= 1... |
74c28164a8fa028ec6188d17a976d199debd5c576a4375fcd2fe64b9a49dc2b3 | MATLAB | 1,323 | 39 | function PlotFigure3_S2(GNDEffects)
% Plot figure 3 - supplement 4
%
if nargin==0
load('Figure 3 - Figure Supplement 2 - Source Data 1.mat','GNDEffects'); % cell array of GND outputs
end
topoTimes = [-100 300 650 1000 1350];
timelockName = 'preparation cue onset'; % time from...
% ince... |
74fda1d50b4b56b5c5534768f5bb2c42c4910b9a0ae4bdd659b4454852380c66 | MATLAB | 1,324 | 61 |
% clear all
close all
% path_sampling = [fileparts(mfilename('fullpath')),filesep,'..',filesep,'sampling'];
% addpath(path_sampling)
% class frequencies:
alpha = ones(3,1);
alpha = alpha./sum(alpha);
% class patterns:
lambda = [0.95 0.01 0.5
0.5 0.95 0.01
0.01 0.5 0.95];
% sample size:
n... |
09c7df673da2ff37160fc8864586ee25c8d255f489f165bb08cdd043ee57b85a | MATLAB | 1,325 | 31 | % PMTKdescription Top 1000 words from the 20newsgroups data
% PMTKsource http://people.csail.mit.edu/jrennie/20Newsgroups/
% PMTKtypeX Sparse count data
% PMTKtypeY discrete (20)
% PMTKncases 11256
% PMTKndims 1000
% PMTKcreated Ben Marlin
num_class: 20
vocab: {1x1000 cell}
trainW: [11256... |
3b4889dcaee75383926a2bba9bcd01ae1bb37700313a8840e420b40b0cb40106 | MATLAB | 1,325 | 49 | function [acSub acFull] = wacorr2(im,thisMask,thisMaskSqrt,thisInd,thisNa,maxNa,meanSubtracted)
%
%-----------------------------------------
% [acSub acFull] = wacorr2(im,thisMask,thisMaskSqrt,thisInd,thisNa,maxNa,meanSubtracted)
%
% compute a weighted 2D autocorrelation
%
% im: image
% thisMask: weighting function
% ... |
afa13d3cd90a0ed937b4c6dfee1e8c75b202fed37360fa3e783b17a2707cbe19 | MATLAB | 1,325 | 38 | function [OS,dc,compName,MatlabVersion,MatlabVersionYear,ScreenSize]=WhereAmIRunning(DisplayOn)
MatlabVersion=version('-release');
MatlabVersionYear=MatlabVersion(1:4);
OS=computer;
if strcmp(OS,'MACI64')
dc='/';
else
dc='\';
end
[ret, compName] = system('hostnam... |
8b05d253b6f5229ffe04435ac4498187268e6aac0d456fa14bc3518b7729632a | MATLAB | 1,326 | 52 | function volumetric_pat1(dip_num)
patno='117122'
model='german7_refined'
inverse_model='german3'
skip_user_prompts=true;
dipole_name=sprintf("dip%s.txt",dip_num);
conductivity_file = sprintf("%s.txt",model);
inverse_conductivity = inverse_model;
fprintf("Processing dipole %s..\n",dipole_name);
% go to root
... |
b37875910d510874dad6d70a6bdaf97987922c3516a3b5906146bfd5236704f0 | MATLAB | 1,326 | 41 | % Custom version of imrotate that demonstrates use of apply_homography.
%
% Works exactly the same as imrotate. For usage see imrotate.
%
% USAGE
% IR = imrotate2( I, angle, [method], [bbox] )
%
% INPUTS
% I - 2D image [converted to double]
% angle - angle to rotate in degrees
% method - ['linear'] 'neare... |
c2d0d4605d0f99c6573efd048789b2ebf4b55dad93de46185b2ef9d2ab4895a5 | MATLAB | 1,326 | 63 | function [bads] = fiff_read_bad_channels(fid,node)
%
% [bads] = fiff_read_bad_channels(fid,node)
%
% Reas the bad channel list from a node if it exists
%
% fid - The file id
% node - The node of interes
%
%
%
% Author : Matti Hamalainen, MGH Martinos Center
% License : BSD 3-clause
%
% Revision 1.5 200... |
e413ff7f8b4f0711cfd704e8833a92a2c0b24e443171a8edd290d191060fd697 | MATLAB | 1,327 | 38 | % load_Fig2
% load signals for plotting single trials and trial averages
load(fullfile(saveLoc, 'sig_allSessions'))
plotSig = {'Ramp', 'PC1', 'TinC'};
sigName = {'S^{ramp} [a.u.]', 'S^{PC1} [a.u.]', 'S^{con}_{Tin} [sp/s]'};
dimms = [63 20 61];
% From plot_singleTrials_highlights
% For highlights plot
... |
2c0e95fcbd20ffc7762c542edea405492f8c078a1b8ad283838149d70a700080 | MATLAB | 1,328 | 39 | function [IR,boundX,boundY] = tpsInterpolateIm( Isrc, warp, holeVal )
% Interpolate Isrc according to the warp from Isrc->Idst.
%
% Use tpsGetWarp to obtain the warp.
%
% USAGE
% IR = tpsInterpolateIm( Isrc, warp, [holeVal] )
%
% INPUTS
% Isrc - image to interpolate
% warp - [see tpsGetWarp] bookstein ... |
2d3f30b6312f51099fb140ec9942ffdcf8e5d090ec5d4ca084191679134add89 | MATLAB | 1,328 | 53 | %% NVR High-Pass Filtering
% 2017 (edited 2018) by Felix Klotzsche
% 2024 update by Antonin Fourcade
function NVR_04_hpf(cropstyle, m_cond, path_data, locutoff)
%% 1.Set Variables
%clc
%clear all
mov_cond = m_cond;
%1.1 Set different paths:
% input paths:
path_data_eeg = [path_data 'EEG/'];
path_in_eeg = [path_data_e... |
6a2a88d01f5b03aaec9d1e85f3e8cb74c1859f0254bed2c4aa36ae3198b3a0e7 | MATLAB | 1,328 | 39 | function p=RandomizeBoundaryPoints(p,llc,delta)
xmin=llc(1); ymin=llc(2); zmin=llc(3);
dx=delta(1); dy=delta(2); dz=delta(3);
global tiny
if isempty(tiny), tiny=1e-9; end
np=size(p,1);
while(true)
xcheck = mod(p(:,1)-xmin,dx);
% x dimension check
xflag = IsEqual(xcheck,0,tiny) | IsEqual(dx-xcheck,0,tiny);
... |
07aa462a5aeaf5e2a764a26bd70f285595cc8f76d88696c09cbc0a5a1d05d2f2 | MATLAB | 1,329 | 36 | classdef AbstractAdjustableFeatures < handle
% GUIAdjustableCoordinates are coordinates that can display a settings-dlg.
%
%
%
%<PRE>
% This file is part of dspace-core.
%
% Copyright (C) 2020 University Zurich, Sepp Kollmorgen
%
% This program is free software: you can redis... |
f1f88e65ebe6dda75b85436fc467ea208e016f7892ae9a41584583ca7f80f536 | MATLAB | 1,329 | 45 | function [inds,inds_bin] = fernsInds2( data, fids, thrs )
% Compute indices for each input by each fern.
%
% USAGE
% inds = fernsInds( data, fids, thrs )
%
% INPUTS
% data - [NxF] N length F binary feature vectors
% fids - [MxS] feature ids for each fern for each depth
% thrs - [MxS] threshold ... |
6dcfe74c815d2714adc7b6b3cc1d88e9e13beb457af1b8e1343f9a9d6a5dbe64 | MATLAB | 1,330 | 24 | function test_AR_GRONe_SA_tracking_conda()
% Test tracking on a project using some of AR's flybubble videos.
% That project is a multianimal project.
if ispc() ,
warning('conda backend is not supported on Windows, so %s always passes on Windows', mfilename());
return
end
linux_project_file_path... |
7355a33a2da9843d221e7527941520eb322677f278034ca5f092779531aacd17 | MATLAB | 1,330 | 52 | %% Demonstrate the effect of changing the hyper-parameters for an MLP
% based on demprior from netlab, but without the GUI code
%%
% This file is from pmtk3.googlecode.com
setSeed(1);
%{
% values from Bishop p260 - clearly not correct
aw1s = [1 1 1000 1000];
ab1s = [1 1 100 1000];
aw2s = [1 10 1 1];
ab2s = [1 1 1 1]... |
88e5e14bf1560f5cdb46654dfda2eed0f61cc350d811ec611c10b8c791584161 | MATLAB | 1,330 | 47 | function colorim = h_createAlienImage(red,green,blue,climitr,climitg,climitb)
warning off MATLAB:divideByZero;
green = double(green);
red = double(red);
blue = double(blue);
if ~(exist('climitg')==1)|isempty(climitg)
temp2 = sort(green(:));
climitg = [temp2(round(0.05*length(temp2))),temp2(round(0.99... |
bea361e4914bfcb81ff47aeb8f11e9eea747e65af2b772c50ea631190c6edc0e | MATLAB | 1,330 | 55 | %% Compare various Normal Inverse Chi Squared Distributions
%
%% gaussInvChi Params
% This file is from pmtk3.googlecode.com
mu = [0 0 0];
k = [1 5 1];
v = [1 1 5];
S = [1 1 1];
%% Convert to gaussInvWishart models for plotting
modelA.mu = mu(1);
modelA.k = k(1);
modelA.dof = v(1);
modelA.Sigma = v(1)*S(... |
ff6bd8707767592b087a49322e2a2f0b74cd23410c5b60a01a53670572eebdc4 | MATLAB | 1,330 | 60 | %% Compare speed and accuracy of belief propagation on the alarm network
%
%%
%PMTKslow
% This file is from pmtk3.googlecode.com
function alarmBelPropDemo
dgm = mkAlarmDgm();
% exact unconditional marginals
nodeBels = dgmInferNodes(dgm);
infEngNames = {'bp', 'bp', 'bp', 'libdaibp'};
infEngArgs = { ...
{'upd... |
a14740524eea56d9001d6d6bd57ebdb612044b1f154c26c1b4d920c642cae5e6 | MATLAB | 1,331 | 42 | echo off
%
% SUBPLEX's arguments are used as follows:
% XBEST - the value of X returning the lowest value
% `FUNC' - a string of the name of the function to be
% optimized
% STARTX - the initial starting X
% OPTIONS - an array of values specifying different options
% they are:
% (1) :if >0, print status e... |
c63ea752ffcc062a6be7cc14a1bdf4d4a985a06ecc0c9d163257c1a6f88244ff | MATLAB | 1,331 | 71 | %% Compare Gauss, Student T, and Laplacian distributions
%
%%
% This file is from pmtk3.googlecode.com
xs = -4:0.2:4;
v = 1;
mu = 0;
pr{1} = gaussProb(xs, mu, sqrt(v));
% variance of laplace = 2b^2
b = sqrt(v/2);
pr{2} = 1/(2*b)*exp(-abs(xs-mu)/b);
% variance of student = dof*sigma^2/(dof-2)
nu = 1;
model.mu = mu... |
308c488d00b7e0c8b6239170d59e87eedee5a882e429260411c9c158dffc5dd2 | MATLAB | 1,332 | 41 | %% Classifying a speech signal with an HMM as "four" or "five"
% Xtrain{i} is a 13 x T(i) sequence of MFCC data, where T(i) is the length
%%
% This file is from pmtk3.googlecode.com
loadData('speechDataDigits4And5');
nstates = 5;
setSeed(0);
Xtrain = [train4'; train5'];
ytrain = [repmat(4, numel(train4), 1) ; repma... |
3a40fd0c53a2f1e72c45ce3b871132522764ab51167c98d0f7a86b5fa9b8b952 | MATLAB | 1,332 | 49 | function V = VBA_spm_vol_nifti(P,n)
% Get header information for a NIFTI-1 image
% FORMAT V = spm_vol_nifti(P,n)
% P - filename or NIfTI object
% n - volume id (a 1x2 array, e.g. [3,1])
%
% V - a structure containing the image volume information
%___________________________________________________________________... |
3f86ba605f2ae9fe9bbfee0fa0052a361c694c98139e88cb74b0fb830b8e1470 | MATLAB | 1,332 | 52 | function vec = lincomb(M, x, vecs, coeffs)
% Computes a linear combination of tangent vectors in the Manopt framework.
%
% vec = lincomb(M, x, vecs, coeffs)
%
% M is a Manopt manifold structure obtained from a factory.
% x is a point on the manifold M.
% vecs is a cell containing n tangent vectors at x.
% coeff... |
4b3c620600244dcdf9b62c14cfd57338b5ed976d695dac053de877c680062f05 | MATLAB | 1,332 | 35 | function closeMCmatlabFigures()
allFigs = findall(groot,'type','figure');
for iF = 1:numel(allFigs)
if ismember(allFigs(iF).Name,...
{'Geometry illustration',...
'Media properties',...
'Normalized absorption',...
'Normalized fluence rate',...
'Photon paths... |
869e8d2d84224598a31bd95802d56c6ddf8fa736b911b9ac83b7592ea92c3a52 | MATLAB | 1,332 | 28 | % GUI Layout Toolbox
% Version 2.3.3 (R2018b) 25-October-2018
%
% Panels
% uix.Panel - arrange a single element inside a standard panel
% uix.CardPanel - show one element from a list
% uix.BoxPanel - arrange a single element inside a panel with a boxed title
% uix.TabPanel - arr... |
f090f821cf089d3e362d7fe9e396e609f00a1632997bb300375605a5317c990e | MATLAB | 1,332 | 40 | function [vi,ind] = interp_vel2d(V,n,s1,s2,h)
%% returns interpolated velocity value v1 = V(s1,s2,s3)
% where s1 = row index, s2 = col index, s3 = depth index
% interp_vel(u,n,xi,xj,xk) == [interp3(par.Yc,par.Xc,par.Zc,ux,xj,xi,xk),interp3(par.Yc,par.Xc,par.Zc,uy,xj,xi,xk),interp3(par.Yc,par.Xc,par.Zc,uz,xj,xi,xk)]
% w... |
18df1ad03a7ca8312a8a08911140e51c4129866bcaf8d1458ca2be2ad42b023d | MATLAB | 1,333 | 30 | function y=umaxunte(u);
%UMAXUNTE Determination of the maximum value of u for Unterberger distribution.
% Y=UMAXUNTE(u) is the function Y(u)=(H(u)+u/2)/(H(u)-u/2)-fmax/fmin.
% Doing UMAX = fzero('umaxunte',0); gives the maximum value for U in the
% computation of the Unterberger distribution. For this distribution,
%... |
47e2a150ed5b81af9d6944ed62e12c8ef3c74c69fe302782b0424b0ad8f889bb | MATLAB | 1,333 | 34 | % Copyright Christopher Fricke, University Leipzig Medical Center,
% Neurology 2024
srcf = 'data\prep\coreg_indiv\datscan_tf';
srcf2 = 'data\prep\coreg_indiv\ct';
spm('defaults', 'FMRI');
d = dir(fullfile(srcf,'P*.nii'));
for i = 1:length(d)
disp(d(i).name);
sn = d(i).name(1:3);
tm = load(ful... |
71eaf1b7d716710eefce127c5a5c3019f9f90245de0fdeabbdac61cfc2b51f01 | MATLAB | 1,333 | 54 | function write_vtk(fn, pnt, tri)
% WRITE_VTK writes a triangulation to a VTK (Visualisation ToolKit) format file.
% Supported are triangles, tetraheders and hexaheders.
%
% Use as
% write_vtk(filename, pnt, tri)
%
% See also READ_VTK, WRITE_PLY
% Copyright (C) 2002, Robert Oostenveld
%
% $Id$
fid = fopen(fn, 'wt')... |
251294139f5cf1e784d955090129008816bbb6797751ba088acac030704316fa | MATLAB | 1,334 | 113 | clear
clc
% This M-file creates MuscleLengthVelocityMomentArm_9Groups corresponding to the musculotendon length, velocity and moment arm during locomotion
% This M-file creates MusculoskeletalData_9Groups corresponding to the joint center, muscle origin, insertion and geometric parameters during locomotion
% This M-f... |
3392183a8b52a218763736ae168fc0e724176d3d4e7163646644c87557ff708c | MATLAB | 1,334 | 44 | function mu = meanFieldIsingGrid(J, CPDs, logprobFn, img, varargin)
% img should be an m*n matrix
% CPDs{1}=p(y|s=-1), CPDs{2}=p(y|s=1)
% mu(i,j) = E(S(i,j)|y) where S(i,j) in {-1,1}
% logprobFn is a handle to a function that will be called with
% logprobFn(CPDS{i}, img(:))
%%
% This file is from pmtk3.googlecode.com... |
341a0df6d303083e34986c8c765f4ebd545cd6230667d5db8b7e7b1d6ab8975f | MATLAB | 1,334 | 31 | function check_accoustic_fq_pns(seq,params)
lims = params.gen.lims;
% t time of samples in microseconds, y sample values, Fs sampling rate in Hz
Fs = 1/lims.adcRasterTime/100;
gradients = seq.gradient_waveforms1()/lims.gamma*1000; % Full sequence
gradients = gradients(1:2,:); ... |
45ecbd04eb857e1a4c61a4203c2448dd402599c950c50116596fd7cd499d6f50 | MATLAB | 1,334 | 51 | function [El] = VBA_ElogBeta(a,b)
% expectation of a log-transformed beta variable
% function [El] = VBA_ElogBeta(a,b)
% IN:
% - a,b: shape parameters of the beta distribution
% OUT:
% - El: E[log(x)|a,b]
% Let X be a random variable following a beta distribution with shape
% parameters a and b: X ~ Beta(a,b). This... |
6c199d87bcf88e4438b369e214ca8810c04b99c03a8dd6d9defe11f8835f6cab | MATLAB | 1,334 | 57 | function [f] = VBA_psi(z)
% psi(x) = d[log(gamma(x))]/dx
try
f = psi(z+1)-1./z; % for numerical purposes
catch
siz = size(z);
z=z(:);
zz=z;
f = 0.*z; % reserve space in advance
%reflection point
p=find(real(z)<0.5);
if ~isempty(p)
z(p)=1-z(p);
end
%Lanczos approximation ... |
7f765606d3760fd47f7c82535364221b40a08f6129ea08c269aed55ffd22ab9e | MATLAB | 1,334 | 33 | % Wrapper script to turn parcellation files into FreeSurfer annotation
% files. Then you can calculate surface area of parcellations!
%
% Assumes ind_parcellation output from Kong2019 CBIG pipeline.
% Written by M. Peterson, Nielsen Brain and Behavior Lab
%To run:
% 1. Claim computing resources using salloc (ex: `sa... |
b488321aa97d980ab55b0f0546a90a9b3d3939433c4d4d63645e44d570efaac5 | MATLAB | 1,334 | 44 | function [s] = keepfields(s, fields)
% KEEPFIELDS makes a selection of the fields in a structure
%
% Use as
% s = keepfields(s, fields);
%
% See also REMOVEFIELDS, COPYFIELDS
% Copyright (C) 2014, Robert Oostenveld
%
% This file is part of FieldTrip, see http://www.fieldtriptoolbox.org
% for the documentation and d... |
bd2bdc20739aff0e7b56f46f109c471a8833a2206625174871a4acab3c19754c | MATLAB | 1,334 | 59 | function [LAN LAN2] = del_time(LAN, pos, guardar)
%
% v.1.0.1 form eliminar.m 15.6.2009
if nargin < 3; guardar =1,end
if nargin < 2; pos = 0; end
if isempty(pos); pos = 0;end
if iscell(LAN)
for lan = 1:length(LAN)
[LAN{lan} LAN2{lan}] = del_time_st(LAN{lan}, pos, guardar);
end
else
[LAN LAN2... |
d349068f092b86531c3c2fde4220a90bca273c73fe908071b5c48c2eabe2e224 | MATLAB | 1,334 | 32 | figure('color', [1, 1, 1]); hold on;
rgb = [112 112 112; 26 127 187]/255;
nUnits = nan(2,2);
clear h
rocaxis = rocaxis/1000;
for iArea = 1: 2
for iCond = 1: 2
nUnits(iArea,iCond) = size(this_roc{iArea,iCond},1);
mean_roc = mean(this_roc{iArea,iCond},1);
if iArea==1 && iCon... |
ecdef2f27888b00baad74c562b3082832bc35d8e21bfeb3fb635479d0b17eb73 | MATLAB | 1,334 | 42 | function onset = find_onset(sigmask,Xf,rmzero)
% FIND_ONSET gets the latency of the first value larger than zero in a vector.
%
% FORMAT onset = find_onset(sigmask,Xf,rmzero)
%
% INPUTS:
% sigmask = a vector of 0s and 1s (output from limo_ecluster_test for instance).
% Xf = a vector of time... |
ee09b2523c527ac4c4c6c83c6fb6400159f0a64285b4855e2d01fc74b69f07f7 | MATLAB | 1,334 | 40 | function [nodeBel, edgeBel, logZ] = crf2InferNodesAndEdges(model, Xnode, Xedge)
% Compute node and edge marginals for conditional random field
% [nodeBel, edgeBel, logZ] = crf2InferNodesAndEdges(model, Xn, Xe)
% Input can be
% Xn is NnodeFeatures*Nnodes
% Xe is NedgeFeatures*Nedges
% or
% Xn is Ncases*NnodeFeatures*Nn... |
a6e3faf4e2fb66b7e0da477d148d0c57004e91dd1fd7180d676d248e8a81897d | MATLAB | 1,335 | 46 | function generate_funct_images(stat_path,sim_path,exp_folder,SF,SNR,N,N_ROIs,dummy)
% ========================================================================
% Ruslan Masharipov, October, 2023
% email: ruslan.s.masharipov@gmail.com
% ========================================================================
tic
load(s... |
c1dc3effce744264b572245d5270f81e105aeb850e512dead93ce72e5cc4427e | MATLAB | 1,336 | 84 | function [bdir,bfreq,bdd,bfd,bdf,bff,hit,hitd,hitf,hitl,hitr,dir_congr,dir_incongr,...
freq_congr,freq_incongr] = compute_training(sessions)
%min num. of trials in a session
mintri=100;
%%%%% EXTRACT FROM SESSIONS %%%%%
% s=sessions{ratnum};
s=sessions;
%number of valid trials
valid=[s(:).valid];
%good sessi... |
d8968690bbd98061064c93da0a481a87117ec34ffc2fc175428e4950e6f9fd92 | MATLAB | 1,336 | 30 | function animalids = ParseAnimalIdFromFileNames(moviefiles,datatype)
switch datatype,
case 'stephen',
animalids = regexp(moviefiles,'fly_?(\d+)[^\d]','tokens');
assert(~any(cellfun(@isempty,animalids)));
animalids = cellfun(@(x) str2double(x{end}),animalids);
case 'jan'
animalids = regexp(moviefile... |
a44a2499cc30bd1c3cb69b5b78180ba4bd046c8b5c71a530535bc58c0922b5ca | MATLAB | 1,337 | 53 | %% Plot a Mixture of Beta Distributions
%
%%
% This file is from pmtk3.googlecode.com
function mixBetaDemo()
dataSS = [20 10];
alphaPrior = [20 20 ; 30 10];
M = 2;
mixprior = [0.5 0.5];
%%
for z=1:M
logmarglik(z) = betaln(alphaPrior(z,1) + dataSS(1), alphaPrior(z,2) + dataSS(2)) - ...
betaln(alphaPrior(z,... |
1b26acecc355c1924cae88fa948c79687096ed7ca156e4d36900cdbdd8785d2f | MATLAB | 1,338 | 46 | function [nll,g,H] = SoftmaxLossDummy(w,X,ydummy,weights)
% w is nfeatures * nclasses
% X is ncases * nfeatures
% ydummy is ncases * nclasses, y(i,c)=1 if in class c
%
% This is just like SoftmaxLoss except
% y is dummy encoded. This allows for soft outputs.
% We do not assume any columns of W are clamped to 0.
% Thi... |
8dc06f060ec5e1e4e28030871c10ac560a13ec7d716d15ea5143d51f2b462f4f | MATLAB | 1,338 | 60 | function [S,K] = nn_cov_mat3(vec);
% Compute the covariance matrix for a 1 hidden layer neural net
% with input bias variance vara, input wts variance varu,
% output weight variance varout and output bias var varb
% and # hidden units = nhid
%
% 13 May 1996, modified from nn_cov_mat.m
%
% modified from nn_cov_nat2 by ... |
ad7a6c1039fdb5371ba9ccd0a806a06bd172f4986f1a1f076898e2902a386029 | MATLAB | 1,338 | 44 | disp(' ');
disp('fdct_wrapping_demo_recon.m -- Partial Curvelet reconstruction.');
disp(' ');
disp('We apply the curvelet transform to an image, select a percentage');
disp('of the largest coefficients (in modulus), and set the others');
disp('to zero. We then take the inverse curvelet transform to obtain');
disp('a pa... |
ca654e719d8816a945e058cfcbcf3b58b187e31fa04aea93afe04af01e365b64 | MATLAB | 1,338 | 41 | % Resizes subs by resizVals.
%
% Resizes subs in subs/vals image representation by resizVals.
%
% This essentially replaces each sub by sub.*resizVals. The only subtlety
% is that in images the leftmost sub value is .5, so for example when
% resizing by a factor of 2, the first pixel is replaced by 2 pixels and so
% l... |
f6d54c7c837d71a0665c17d09441f2d17dc9cd8d19d275c21cc9cdb304158700 | MATLAB | 1,338 | 35 | function [bin_v_sq, bin_v_rct] = downsample_bins(v,bvc_v_sq,bvc_v_rct)
x_edges_sq = linspace(1, v.env.dx_sq, v.env.Nx_sq+1);
[~,xbins_sq] = histc(v.env.SquareSpaceX, x_edges_sq, 1);
y_edges_sq = linspace(1, v.env.dy_sq, v.env.Ny_sq+1);
[~,ybins_sq] = histc(v.env.SquareSpaceY, y_edges_sq, 1);
x_edges_rct = linspace(1,... |
47930f93a66d357ea98a10c88e03a429e7a7ec9b0e885ea7b5287b294f791188 | MATLAB | 1,339 | 62 | function dmat_transpose_print_some ( m, n, a, ilo, jlo, ihi, jhi, title )
%% DMAT_TRANSPOSE_PRINT_SOME prints some of a double precision matrix, transposed.
%
% Modified:
%
% 23 May 2005
%
% Author:
%
% John Burkardt
%
% Parameters:
%
% Input, integer M, N, the number of rows and columns.
%
... |
08dac86ae7b7230c7dd615fb525aaebaaa2cade6f8fbecd62596f244889b1518 | MATLAB | 1,340 | 65 |
function sigmoidLowerBounds()
x = [-6:(1/10):6];
function sig = sigmoid(x)
sig = exp(x) ./ (1 + exp(x));
end
function lambda = lambda(xi)
lambda = 1/(2*xi) * (sigmoid(xi) - 1/2);
end
% log(1+exp(eta)) < bound(eta)
% (1+exp(eta)) < exp(bound(eta))
% 1/(1+exp(-eta)) > exp(-bound(-eta))
function out = siglow... |
14e58ebf425408185c3e75a36465ab81db378ce248b92025107e104ece3ed50b | MATLAB | 1,340 | 39 | function [ rawwave, hilmag, hilfreq, hilphase ] = ...
wlProc_calcBPFAnalytic(data, samprate, bpfband)
% function [ rawwave, hilmag, hilfreq, hilphase ] = ...
% wlProc_calcBPFAnalytic(data, samprate, bpfband)
%
% This function band-pass filters an input signal, and then returns the
% analytic signal components of t... |
e81b35c90c5c61f6741f10d52b5fb803d8ca22172b8a585d0ce0ef589c89249e | MATLAB | 1,340 | 56 | % plot fluorescent data with the animals position for the roi's given
% Chad Heer; Sheffield Lab
function [] = plotFvpos(Fdata, Yposdata, reward, velocity, lick, time, roi, frames, smoothby)
% Fdata = fluorescent data loaded in, should be just F, Fc or Fc3
% yposdata = Y_position data
% reward = reward delivery data... |
098d87d47dd050d0bb82f061c21a48a9b314a5020c9cdbf9f9eb54d9edcc6f57 | MATLAB | 1,342 | 41 | function [yhat, post] = discrimAnalysisPredict(model, Xtest)
% Apply Bayes rule with Gaussian class-conditional densities.
% Computes post(i,c) = P(y=c|x(i,:), params)
% and yhat(i) = arg max_c post(i,c)
% This file is from pmtk3.googlecode.com
[N, d] = size(Xtest);
classPrior = model.classPrior;
Nclasses = length(... |
5754570c2c9cdc4c9f579c20fe1686b338bf215539780d63a2ec4dc26ed3669a | MATLAB | 1,342 | 37 | % normalization
function success_code = normalization_cuda()
loadParameters;
arg_list = {};
postfix_list = {};
run_num_list = 1:params.NUM_ROUNDS;
for run_num = run_num_list
arg_list{end+1} = {params.colorCorrectionImagesDir,params.normalizedImagesDir,params.FILE_BASENAME,params.SHIFT_CHA... |
92b7bef39ed03c8381e8019a53e40e0b4a33a9fec080d7afbb5370b6db07ee1c | MATLAB | 1,342 | 57 | function header = read_spike6mat_header(filename)
% read_spike6mat_header() - read Matlab files exported from Spike 6
%
% Usage:
% >> header = read_spike6mat_header(filename);
%
% Inputs:
% filename - [string] file name
%
% Outputs:
% header - FILEIO toolbox type structure
% ___________________________________... |
b13028fa648fbc3d5ffb00b29f31b80da9a2e0b7d338307ce5a4c118196328a5 | MATLAB | 1,342 | 66 | function [e p tris_ nnpe] = readMEDIT(fn)
% Reads mesh form a .mesh file formatted in MEDIT style
tris_=[];
fid = OpenFile(fn,'rt');
while true
junk = fgetl(fid);
if strcmp(junk,'Vertices');
break;
end
end
nn = str2num(fgetl(fid));
data = textscan(fid,'%f %f %f%*[^\n]',nn);
if length(data{1}) ~= n... |
d3b1c60ac5f0ce1d263791d4f03dbef805577e8e5b4e24c25e76b6b42e40746a | MATLAB | 1,342 | 59 | function outIndex = residualR(inIndex,q);
% PURPOSE : Performs the resampling stage of the SIR
% in order(number of samples) steps. It uses Liu's
% residual resampling algorithm and Niclas' magic line.
% INPUTS : - inIndex = Input particle indices.
% - q = Normalised importance ratios.
% ... |
d4b4da804860636574c4d6d766ff86068854ba75d66ca082698c31cd4509536a | MATLAB | 1,342 | 41 | function disp(t,name)
%DISP Command window display of a matricized tensor (tenmat).
%
% DISP(T) displays a tensor as matrix with no name.
%
% DISP(T,NAME) display a tensor as matrix with the given name.
%
% See also TENMAT, TENMAT/DISPLAY.
%
%MATLAB Tensor Toolbox.
%Copyright 2015, Sandia Corporation.
% This is ... |
0072807d28402f2156f34b7f4cd5c610ec4c7f288ddde3cf86e829e1cfa4fbd5 | MATLAB | 1,343 | 48 | function softev = obsModelEval(model, features)
% Use observatino model to convert local features to soft evidence
% features(n,t,d) is obs for node t, case n, component d
% softev(k,t,n) is p(node(t)=k | case n)
%
% This is a batch version of localEvToSoftEv
% that is much faster
% This file is from pmtk3.googlecod... |
49792897b7da0b944417876980546be94ebe12dce1bfe54e74328ae1ce0fc8a0 | MATLAB | 1,343 | 55 | function mask = mkMasksSquare(imSize,windows,verbose)
%-----------------------------------------
% mkMasksSquare(imSize,windows)
%
% generates a family of square window functions
% that tile evenly in x and y
%
% imSize: size of image (2-vector)
% windows: structure containing window parameters
% (see initParams.m)dbc... |
4d137d5f08e665ace9b3d5df2ed0147cdf3114d886abe441d078f519e6ac57ff | MATLAB | 1,343 | 39 | % Define a function 'sim_net' that simulates the response of a neural network
% to a given input 'I' over time, using the specified connectivity matrix 'w',
% time constant 'tau', and time step 'dt'.
function [r_all] = sim_net(I, w, tau, dt)
% Determine the number of neurons in the network
nn = length(w);
... |
a782ccf04d3f0188c71f0f3c543073ccd42fe53d141640fd864a19fb065e0432 | MATLAB | 1,343 | 43 | function a = subsref(t,s)
%SUBSREF Subscripted reference for a sptenmat.
%
% Examples
% A.subs <-- returns the nonzero values as an array
% A.vals <-- returns the corresponding 2D subscripts
% A.tsize <-- returns the size original tensor
% A.rdims <-- tensor dimensions that were mapped to rows
% A.cdims <--... |
fdc8b0a5849528106a7de265f60eafb85a3cb14fb72b3d4b601aa4682e3d53a2 | MATLAB | 1,343 | 76 | %{
_ _
___ _ __ __ _| |__ ___ ___ _ __| |_
/ __| '__/ _` | '_ \/ __|/ _ \| '__| __|
| (__| | | (_| | |_) \__ \ (_) | | | |_
\___|_| \__,_|_.__/|___/\___/|_| \__|
# automate
**Syntax**
```
automate(self,~,~)
```
**Descript... |
13917e55a6aa1a4aed85f815086f6b9c242bde7a8c0ecd51ecd0d6febdfa6d4c | MATLAB | 1,345 | 33 | function [headmodel] = ft_transform_vol(transform, headmodel)
% FT_TRANSFORM_VOL applies a homogenous coordinate transformation to
% a structure with an EEG or MEG colume conduction model. The homogenous
% transformation matrix should be limited to a rigid-body translation
% plus rotation and a global rescaling.
%
% U... |
2e62acaf44bd513dcd61cc7e19dcf33b679e554aab7d59fa9b8f6074bacf24e2 | MATLAB | 1,345 | 37 | function [C, Q] = qrancorrelmtx(n,rmin,rmax,nocheck)
% QRANCORRELMTX returns a random n by n correlation matrix, C, and its
% matrix square root Q. It does this by directly computing the elements
% according to a formula derived for constant r value.
% This derivation is in my Mathematica file sqrt_matrix_normalizati... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.