sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
408cc35f78b4596e83015de7df4391a3f16b063db7f1786762cebb0864d14cc5 | MATLAB | 117 | 5 | function C = NormalizedSCM(X)
N = size(X,1);
M = size(X,2);
X2 = X./sqrt(repmat(diag(X*X'),1,M));
C = (M/N)*(X2')*X2; |
2f7fcff4c1c0ac62173a9e5fd9781b83383e1d80d28470b96f148f6f489c4035 | MATLAB | 118 | 5 | function update_learned_models(app)
app.TotalLearnedModelsEditField.Value = length(app.model_collection.models);
end |
3bc7f493007ba63ee862ac30658b15239a303047b59551071fd11a79d12f769e | MATLAB | 120 | 6 | function zef = zef_DBS_strip_struct_open(zef)
zef = zef_DBS_strip_struct_window(zef);
zef_DBS_strip_struct_init;
end
|
2128e3521d14b541a0d973cae9e9591e2aaf83e45ff1bc84a1e719ff5f5e857b | MATLAB | 126 | 8 | %% closing function
function ET_DeleteFcn(varargin)
%get globals
global sEyeFig
%stop timer
%stop(sEyeFig.objTimer);
end |
e935054533b36cd2825a6d16e21dbf86604d61ea2744cd4f94cfbf9a2a83b46d | MATLAB | 126 | 3 | zef = zef_create_sensors(zef,['s' num2str(length(zef.sensor_tags) + 1)]);
zef.aux_field_1 = cell(0);
zef_build_sensors_table;
|
46ff0c21260ba86fa807e05e4bcf6724087aa86c5de607635a75930fc540d3ba | MATLAB | 127 | 10 | function [params] = default_params()
params = struct();
params.ignore_dataset_ = true;
params = parameterize(params);
end
|
50793453e666b734e807c23bd83835a1e665ad14c88f640179c6a5da8ad0c620 | MATLAB | 129 | 5 | function save_params(app)
params = app.params;
params = convert_paths_to_relative(params);
save('user_params.mat','params');
end
|
5e1470fea6b249231fcb0b9d8d10f09d8a56792839bbf00ac017854be96ab9da | MATLAB | 129 | 5 | function reselect_best_model_button_pushed(app)
[app.best_model, ~] = select_best_model(app.model_collection, app.params);
end
|
dcd8aa6a17e521d2ca5db88862a110fcf30530ec18e7d79958d5d2ab3f76e93d | MATLAB | 129 | 1 | zef_git_push(zef.h_github_pat.Value,'message',[zef.h_github_author.Value ': ' char(join(string(zef.h_github_message.Value)))]);
|
1019d60152e6edd0eae506299eac3e80031faba685196ead4bc33e8740bae0ce | MATLAB | 130 | 8 | function [struct_out] = zef_dataBank_text2struct(text)
struct_out=[];
for i=1:length(text)
struct_out.(text{i})=[];
end
end
|
57a7627147039547380ceec0e8704a9b87ff85801bfb761cd8ee6de273371369 | MATLAB | 130 | 11 | clear all
close all
clc
time_today = datestr(now, 'mmddyyyy');
traj_type = 'circle';
speed_test
traj_type = 'infty';
speed_test |
9f09b39e6d8ee3d82ec7c97af18d7013235451fbac48278a147f891bc3572006 | MATLAB | 130 | 7 | function C = geodesic_mean(COV,metric)
I = size(COV,3);
C = COV(:,:,1);
for i=2:I
C = geodesic(C,COV(:,:,i),1/i,metric);
end
|
c4c50918b75a6b0c62ab9c2fa81990167f98f1bf9064ce9bd9bbb421dda9b263 | MATLAB | 134 | 2 | function F = D2GaussFunction(x,xdata)
F = x(1)*exp( -((xdata(:,:,1)-x(2)).^2/(2*x(3)^2) + (xdata(:,:,2)-x(4)).^2/(2*x(5)^2) ) ); |
15a5150b113a4b774791a4f6374289a96b31a9961b8cf1b852c4d39d63691785 | MATLAB | 136 | 7 | function vecA = mat2vec(matA)
%UNTITLED Summary of this function goes here
% Detailed explanation goes here
vecA = matA(:);
end
|
3cb01bea639ccca675d12b8fee801044b6e52064aa9ea2d08c8fd3ddb8340942 | MATLAB | 136 | 6 | function [x, y] = selectDataPoint(~, ax)
roi = drawpoint(ax);
x = roi.Position(1);
y = roi.Position(2);
%ax.Position
end |
7e075e3b89ef5db3601519b27aa16bee368539781e195498a3ad20a1b4d51cf3 | MATLAB | 137 | 6 | function sw_install
d=pwd;
addpath(d, [d '/lib'],[d '/etc'] );
savepath
disp (' > added and saved sleepwalker to the Matlab path!')
|
d7834a3c377a4ffee96970bcd3301a715dbc02b7b0c6135e58650e986eb2bde7 | MATLAB | 137 | 4 | function udf_selection_ensemble_evaluation_button_changed(app)
plot_all_ensemble_evals(app);
update_ensemble_eval_text(app);
end
|
3e504edb3820eb15ef305f67addb53bad4e9f8143f86888b35954413371594f2 | MATLAB | 138 | 8 | function C = riemann_geodesic(C1,C2,t)
C1m12 = C1^(-0.5);
C112 = C1^(0.5);
C = C112*((C1m12*C2*C1m12)^t)*C112;
|
68022158731eef7947a917fa6f46994dc3630212cf43d4d3e3f12bf0f86fad60 | MATLAB | 139 | 7 | function [indicator_vector] = find_labels(dataset, num_udf)
udf = dataset(:, end-num_udf+1:end);
[~, indicator_vector] = max(udf');
end
|
36b70588b2868974690bdb8ab724b03a553068a7dae807ad9ad866a591f42d33 | MATLAB | 141 | 5 | % Plot
zef_plot_outPub( ...
zef.source_tree_published, ...
zef.source_tree_signal_parameters.plotLoopIndex.Value );
|
54dfdf7083062011aff3df2b65965a7d164421965068ecf2f18de6510ca9e611 | MATLAB | 142 | 9 | function [Per] = customPrc(x)
highPer = prctile(x,95);
meanPer = prctile(x,50);
lowPer = prctile(x,5);
Per = [lowPer meanPer highPer];
end
|
aaf104e66c837329794352c4b619e119bc69cfe9b75a9767b89768d3e7610a0b | MATLAB | 142 | 3 | function [params] = calculate_number_of_models(params)
params.number_of_seed_models = params.num_seed_structures * params.p_lambda_count;
end
|
b8d5dd38c558b81a59e119c626a14f7634a159993d419727c3722233ee056b2d | MATLAB | 145 | 7 | function zef_delete_waitbar
h_waitbar = findall(groot,'-property','ZefWaitbarStartTime');
set(h_waitbar,'DeleteFcn','');
delete(h_waitbar);
end |
4b00a7dbf721be5fe504570e63251c39cd107c5308fa3fe403304287a48f3749 | MATLAB | 146 | 9 | % name = GetRunName( myobj )
%
% Get run base name.
%
function [name] = GetRunName( s )
p = GetParams( s );
name = p.snsRunName;
end
|
53325114e29607e028a85098cde7fae2674ad511afc6d309225d5343feebf954 | MATLAB | 146 | 5 | function p_vec = zef_wireframe_permittivity_vec(f_vec,p_val)
p_vec = (2.*f_vec.*(p_val - 1) + p_val + 2)./(2 + p_val - f_vec.*(p_val - 1));
end
|
8015ec678e5adbff33dfb50d3a1f7d0d84d6f8bf10a25faa41e9444367a77aa0 | MATLAB | 146 | 7 | function acc = mean_accuracy(YTrue, YPred)
[m, Yarg] = max(YPred,[],2);
acc = double( Yarg == int32(YTrue) );
acc = mean(acc(:));
end
|
616c9d8815333706cdd9783717b4c501ce12c069eea01c53842639705b32995c | MATLAB | 147 | 5 | function udf_id_pcn_button_changed(app);
plot_pcn_scatter(app);
plot_pattern_completion_coordinates(app);
update_pattern_completion_text(app);
end
|
e770b12313fdaa4a5fe2aa547aab38eb4596b3561901e46ff454584f142d6ab8 | MATLAB | 147 | 8 | function c = bw(m)
%black & white colormap
if nargin < 1, m = size(get(gcf,'colormap'),1); end
v = round(linspace(1,0,m)');
c = [v v v];
|
ff963ad2dbbc369997cdb7e33424d57d940eb46661f64cbedc1421baa4236bc9 | MATLAB | 147 | 5 | function FileRename(strOldFileName, strNewFileName)
objJava = java.io.File(strOldFileName);
objJava.renameTo(java.io.File(strNewFileName));
end |
d51d324be881295653235edb81975d5f17d745015bc5a455cd5d38a943a9ef3b | MATLAB | 148 | 8 | % dir = GetDataDir( myobj )
%
% Get global run data directory.
%
function [ret] = GetDataDir( s )
ret = DoQueryCmd( s, 'GETDATADIR' );
end
|
0b480d578f3672719f249a62ced66c3f27c25d8ef483bd41b9d2b6a34303a59f | MATLAB | 149 | 7 | function s = exportstruct(obj)
f = fieldnames(obj) ;
s = struct ;
for i = 1:length(f)
s.(f{i}) = obj.(f{i}) ;
end
end |
b6a4742b0028403ae60599dd31571d23a57351a28a5f8e5f7edccd581e26f98e | MATLAB | 149 | 7 | % Import struct
function obj = importstruct(obj,s)
f = fieldnames(s) ;
for i = 1:length(f)
obj.(f{i}) = s.(f{i}) ;
end
end |
11c2b45de4b86da4371022992913316edfe47c9d3bc7d0012f97f67d4daf6f02 | MATLAB | 150 | 9 |
for subj = 312
tic
EEGpath = (strcat('/Users/db900/Desktop/Pupildata/EEG/P',num2str(subj),'/'));
d_EEG2CSV(EEGpath)
toc
end |
aaac6db5ee579c5c8d7f9437134bdb44fb63278f630b6b2a57a94f9afe4aefd7 | MATLAB | 150 | 8 | % version = GetVersion( myobj )
%
% Get SpikeGLX version string.
%
function [ret] = GetVersion( s )
ret = DoQueryCmd( s, 'GETVERSION' );
end
|
86e13271874147832f34fbdade3fb6ee45f9f20805ca70b2834b0f203cc9dde6 | MATLAB | 152 | 4 | %Create points after merging all l/RH labels load ('lh.all_aparc.2009s.dat');
a = load ('lh.all_aparc.2009s');
c = a([3:end],[1:4]);
save lh_point.dat c |
6b57a9177de712763651e4b3a1c7654d268fc7ee9a0529ca84d80c7f983547f0 | MATLAB | 156 | 6 | % KLS = Kullback_Leibler_sym(P,Q)
% Kullback_leibler distance.
function KL = distance_kullback(P,Q)
KL = sqrt( 0.5* trace( P/Q + P\Q - 2*eye(size(P))));
|
adcbb6b7761cacd13e71e916c668578187c0c8c4d4ae172039cee53cc6569203 | MATLAB | 156 | 3 | function a = distance_alphadiv(A,B,alpha)
a = (4/(1-alpha^2))*log( det(((1-alpha)/2)*A + ((1+alpha)/2)*B)/((det(A)^((1-alpha)/2))*(det(A)^((1+alpha)/2)))); |
d591584fe90f1d828c8a1b76762b6474f3528199b92e6151916d1640bcd52bcb | MATLAB | 158 | 7 | function identified_ensemble_id_button_changed(app)
plot_node_performance_distribution(app);
plot_ensemble_coordinates(app);
update_ensemble_text(app);
end
|
8a9abd26156cf24e3f418fcf03a68b63dcfe1f6ef4c00782baee5580ae6befc3 | MATLAB | 160 | 7 | function Out = RiemannExpMap(P,X)
[U Delta] = eig(P);
G = U*sqrt(Delta);
Y = inv(G)*X*inv(G)';
[V Sigma] = eig(Y);
Out = (G*V)*diag(exp(diag(Sigma)))*(G*V)'; |
c4162c5235031ccb52c2c2fc6513079539b7ad23c27268bf134f9a7fa139bac8 | MATLAB | 161 | 3 | zef.fieldnames = fieldnames(zef);
zef = rmfield(zef,zef.fieldnames(find(contains(zef.fieldnames, 'original_surface_mesh'))));
zef = rmfield(zef,{'fieldnames'});
|
d82027dc8b3204a95c350f21b0bc6e02472381c5a5eed7c46d1f0d952e7ec276 | MATLAB | 161 | 7 | function Out = RiemannLogMap(P,X)
[U Delta] = eig(P);
G = U*sqrt(Delta);
Y = inv(G)*X*inv(G)';
[V Sigma] = eig(Y);
Out = (G*V)*diag(log(diag(Sigma)))*(G*V)';
|
5de106750e51c6d538b66d6a65a435005a242a6de9533dc95495a89ee44cfff7 | MATLAB | 163 | 4 | zef.source_positions_original_field =[];
zef.source_directions_original_field = [];
zef.L_original_field = [];
zef.L_source_interpolation_ind_original_field = [];
|
fab73dcfb044116f473fb1324f0a51a4089f8dc2235dbe93f1617e2c77e4499c | MATLAB | 163 | 5 | function w = ml_hanning(M)
% Compute a Hann window compatible with the MATLAB `hanning` function
w = .5 * (1 - cos(2 * pi * (1:M)'/double(M + 1)));
end
|
629052c3b4be13ca5dbcffc6490ac80b97f718afccb4394f9c8cbc97706fe748 | MATLAB | 165 | 10 | function set_no_tick(app_plot)
app_plot.YTick=[];
app_plot.YTickLabel=[];
app_plot.XTick=[];
app_plot.XTickLabel=[];
app_plot.ZTick=[];
app_plot.ZTickLabel=[];
end |
a5fd83caeb6df519eac704d92c236b3ff8aa7a0483a52957fc649272bd184a93 | MATLAB | 165 | 5 | function rescaled = rescale_vector(vector, new_min, new_max, old_min, old_max)
rescaled = new_min + ((vector - old_min)*(new_max - new_min))/(old_max-old_min);
end |
3785d16b27079e53b22affbcea9bb2160b74fde048ce97e0eb2483d0bfa4e967 | MATLAB | 166 | 6 | function [M_Gamma2] = gamma_square (Gamma)
M_Gamma2 = zeros(size(Gamma));
for k=1:size(Gamma,2)
M_Gamma2(:,k) = Gamma(:,k).^2 + Gamma(:,k).*(1-Gamma(:,k));
end; |
64c9cd71edadac25b27ccde117472a74f06c5fdaf17555cd9f597f3a8afcac87 | MATLAB | 166 | 8 | set(gcbo,'Tag','');
if isequal(exist('zef'),1)
if isfield(zef,'h_zeffiro')
if zef.h_zeffiro == gcbo;
zef_figure_tool;
end
end
end
|
d991df16fa524827658d9eead36e876f8430e8e4c2d64b78c3d6f5a6ecc8a1e5 | MATLAB | 166 | 4 | function states = copyhmm(states,P,Pi,Dir2d_alpha,Dir_alpha)
states.Pi = Pi; states.P = P;
states.Dir_alpha = Dir_alpha; states.Dir2d_alpha = Dir2d_alpha;
end |
c35f19c3cd31d7b4706f4e2668b18cec202dfe64ff5be57b303a69fed043047a | MATLAB | 169 | 7 | function zef_bst_edit_project(project_file_name)
if exist(project_file_name,'file')
zeffiro_interface('start_mode','display','open_project',project_file_name);
end
end |
c46b3c98338a034bcd5e7a4111332c48952d378abe4946110745935aed42f82c | MATLAB | 169 | 11 | function x = row(x)
% function x = row(x)
%---
% reshape x to a row vector
%
% See also column, matrix, third, fourth
% Thomas Deneux
% Copyright 2015-2017
x = x(:)';
|
005210ac206e5e4aee1bf22a7e48006c6b72b561f01b03b0753c185e309d2890 | MATLAB | 170 | 6 | function max_point = zef_rec_maximizer(rec_arr,s_pos)
[~, max_ind] = max(sqrt(sum(reshape(rec_arr,3,length(rec_arr(:))/3).^2)),[],2);
max_point = s_pos(max_ind,:);
end
|
41f8d3ad4ded11f8c22549373f2c2158e43eadd1b4b486f1813f78c136e24ff7 | MATLAB | 170 | 9 | function decoding_udf_selection_change_button_pushed(app)
plot_model_decoding_evaluation(app);
update_decoding_text(app);
plot_structured_prediction_visual(app);
end
|
2c6873b20b6e741630cc09a1f48c7be03ad85fda0a4a5202eb6a7acf0a12252d | MATLAB | 174 | 7 | function [tetra, domain_labels] = zef_unique_tetra(tetra, domain_labels)
[~, I] = unique(sort(tetra,2),'rows');
tetra = tetra(I,:);
domain_labels = domain_labels(I,:);
end
|
69afce9f5a251879cd9e263013ff520d0fd27f4e1e15ae94dd0cf7acaf37bedd | MATLAB | 174 | 6 | zef_process_meshes(zef,zef.explode_everything);
zef.on_screen = 1;
zef_update_fig_details;
zef_plot_volume;
zef.stop_movie = 0;
set(zef.h_stop_movie,'value',zef.stop_movie);
|
7b3b62fcd9cad77b62c2a68e13b1cf49b1cc9475c3f5ec5a151b7dd30dc166f4 | MATLAB | 174 | 6 | function [colormap_vec] = zef_greyscale_colormap(colortune_param, colormap_size)
t = linspace(0.15,0.95,colormap_size)';
colormap_vec = repmat(t.^colortune_param,1,3);
end
|
518aad746683837bad8b428998954ff872f4a04f6edf9498a7be4af9a60808b4 | MATLAB | 179 | 9 | function [app] = test_panel_2(app)
perform_structural_learning_button_pushed(app);
preview_passed_structures_button_pushed(app);
preview_all_structures_button_pushed(app);
end |
790cb6c3d65ecde7b4fd5435a9c2ebc4dfefbb896406502dd7d7569fc6bf56b0 | MATLAB | 179 | 7 | [zef.yesno] = questdlg('Substitute raw data with processed data?','Yes','No');
if isequal(zef.yesno,'Yes');
zef_filter_raw_data;
zef.raw_data = zef.processed_data;
end;
|
ad48bfa2de9cf78d998cb1f26fb503275353d01272f849052eada6e7d8e16169 | MATLAB | 179 | 8 | % params = EnumDataDir( myobj )
%
% Retrieve a listing of files in the data directory.
%
function [ret] = EnumDataDir( s )
ret = DoGetResultsCmd( s, 'ENUMDATADIR' );
end
|
6afc9a8c198bc566af5a66055f2ea98c406f1b2dd2da450e248c18463be20ca5 | MATLAB | 181 | 6 | [zef.yesno] = questdlg('Substitute noise data with processed data?','Yes','No');
if isequal(zef.yesno,'Yes');
zef_filter_raw_data;
zef.noise_data = zef.processed_data;
end
|
7b980b97f8f22371108eb4c1f7c54bfae84d1b9b14905d744805029567163fd7 | MATLAB | 181 | 8 | zef_segmentation_tool;
zef_reopen_menu_tool;
zef.h_zeffiro.DeleteFcn = '';
delete(zef.h_zeffiro);
zef_figure_tool;
zef_mesh_tool;
zef_mesh_visualization_tool;
zef = zef_update(zef); |
f2bcec1a9815224b1c20357e90e64e24c9e53f7ed7b791b5cd9f389d628f0142 | MATLAB | 181 | 13 | function load_default_parameters(app)
params = struct();
params.ignore_dataset_ = true;
params = parameterize(params);
params.ignore_dataset_ = false;
app.params = params;
end |
5be5985f3c983868742fb67a61bb20b9a9807e21871938e349a12fa25fb67094 | MATLAB | 185 | 8 | % boolval = IsRunning( myobj )
%
% Returns 1 if SpikeGLX is currently acquiring data.
%
function [ret] = IsRunning( s )
ret = sscanf( DoQueryCmd( s, 'ISRUNNING' ), '%d' );
end
|
9a004fb5effa3654e0f34a4cd291f7cbc4b45cd8d64e17ef5c0b915ed614453a | MATLAB | 185 | 15 | function x = zef_KDMD(x,K,M,D,use_gpu)
if use_gpu
x = gpuArray(x);
K = gpuArray(K);
M = gpuArray(M);
D = gpuArray(D);
end
y = D*x;
y = M*y;
y = D*y;
x = K*x + y;
end
|
6ad179b8ec99ae5c9aa3b9af1bd0524c8c6e6274b8e6d0fd48d17056e4f40359 | MATLAB | 187 | 6 | function [udf_labels] = simulate_udf_labels(num_udf)
udf_labels = cell(num_udf, 1);
for one_udf = 1:num_udf
udf_labels{one_udf} = strcat('UDF ', string(one_udf));
end
end
|
0a27bbff725bf89fa30b7df01c8e4bae9ff918fa71d8ad29ebc35a7a843991e6 | MATLAB | 188 | 9 | function keypressed = getAsyncKeyState(key)
if ~libisloaded('user32')
loadlibrary('user32.dll','user32.h')
end
keypressed = calllib('user32','GetAsyncKeyState',int32(key)) ~= 0;
end |
2b0d11edc6f41b29c12cf30a1125a5ba5e9b21b6df26e635c5aeaa3e8bb5ea05 | MATLAB | 190 | 13 | function zef = hb_sampler(zef)
if nargin == 0
zef = evalin('base','zef');
end
zef = zef_tool_start(zef,'zef_open_mcmc',1/4,0);
if nargout == 0
assignin('base','zef',zef)
end
end
|
7ff2fd976d3d2c5d22c9700212b3588e33ce5ded1442a89de777cb8b5b4474e5 | MATLAB | 190 | 5 | function colormap_vec = zef_brighness_and_contrast(colormap_vec, brightness_val, contrast_val)
colormap_vec = (((colormap_vec + brightness_val)/(1+brightness_val)).^(1+contrast_val));
end
|
8edb7740169bb10f6db8cab5bbdb805155a6eddf37db17947d6a1d86da8386f3 | MATLAB | 191 | 10 | function [run_type] = zef_bst_get_run_type(h_parent)
if nargin < 1
h_parent = get(gcbo,'Parent');
end
h_object = findobj(h_parent.Children,'Tag','run_type');
run_type = h_object.Value;
end |
aa5f852b870a6661de540423b4caaecdbc74204a3aeb71e3b6a26eb4db8ca990 | MATLAB | 191 | 8 | function d = zef_nse_threshold_distribution(d,quantile_min,quantile_max)
a = quantile(abs(d),quantile_min);
b = quantile(abs(d),quantile_max);
d(find(abs(d)<a))=a;
d(find(abs(d)>b))=b;
end
|
be9b2823a2ddb84606972eb6d53ca481eb0cc3569699736a94cb1eca85f8a652 | MATLAB | 191 | 8 | % n_probes = GetImProbeCount( myobj )
%
% Returns count of enabled IMEC probes.
%
function [ret] = GetImProbeCount( s )
ret = sscanf( DoQueryCmd( s, 'GETIMPROBECOUNT' ), '%d' );
end
|
01d70fe770c1baf8e4bad5dc0d819381341be7ecb8b1c859c6d7fdc1504ad067 | MATLAB | 192 | 7 | function y = log1pexp(x)
% Accurately compute y = log(1+exp(x))
% reference: Accurately Computing log(1-exp(|a|)) Martin Machler
seed = 33.3;
y = x;
idx = x<seed;
y(idx) = log1p(exp(x(idx))); |
2de9f94d178a23a3d68ccc86821dfd2e3c47192349cab9782c89e5caf3a298dd | MATLAB | 192 | 11 | function plot_model_structure(app)
rois = app.rois;
%now parse whether 3D Single-Point Coordinates OR 2D Polygons
if app.roi_style == 2
plot_model_graph_structure_style_2(app);
end
end |
44fb07a87e12a6f29a8d9defdeb7317a4e16ef376aa9836cbd7f323f2f557db2 | MATLAB | 192 | 7 | function zef = zef_set_nse_source_space(zef,nse_field)
zef.source_positions = nse_field.nodes(nse_field.i_node_ind,:);
zef.source_orientations = [];
zef = zef_source_interpolation(zef);
end
|
4a4d8d3ff22145688bbd5b38dfd0eba14a853791448e09824747803f42d4bf01 | MATLAB | 192 | 4 | if isempty(zef.init_profile)
zef.init_profile = readcell([zef.program_path '/profile/' zef.profile_name '/zeffiro_init.ini'],'filetype','text','delimiter',',');
end
zef_init_init_profile;
|
97e053cd14a916170d55d084d08f549e0f4a981230063818c74a35d77ee5f74d | MATLAB | 193 | 8 | function strTime = getTime()
%UNTITLED3 Summary of this function goes here
% Detailed explanation goes here
vecTime = fix(clock);
strTime = sprintf('%02d:%02d:%02d',vecTime(4:6));
end
|
648c8df2914f68bdb2a8efe619c0aab2288eeced3cc2bd6a1262a26d07a63604 | MATLAB | 194 | 7 | function [meanp,maxp,stdp] = projMeanMaxSTD( stackin )
stackin = single(stackin); %double( stackin );
meanp = mean( stackin, 3 );
maxp = max( stackin, [], 3 );
stdp = std( stackin, 0, 3 );
end
|
e1bf747ee91f4b967c4126f7efe3b5b2fa95c4eb36f8a405ec5cc0d5771480a3 | MATLAB | 194 | 13 | function zef = zef_dpq_start(zef)
if nargin == 0
zef = evalin('base','zef');
end
zef = zef_tool_start(zef,'zef_dpq_window',1/2,1);
if nargout == 0
assignin('base','zef',zef)
end
end
|
50d5fc4222b257ced64c2b0042278f83d6fdff4e60a897add5cb964098409354 | MATLAB | 195 | 7 | function [info,columnNames] = zef_dataBank_showCurrent(zef, type)
tree.node.data=zef_dataBank_getData(zef, type);
tree.node.type=type;
[info, columnNames]=zef_databank_showAll(tree, type);
end
|
096e389b0dc175a51a9dab94b2ee354ccfcb47165941ad4600e0dc8fdb2b4641 | MATLAB | 196 | 12 | clear all
load('Seed156.mat'); %loads variable 's' which will set rng
rng(s);
Mseq = mls2(8,0,s);
save('Mseq_IAC_ITD.mat','Mseq')
Mseq_bs = mls2(9,0,2);
save('Mseq_IAC_ITD_bs.mat','Mseq_bs')
|
3ee3828fc49162058ad4021c05d45d72d55cae74159d0aacaefd5909f7414aab | MATLAB | 196 | 13 | function zef = zef_kf_start(zef)
if nargin == 0
zef = evalin('base','zef');
end
zef = zef_tool_start(zef,'zef_kf_open_window',1/4,1);
if nargout == 0
assignin('base','zef',zef)
end
end |
46f2cf4e2020bd4a2d8ab71c0a59400415377fd4dd64598f85a59ad3abb601dc | MATLAB | 196 | 10 | function [f P1] = MagSpec(x,fs)
%this function returns the magnitude spectrum of signal x
fx = fft(x);
L = length(fx);
P1 = abs(fx(1:L/2+1))/L;
P1(2:end-1) = 2*P1(2:end-1);
f = fs*(0:L/2)/L;
end |
10ea1c4cd830f71cdba76dbe498e8597bf02f10f29ed1b7c7bdc8711bfb9f2a0 | MATLAB | 197 | 13 | function zef = ias_map_estimation(zef)
if nargin == 0
zef = evalin('base','zef');
end
zef = zef_tool_start(zef,'zef_init_ias',1/4,0);
if nargout == 0
assignin('base','zef',zef)
end
end
|
3c1bebc941127fce2a5fc669500a4d96ba016d91ee654050f0d235010803d2d2 | MATLAB | 197 | 10 | function [x_pix, y_pix, boundary_outlines] = make_random_mask(x, y, r)
pts = linspace(0, 2*pi);
x_pix = x + r*cos(pts);
y_pix = y + r*sin(pts);
boundary_outlines = boundary(x_pix', y_pix');
end |
5df96681d2024ef889d3942ae5c9a823cf8e0a50a0f13dc87eaaea66a1f4765f | MATLAB | 197 | 13 | function zef = sl1_map_estimation(zef)
if nargin == 0
zef = evalin('base','zef');
end
zef = zef_tool_start(zef,'zef_init_sl1',1/4,0);
if nargout == 0
assignin('base','zef',zef)
end
end
|
7b8195e01bb052fb8396c5f9a79ebefa816ef4742e9af847c9e4c24e3d73cef6 | MATLAB | 198 | 6 | function strOut = res2proc(strIn)
%transforms results directory to process directory
intStart=strfind(strIn,'Processed');
strOut = [strIn(1:(intStart-1)) 'Results' strIn((intStart+9):end)];
end
|
e0ce3e52c0d1640db97550ecac15db278ad13f8ee51d82f089ec73d907f55bd0 | MATLAB | 199 | 10 | function [input_mode] = zef_bst_get_input_mode(h_parent)
if nargin < 1
h_parent = get(gcbo,'Parent');
end
h_object = findobj(h_parent.Children,'Tag','input_mode');
input_mode = h_object.Value;
end |
05ab356e24d0ce2837eeccc9a3057b29b9f266b492726923b4d434fdcaf5c5e0 | MATLAB | 200 | 3 | zef = zef_dataBank_add_data_item(zef,'custom',[],'EEG');
zef = zef_dataBank_add_data_item(zef,'data','EEG','EEG measurements');
zef = zef_dataBank_add_data_item(zef,'leadfield','EEG','EEG leadfield'); |
dc748b393a960ff6ad36182a849b7c314e85af4e51600b2059b42c2660b40080 | MATLAB | 200 | 13 | function zef = zef_GMModel_start(zef)
if nargin == 0
zef = evalin('base','zef');
end
zef = zef_tool_start(zef,'zef_GMModel_open',1/4,0);
if nargout == 0
assignin('base','zef',zef)
end
end
|
efe356503e9a595ef93cd27e351c1d9404b9c9d4b1f673be7129782b49cf2793 | MATLAB | 200 | 13 | function zef = zef_dipole_start(zef)
if nargin == 0
zef = evalin('base','zef');
end
zef = zef_tool_start(zef,'zef_dipole_window',1/4,1);
if nargout == 0
assignin('base','zef',zef)
end
end
|
f09b94135956226a5d8dc51117f7cdaf328d66ac3ac46cb7007fd50772f54091 | MATLAB | 200 | 6 | function strOut = proc2res(strIn)
%transforms processed directory to results directory
intStart=strfind(strIn,'Processed');
strOut = [strIn(1:(intStart-1)) 'Results' strIn((intStart+9):end)];
end
|
4704b9907b2f0014a01dc35c776a6fc5069fcea4ecf673454a88e8791828207c | MATLAB | 201 | 9 | % boolval = IsSaving( myobj )
%
% Returns 1 if the software is currently running
% AND saving data.
%
function [ret] = IsSaving( s )
ret = sscanf( DoQueryCmd( s, 'ISSAVING' ), '%d' );
end
|
6dde87b7cb79d5a6dbcdfc657b4c6b54b3d3184dc48294cfa3a4008ad493e6fb | MATLAB | 201 | 8 | function MaxProj = projectMax( stack )
% max projection, sd projection?
tic
MaxProj = max( stack, [], 3 );
%MaxProj2 = histeq( MaxProj );
disp(append('projectMax took ',num2str(toc),' seconds'));
end
|
7530a01dcbc1714edbbe7740f2803b67c937032afe746647215e742b39da5d19 | MATLAB | 201 | 10 | function [freq, psdx] = powerspec(x,Fs)
N = length(x);
xdft = fft(x);
xdft = xdft(1:N/2+1);
psdx = (1/(Fs*N)) * abs(xdft).^2;
psdx(2:end-1) = 2*psdx(2:end-1);
freq = 0:Fs/length(x):Fs/2;
end |
d71221b4cf747192838e12bf0457bd1f9353741faf9ffcf13dca8599c6880104 | MATLAB | 201 | 13 | function zef = ias_map_estimation(zef)
if nargin == 0
zef = evalin('base','zef');
end
zef = zef_tool_start(zef,'zef_init_ias_roi',1/4,0);
if nargout == 0
assignin('base','zef',zef)
end
end
|
dcf25ac9505249d1124e0e00326b4e66715e00414b96364c9fd87ecb8f9b0b30 | MATLAB | 201 | 3 | zef = zef_dataBank_add_data_item(zef,'custom',[],'MEG');
zef = zef_dataBank_add_data_item(zef,'data','MEG','MEG measurements');
zef = zef_dataBank_add_data_item(zef,'leadfield','MEG','MEG leadfield');
|
016fed51c09369fb13b03a984f93769c2715c45211d8e7f6edeeead9795dbce4 | MATLAB | 202 | 8 | function plot_all_ensemble_evals(app)
plot_all_udf_one_ens_auc(app);
plot_all_udf_one_ens_pr(app);
plot_one_udf_all_ens_auc(app);
plot_one_udf_all_ens_pr(app);
plot_ensemble_eval_coordinates(app);
end
|
0655c515bc15dad7c8d9f5738fa6cc01d89c7391433546de11bfab7aa2d9f24a | MATLAB | 202 | 13 | function zef = zef_start_dataBank(zef)
if nargin == 0
zef = evalin('base','zef');
end
zef = zef_tool_start(zef,'zef_open_dataBank',1/2,1);
if nargout == 0
assignin('base','zef',zef)
end
end
|
09ea5c6f82ffca5b6fdad63d3d293423435fa36d979e04cac415d70f179f235b | MATLAB | 202 | 9 | function [XOut, YOut, ZOut] = prepareSurfaceData(XIn, YIn, ZIn)
%UNTITLED4 Summary of this function goes here
% Detailed explanation goes here
XOut = XIn(:);
YOut = YIn(:);
ZOut = ZIn(:);
end
|
52cb56c52e88fff7c4b3bd8633599244b307249a7e79c5872639ee11f12f0ab7 | MATLAB | 202 | 9 | function z = log_sigmoid(x)
% computes and returns the logistic sigmoid of x. Operation is performed
% element-wise if x is a vector or matrix.
%
% z = 1 ./ (1-exp(-x))
z = (1+exp(-x)).^-1;
end |
d3ece3d641e4beb3e12f54495fdb57da3fa4ce5b9b286e2e148b497c858db02d | MATLAB | 202 | 13 | function zef = zef_exp_app_launch(zef)
if nargin == 0
zef = evalin('base','zef');
end
zef = zef_tool_start(zef,'zef_exp_app_start',1/6,1);
if nargout == 0
assignin('base','zef',zef)
end
end
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.