sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
af637524427f534aa574b2120d68483df2b995e68400098f318429ee26b6bedb | MATLAB | 41 | 5 |
load('kaufman_data.mat');
DataHigh(D); |
41d7e901fa82a224e098d55f63bab9d6cd4cf4caf5385a070e4a767f6a8969a3 | MATLAB | 44 | 4 | function plotEventAlignedData(x,y,)
end |
ea41921a87abf780bcff2322f22a213044c228a729739ce0572cd4111d07f11e | MATLAB | 46 | 3 | function y = epsilonilon()
y = 1e-199;
end |
535db5977abbc2adbc46fafd7ac98a8f42ad110f8bafbe14c1bc42b5f249f443 | MATLAB | 48 | 3 | function out = logabs(in)
out = log(abs(in)+1); |
3d2e4f3b3611b9664f09bb9aa02f40e306c6b7a2bb51fca264afa10430ba9812 | MATLAB | 52 | 2 | function d = RaguDate()
d = 'Compiled: 31 May 2019'; |
65f67cdb3ce9a8f1cf550fb4094f082128537d62fba6886408ee97308cacb5fc | MATLAB | 52 | 3 | function output = XxMean(x)
output = mean(x(:));
end |
1256a531e92a2ede96bdc8f0ff1e3a539197bb3e7d352fa52dce25d92c379d2b | MATLAB | 54 | 2 | %% Open Help file
open([pwd,'/html/USER_GUIDE.html'])
|
1d2acf43b85e8cbc73713314cc50f87cb75f2a785f1f3610b5ac08c289fe9c04 | MATLAB | 54 | 3 | function Classify_PVD_Point(Pxy,Clusters_Struct)
end |
4235c156a70548eb8873c60f7026913798b36432e82c5ceccee4f8e3518e2ae3 | MATLAB | 54 | 4 | function output = c(input)
output = int32(input);
end |
5721c8ac0396c42f6ce03365c48a445129cdde7d5f18876ba97902ef1ab62db6 | MATLAB | 54 | 1 | /Users/guillaume/very_nice_data/mouse-45/H07_M45_S02/
|
eed040cc26f4ec9504cdcacb0883ad228262ea5942779fc7f4433835464524e5 | MATLAB | 60 | 3 | function writemda16i(X,fname)
writemda(X,fname,'int16');
end |
5148173874211fc38f3b5eb78464637b05d40e6c4d00f3f519a150c33456622c | MATLAB | 61 | 6 | %% load all data
selpath = uigetdir;
cd(selpath)
ramp_fun;
|
712d5c96d446c808f6f1a8dc6f82ffd4aa0b8722a3140aecba8632018e96267d | MATLAB | 66 | 4 | function A = mat_matrix(B)
M = fieldnames(B);
A = B.(M{1});
end |
43d6974e5dda257a7a94ba1918464e82940f841928e3f617c61bc4f13c325b3b | MATLAB | 67 | 3 | function ydB = pow2db(y)
ydB = (10.*log10(y) + 300) - 300;
end
|
c1e8da050b360376a94f9b96005381f71a6f30126d959ef4a024f0401ae79cd8 | MATLAB | 67 | 5 | function do = r_mkdir(d)
for k=1:length(d)
dir(d{k});
end
|
dbf4474ea8255c580566496b18b9616cb797474e0560ea51c0718149d8a5b6aa | MATLAB | 67 | 5 | %function plot_concentration(c)
for npol=1:length(c)
Gaba(n
end
|
fb0786af70c2baa41228335893468dea016b47e252a17d41342e33c067f59d38 | MATLAB | 68 | 6 | function [y]=T1_decay(v,x)
S0=v(1);
T1=v(2);
y=S0*(1-exp(-x/T1));
|
364f82a881c61fa37e2fc1209782e769fef026e8bf4af7be9ee78f6bc0b45cae | MATLAB | 69 | 3 | function M = setDiagonalElements(M,val)
M(find(eye(size(M)))) = val; |
6d11c9aeafb34a404b93e10db01506ccf5a8d0572a608a8825a6be4305e136de | MATLAB | 69 | 5 | %clear
addpath regress_methods
addpath regress_util
addpath fa_util
|
aed16b2c4e345dd26e45458a59ca9159a1242712ae1bef960bdebfd2b4943133 | MATLAB | 70 | 6 | function c = filtn(a, b, type)
c = convn(a, flipall(b), type);
end
|
5d9f2c7b9cff380bd32ee9fe8faf7a36d6f73f56effd6180f7e4e01fc063c601 | MATLAB | 73 | 4 | function [m] = max3(x)
% performs max(max(max(x)))
m = max(max(max(x))); |
d76121a7edecd1e487742ca3152a3ed14ece39b9c8197af540584e7ccd8febe5 | MATLAB | 73 | 4 | function [m] = sum3(x)
% performs sum(sum(sum(x)))
m = sum(sum(sum(x))); |
e0bcefc28e096b3545bfc7e1096fe74b857ba115bee311d7d23adac55e089746 | MATLAB | 73 | 4 | function [m] = min3(x)
% performs min(min(min(x)))
m = min(min(min(x))); |
d8455405623cf0e158e6a7faa1be8ce1e65b809ee4fa6975862f4035e360af06 | MATLAB | 74 | 4 | function X = sigm(P)
X = (1 + tanh(P/2)) / 2;
%X = 1./(1+exp(-P));
end |
7d5e2fecfa1f33fa214e745146ed728abb8c6d9a7c5de60f89060dbac72508bc | MATLAB | 75 | 2 | function tf = isfield(ob, varargin)
tf = isfield(struct(ob), varargin{:});
|
ed70c72fe1c68f3d0fb9ce393e59e3c2c22cb4a1915b70fdcdf86f99a7764d44 | MATLAB | 78 | 5 | function [ y ] = sigma( x )
% logistic function
y = 1./(1+exp(-x));
end
|
1c8b1bcf8ab3321b38faf05cdcbebf73ea5d7a3f195f99a9f68aedf7ae74b397 | MATLAB | 79 | 6 | function y = single_exp(in,TE)
Ab=in(1);
T2b = in(2);
y = Ab * exp(-TE/T2b) ; |
23179a24ecc1091381e1ccebe23004c7e3cebe38c31ab2fd8e1b501e4cdc87b5 | MATLAB | 79 | 3 | function Rand = rand_range(N, Min, Max)
Rand = Min + (Max - Min) .*rand(N, 1); |
45b9336bcb8a84a864cb1d0fc3e63902440131cea093846db6e8887f53eaf826 | MATLAB | 79 | 4 | function edit(obj)
%EDIT Edit the config file
edit(obj.configFile);
end |
175b391c3745702a2ceddb91e296372163ddef9e8736c9780dcc6288325c092c | MATLAB | 82 | 5 | function f=scale_fid(f,sc)
for k=1:length(f)
f(k).fid = f(k).fid.*sc(k);
end
|
1afe984a36dbab62f373a3668c75a61496f0af704672bb1a474612d90f9a428c | MATLAB | 82 | 4 | function dist = w_EuclidDist(x,y, weights)
dist = sqrt(sum(weights.*(y-x).^2));
|
a54cb9ad43cab0a93560476c1d8e529ddca9dde89e0eb38e4d2f5f280b697251 | MATLAB | 83 | 5 | function f=remove_firsts_fid(f,skip)
for k=1:length(f)
f(k).fid(:,skip)=[];
end
|
5978ce95a63a8c1dc022f148a575af89431f014d31f04da41e104fb7d27577e8 | MATLAB | 86 | 5 | function X = flipall(X)
for dimind = 1 : ndims(X)
X = flip(X, dimind);
end
end |
f940e8b4ecdbc61a62ffca24e0ba2e4a64b55c82aeadfc64fc729ee5d5399730 | MATLAB | 87 | 6 | function c=adif(a,b)
if abs(a-b)>pi
c=2*pi-abs(a-b);
else
c=abs(a-b);
end
|
fcb8a1cf828e6797ca0c9429a0e778efbb51eae0cfd5506814dcf230936afc5c | MATLAB | 87 | 3 | function cosTheta = calcCosineTheta(v1,v2)
cosTheta = dot(v1,v2)./(norm(v1)*norm(v2)); |
6f21a3fab6132030d673a855c19ff8d86da1d61bf0005d7ea09d0e75b03db360 | MATLAB | 89 | 3 | function nn = nrmse(xtrue, xhat, dummy)
nn = norm(xhat(:) - xtrue(:)) / norm(xtrue(:));
|
ae4e823ad37df4d68476704dce41abddb6fdfe1d26ce667513443d19b6611a58 | MATLAB | 93 | 4 | function [ nV ] = normalize_zero_one( V )
nV = (V - min(V)) / ( max(V) - min(V) );
end
|
1c45c8e1acee8724f5b511962beac350c5e91f91946f7f2250939e29b343fe70 | MATLAB | 94 | 5 | % P(X>=x)
function P = probability(X,Y,x)
dx = X(2)-X(1);
P = sum( double(X>=x) .* Y * dx );
|
7eae8be9bda15a696483880f043a4f0f1aa7752d49c93442e4924c1d931fbf4f | MATLAB | 99 | 5 | function b = uminus(a)
%function b = uminus(a)
% unary minus method for this class
b = (-1) * a;
|
3d7b3d651fde211d56d6a3e51c5bb665e9f4c223c5654455ec9e65c1b9df6793 | MATLAB | 100 | 6 | function n = nrow(x)
% function n = nrow(x)
% Return number of rows in x.
n = size(x); n = n(1);
|
f1f1a88cd24e88ee6f8e9f409cd239af108fe418926df5bd1e823d5140864775 | MATLAB | 101 | 8 | % Script for reslicing ROIs
clear; close all;
addpath /ZPOOL/data/tools/spm12/;
savepath;
spm fmri |
83d70af53b79ae0e1578bcbe8f735c79700a6343f5309b5286944bef25bffdff | MATLAB | 102 | 4 | function resetPositions(obj)
obj.figApply(@(hFig) hFig.resetPos());
obj.allToForeground();
end |
9abfd6924ec63b66e8f4ccd2c1e7467a2512bcb2b9d69ca0aa8213993810f5ee | MATLAB | 103 | 2 | %% data description
% the data was recorded every 10 iters, in total of 10*epoch in the processed data |
d0c609ef94172757cb4629a92e8b303387b273f858844186a4589929b3835894 | MATLAB | 103 | 5 | function c = minus(a, b)
%function c = minus(a, b)
% "minus" method for this class
c = a + (-1 * b);
|
d7bc9dab92b8afe4c939671a1aacde8da8b4985ef3fe1da90496e9290b4fc70a | MATLAB | 105 | 8 | function [y]=Lorentzian(v,x)
y0=v(1);
A=v(2);
w=v(3);
x0=v(4);
y=y0+(2*A/pi).*(w./(4*(x-x0).^2+w.^2));
|
bb1580915cbce7fb5b2e69bbd04f55f160439098e82e20e867a6f99d51e74a22 | MATLAB | 106 | 6 | %function to half vectorize a matrix: A
function vec_h = half_vec(A)
vec_h = A(tril(true(size(A))));
end |
c06113c01df47b27cec71aabb3f56352b4d1248d2ab806c5e24ffd8fa6b26c84 | MATLAB | 107 | 3 | function Files_List = List_All_Files(Dir1,Ext)
Files_List = dir([Dir1,filesep,'**',filesep,'*.',Ext]);
end |
010a3c2f320a0c8ba75b5491fdc858ebad34a653217bc04ffc32798df6fee9a5 | MATLAB | 112 | 6 | function out = fatrix2_omask_array(st)
if isempty(st.omask)
out = true([st.odim 1]);
else
out = st.omask;
end
|
51c4ed2122ba6c37f12b3d78f82f8b0bff6a676c7e8a2488d5276da40d6fa750 | MATLAB | 112 | 6 | function out = fatrix2_imask_array(st)
if isempty(st.imask)
out = true([st.idim 1]);
else
out = st.imask;
end
|
8e99fb00f7cb7c778fc12af7debef891590aebb5d7cc0a19fd8d8a55b5e1a7e6 | MATLAB | 112 | 3 | function value = test_folder()
value = spm_file(fullfile(fileparts(mfilename('fullpath')), '..'), 'cpath');
end |
7f69516655df49cce3eb493c08558760f5a39001cf96319dec0dde9407d6c12b | MATLAB | 113 | 5 | function c = plus(a, b)
%function c = plus(a, b)
% "plus" method for this class
c = fatrix2_block_sum({a, b});
|
f1b95cd07358ce0bca652a5b4398e827e69f2e629109737a67a8a86cbfe4e9a0 | MATLAB | 113 | 6 | function copyFile()
original_file_path = 'C:\Users\RNEL\Desktop\merge_adi_test\large_file_to_copy.adicht';
end |
29739ea7a15f49e8078ec679b7817adbcc099fc4d642eb0163e3133cd9ae7bac | MATLAB | 114 | 9 | function SD = propSD(p,n)
if numel(n)>1
error('n must be a single count')
end
SD = sqrt((p.*(1-p))./n);
end |
5215f0742457c6bafff1cc19c1eeddf907d1aef69dfe7cb4809c0b59b40490a6 | MATLAB | 114 | 9 | function y = soft(x,T)
if sum(abs(T(:)))==0
y = x;
else
y = max(abs(x) - T, 0);
y = y./(y+T) .* x;
end
|
0bcdc57b933f65f333d98a1cd4b49326f5785bc1485aac0a16e72ae7d1755076 | MATLAB | 116 | 4 | function [files] = jdir(folder, re)
%[files] = jdir(folder, regexp)
files = dir([folder '\' re]);
end |
cf38ffe853d57406f142a48b84b928c6741f7fd75eef207b53b9a97131197166 | MATLAB | 116 | 6 | function error(obj, emsg)
%ERROR Raise an error
obj.isError = 1;
obj.errMsg = emsg;
error(emsg);
end |
50bb5df4ea2259492c7eb237c48ad2c332dcbd3631bf973a8bef2950a4b7235d | MATLAB | 117 | 5 | function output = c0(input)
%
% Helper function for correcting inputs to the mex function
output = int32(input-1); |
9868961ee132c559074fa82a75056eef319db8701b4ed37c125343544f26289a | MATLAB | 117 | 4 | % Call Directories where ALL scripts are
%% ADDING ALLSCRIPTS
ActualDir=pwd;
addpath(genpath([ActualDir,'\Scripts'])) |
442bb6f72f724d18b1142d4248abc3b47f783e5fb1071d309bbe1757119d5e21 | MATLAB | 119 | 13 | function res = mtimes(a,b)
% res = mtimes(FT, x)
%
if a.adjoint
res = a.At(b);
else
res = a.A(b);
end
|
b5162b7b88121708b8e59599da6e91eaa21cd47e7fff132f86870c4a85b445d1 | MATLAB | 120 | 9 | function fo = sum_fid(fids,descr)
fo=fids;
for nbser = 1:length(fids)
fo(nbser).fid =sum( fids(nbser).fid,2);
end
|
1525c9b069408ad80b00fd8472bbcbc0210beae22c0d94187cd559c2d006027a | MATLAB | 122 | 7 | function tryClose(h)
%TRYCLOSE Try to close a handle, fail gracefully
try
close(h);
catch
end
end
|
a3b781f2f4b84334d9ed2a73b4e3c7698b9c26e0dfc7221414da1171379742eb | MATLAB | 123 | 11 | function [A] = setUpperTri2NaN(A,k)
if nargin<2
k=-1;
end
ii=ones(size(A));
idx=tril(rot90(ii),-1);
A(~idx)=nan;
end |
90b026e4b292b6c767e12c20266ca6c3965b550f85f2ec2c6f9c3b0635af013a | MATLAB | 124 | 4 | function output = XxGetIntesPrctile(data,prc)
intens = prctile(data(:),prc);
output = mean(data(data > intens));
end |
375c722c08cc4a40d5b1b81ef0b6dcd8291d9cd1405f27db7b3158d585ff31b0 | MATLAB | 125 | 4 | function y = fatrix2_def_forw(M, x)
%function y = fatrix2_def_forw(M, x)
%| basic default 'forw' function: M * x
y = M * x;
|
3acf544c45523c78ae4d30dd9a226b4dc1ee7ecc4081847500e7bd0a897193c7 | MATLAB | 125 | 4 | function VI_sim = VIn_similarity(C)
VIm = partition_distance(C);
VI_sim = mean(squareform(VIm - diag(diag(VIm))));
|
64dac6d546555628218db70487ee11a4a82b4b9e6de6a7c3054b7f5a49759790 | MATLAB | 126 | 5 | function lpc_magspec = get_lpc_magspec(lpc_coeffs,faxis,fs)
H_lpc = freqz(1,lpc_coeffs,faxis,fs);
lpc_magspec = abs(H_lpc);
|
7a02b684b201937b897cbf1b61eab9345c5f593d4c9bb170a2fb1621c3a5eb32 | MATLAB | 126 | 7 | % Setting Colors
% See CBREWER function's Help
KindMap='qual';
ColorMapName='Dark2';
Ncolors=8;
% SAME AS in:
% ...\intelAIMs |
52a07ab4a2a8134a304ff5797f60b8ae9867db5b1305f6d2960004a4e3a873f0 | MATLAB | 127 | 4 | function x = fatrix2_def_back(M, y)
%function x = fatrix2_def_back(M, y)
%| basic default 'back' function: M' * y
x = M' * y;
|
7c1e2656bc473c662a92767fd9fce6404153ef29f0acfaa9a0ab43fe52922efb | MATLAB | 127 | 4 | function ob = fatrix2_def_pow(M, p)
%function ob = fatrix2_def_pow(M, p)
%| basic default 'pow' function: M .^ p
ob = M .^ p;
|
a45ba8fb9c1dda76aac8432df7a21cb8ebcf2840202ea1d6b94a4c57da39c735 | MATLAB | 127 | 7 | function a = soft(a)
a = exp(bsxfun(@minus, a, logsumexp(a, 2)));
%a = exp(a) ./ repmat(sum(exp(a), 2), 1, size(a, 2));
end
|
a7cfbc077280326a2f92ba5ad5c1dec8efff0210d869bd5318f960403b4437b1 | MATLAB | 128 | 6 | function h = circle(x,y,r)
hold on
th = 0:pi/50:2*pi;
xunit = r * cos(th) + x;
yunit = r * sin(th) + y;
h = plot(xunit, yunit);
|
fb79c82d3ec6570450fda3629085672e3aff22cbad18a5e2c6879c7f1759a86e | MATLAB | 130 | 5 | function f = fcn_rickplot(pos)
f = figure(...
'units','inches',...
'position',pos,...
'paperpositionmode','auto'); |
3d67a10d68e161cd024fa1208d1f78a4b97fbdd6ae78c4503e63f5d8d51f24b4 | MATLAB | 131 | 3 | cd('I:\My Drive\ELYASHIV\PFC_paper_results_after_revision\effect size\f5\k')
x = importdata('cluster.mat');
stats=mestab(x.table) |
7bfe066ef0e805189f25d703d57ba70cf145f603b6b1babc97d429aff267928b | MATLAB | 131 | 8 | function y = double_exp(in,TE)
Ab=in(1);
T2b = in(2);
Acsf = in(3);
T2csf = in(4);
y = Ab * exp(-TE/T2b) + Acsf * exp(-TE/T2csf); |
7d45668b47a50b5329b15612d4886ca2e70ab57da341a5089793daced491f217 | MATLAB | 131 | 5 | function [ H ] = entropy_multi_gauss( Cov, D )
%ENTROPY_MULTI_GAUSS
H = 0.5 * logdet(Cov,'chol') + 0.5*D*(1+log(2*pi));
end
|
252ab0def27bb3a2517a6ad3a1d06358e8aec99f8faa9e8a45e4a10e06a2cad4 | MATLAB | 134 | 6 | function [state] = samp_state(probs)
probs = abs(probs)/sum(abs(probs));
k = length(probs);
state = randsample(1:k,1,true,probs);
end |
6c6ea832b972035d952e638a24beebeb0d30e947d611509ab7ac36279caf5438 | MATLAB | 134 | 12 | function R=attenuation(T1,T2,TR,TE)
if ~exist('TE')
TE=68;
end
if ~exist('TR')
TR = 3000;
end
R = exp(-TE./T2).*(1-exp(-TR./T1));
|
98e6e1acdffbc217f7db5bd7ead95187791ecdac65318c1198f592a475bb828b | MATLAB | 134 | 5 | function z = nanlog10(z)
%NANLOG10 Replace negative values with nan to force real log10
z(z <= 0) = nan;
z = log10(z);
end |
7208bfe126310b1ed6104f2cdff3e7a18fd116acde22e695963270b1812fbd4d | MATLAB | 135 | 8 | function weights = genweights_mat(layers, params)
rng(params.seed);
layers = cnnsetup(layers, 1);
weights = getweights(layers);
end
|
08e16e5dc5583d65791f932b70d6804f31e5d7bfcecc2a001c41f27dad1e3c2f | MATLAB | 137 | 5 | function ok = isscalarnum(val)
%ISSCALARNUM Return true iff a val is a numeric scalar
ok = isnumeric(val) && isscalar(val);
end
|
7a03c3fd77c849052e3c045a65323fceb715def42630a745e0a8a8fc823f2838 | MATLAB | 137 | 5 | function ok = ismatrixnum(val)
%ISMATRIXNUM Return true iff a val is a numeric matrix
ok = isnumeric(val) && ismatrix(val);
end
|
b955e24e39917e037bec6e6943db93ce6b699908d80e4a287c8b4f19ba37cbf9 | MATLAB | 137 | 4 | function allToForeground(obj)
%ALLTOFOREGROUND Bring all figures to the foreground
obj.figApply(@(hFig) hFig.toForeground());
end |
1587e341a6bff4a5627b20f90d2e6235f9c0748d44c3a565a030631c4faf7d5d | MATLAB | 138 | 3 | function out = iembed(ob, x)
% recall that imask/omask and idim/odim are swapped on ctranspose
out = fatrix2_embed(ob.imask, ob.idim, x);
|
30ab108fd227baecb5c5bc1ea06835d1efa14e2afd724dc4c25a0a30ea82b84d | MATLAB | 138 | 6 |
% Analyze spectrometer files
% needs to be in the folder that contains all spectrometer files
correct_irradiance_file;
mselect_wls; |
bca19eb422490013efa7af3c381f6fe99a5e32eabce4ce914325a8d30e341494 | MATLAB | 138 | 3 | cd('I:\My Drive\ELYASHIV\PFC_paper_results_after_revision\effect size\f2\j')
x = importdata('sustained_data.mat');
stats=mestab(x.table) |
c358b32721398e7fbe0e873543dc26d06ec14899b899f4fddd2367ffc226c0fa | MATLAB | 138 | 6 | function s = sum(ob)
%function s = sum(ob)
% "sum" method for this class
% sum(M) = 1' * M = (M' * 1)'
s = (ob' * ones(size(ob,1),1))';
|
9bea340aba0feec3bc698398ef7e38df53f66ba60010d90200816b6479938e02 | MATLAB | 140 | 7 | function y = vector_soft(x,tau)
thenorm = norm(x(:),2);
if thenorm <= tau
y = zeros(size(x));
else
y = ((thenorm-tau)/thenorm)*x;
end
|
dfc42822c093d8d51e44a2bf6f24413bcd53e0a4d845fdb84d0ce2d59a431ae4 | MATLAB | 140 | 3 | function out = oselect(ob, y)
% recall that imask/omask and idim/odim are swapped on ctranspose
out = fatrix2_select(ob.omask, ob.odim, y);
|
ee1aab75d4848c626bd6e1ea291749ebe8ef91dbe529ae7f37c80bc457b2a606 | MATLAB | 141 | 7 | function [ITPC] = ITPC_CellFun_raw(chan1_dat)
%calculate ITPC
phase_exp = exp(1i.*(chan1_dat));
ITPC = abs(nanmean(phase_exp,1));
end |
6b9c1310ccd067f883b9db3896365e69bbdf4bb69acd423a3d16e0438b324e14 | MATLAB | 142 | 9 | function [out] = normrows(in)
assert(length(size(in)) == 2);
sq2 = in.^2;
nr2 = sqrt(sum(sq2,2));
out = in./repmat(nr2,[1 size(in,2)]);
end |
d987ea249810c5858d79e37575f5cecd22c2789dbfba48db623c07b7aac762dc | MATLAB | 142 | 5 | function reorderSites(obj, order)
%REORDERSITES Reorder sites according to specified geometry
[~,obj.spatial_idx] = sort(order);
end
|
de2d0a211f0a9cd26353967be42d89cd6aad9e7bb1e4db6e6cbf4faf7ef263b3 | MATLAB | 142 | 6 | function layers = initact(layers, data)
layers{1}.a = data;
layers{1}.a(-layers{1}.eps < layers{1}.a & layers{1}.a < layers{1}.eps) = 0;
end |
e0ea2034456caea6ed1b3696e55fd9a0c35e7cdc6d3abdd1e55dacf5722a7865 | MATLAB | 143 | 8 | function ob = abs(ob)
%function ob = abs(ob)
if isempty(ob.handle_abs)
error 'no abs() method for this object'
end
ob = ob.handle_abs(ob);
|
24286819b1acd9d0a557ab88a76a5b049f8b212ad56322acc0cd383089eefcdc | MATLAB | 145 | 4 | function flag = hasFig(obj, figKey)
%HASFIG Return true if we have a figure by key
flag = ischar(figKey) && isKey(obj.hFigs, figKey);
end |
1a82f538acd21c5106657ac3293ea474ddf1fb7f30478cca8811c41dbfceeb65 | MATLAB | 146 | 9 | function set_axis()
% Set sompe properties of current axis
box('on');
grid('on');
colormap('jet');
set(gca(), 'FontSize', 20);
axis('tight');
end |
5ae44652e85b849e98d685daa2acb31cefcf34981e9663fe7ece7c1184290e13 | MATLAB | 146 | 4 | function kernel = XxGuassianGenerator2D(Nx, Ny, sigma_xy)
kernel = fspecial('gaussian', [Nx, Ny], sigma_xy);
kernel = kernel / sum(kernel(:));
end |
6f32c65a56df4baa814803e8860bdfceb9aed6fa806037c3c35500037ca1ea51 | MATLAB | 146 | 7 | clear;close all;
im=imread('rice.png');
fim=mat2gray(im);
lnfim=localnormalize(fim,4,4);
lnfim=mat2gray(lnfim);
imshow(fim);
figure,imshow(lnfim); |
795e799b50d44b48ceeb620670cdb1d31c57680e3079556d241c6d63c733f35b | MATLAB | 147 | 5 | % Gets Upper Directory
function FileDirSave=getDir2Save()
FileDirSave=pwd;
slashes=find(FileDirSave=='\');
FileDirSave=FileDirSave(1:slashes(end)); |
9465984c9d943fe1b7556ca28d9bb144ef0195c8188b71dc9e872d9aea69f3ce | MATLAB | 148 | 10 | % %%%%%%%%%%%%%%%%%%%%%
function y = operator4fpc(trans,m,n,x,inds,OMEGA)
if ~trans
y = A_dct(x,OMEGA);
else
y = At_dct(x,OMEGA,n);
end
|
b38b6de62203afafb30776920a61ebcb814dd08d2c187ad98e3436d55a425d39 | MATLAB | 148 | 4 | function clearNotes(obj)
%CLEARNOTES Remove all cluster notes
obj.clusterNotes = arrayfun(@(~) '', 1:obj.nClusters, 'UniformOutput', 0);
end |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.