plateform
stringclasses
1 value
repo_name
stringlengths
13
113
name
stringlengths
3
74
ext
stringclasses
1 value
path
stringlengths
12
229
size
int64
23
843k
source_encoding
stringclasses
9 values
md5
stringlengths
32
32
text
stringlengths
23
843k
github
platte/ssparse-master
SB_SPA_MD.m
.m
ssparse-master/SB_SPA_MD.m
2,077
utf_8
b8618fb4cb1123b127627ac6967928f2
function u = SB_SPA_MD(R,f, mu, lambda, gamma, nInner, nBreg,m_spa) [rows,cols] = size(f); % Reserve memory for the auxillary variables N = rows; C_spa = ones(m_spa+1,1); for j = 1:m_spa+1 for js =1:m_spa+1 if js ~= j C_spa(j) = C_spa(j)/(j-js)...
github
platte/ssparse-master
SB_SPA.m
.m
ssparse-master/SB_SPA.m
2,114
utf_8
f2764ff3383026e203e1f106aacccc38
function [u l2_err] = SB_SPA(R,f, mu, lambda, gamma, nInner, nBreg,m_spa,UT) [rows,cols] = size(f); % Reserve memory for the auxillary variables N = rows; C_spa = ones(m_spa+1,1); for j = 1:m_spa+1 for js =1:m_spa+1 if js ~= j C_spa(j) = C_spa(...
github
kirthevasank/if-estimators-master
kernel.m
.m
if-estimators-master/kde/kernel.m
1,272
utf_8
146602cb647fe8a85eabc585d278c900
function K = kernel(X, C, h, order) % Returns the value of the kernel evaluated at the points X centred at C and % with bandwidth h. % Inputs % X : nxd data matrix % C : mxd centre matrix. If empty is initialized to zero(1, d) % h : the bandwidth of the kernel % order : order of the kernel % Ouputs % K : The nxm kernel...
github
kirthevasank/if-estimators-master
kdePickBW.m
.m
if-estimators-master/kde/kdePickBW.m
3,366
utf_8
34c2c3f58393913063c5808838a599c1
function [optBW, kdeFuncH] = kdePickBW(X, smoothness, params, bwLogBounds) % This picks a bandwidth for the KDE. We use k-fold cross validation in the % range specified by bwLogBounds. % If params.getKdeFuncH is True, then it also returns a function handle for the % kde with the optimal bandiwidth. % prelims numDa...
github
kirthevasank/if-estimators-master
kdeLegendreKernel.m
.m
if-estimators-master/kde/kdeLegendreKernel.m
1,283
utf_8
5a4c2ff6b16ab3a41970ed6e72a09aeb
function K = kdeLegendreKernel(X, C, h, order) % Returns the value of the kernel evaluated at the points X centred at C and % with bandwidth h. % Inputs % X : nxd data matrix % C : mxd centre matrix. If empty is initialized to zero(1, d) % h : the bandwidth of the kernel % order : order of the kernel % Ouputs % K : The...
github
kirthevasank/if-estimators-master
kdeGivenBW.m
.m
if-estimators-master/kde/kdeGivenBW.m
3,586
utf_8
f9df94183d2183fdfe392e58ce70ad96
function kde = kdeGivenBW(X, h, smoothness, params) % Implements Kernel Density Estimator with kernels of order floor(smoothness) % for the given bandwidth. You should cross validate h externally. % Inputs % X: the nxd data matrix % h: bandwidth % smoothness: If using a Gaussian Kernel this should be 'gaussian'. ...
github
kirthevasank/if-estimators-master
demo4.m
.m
if-estimators-master/demos/demo4.m
3,878
utf_8
142d1bd9fc433e712ea2b47d36fd966e
function demo4 % Unit tests for functionals on X, Y where they come from a joint distribution % X, Y close all; clear all; fprintf('\nSome demos on conditional functionals of two distribution.\n'); functionals = {'condShannonMI', 'condKLDiv', 'condTsallisDiv'}; tests = {'1D-UnifUnifUnif', 'Indep-Gaussians'...
github
kirthevasank/if-estimators-master
demo2.m
.m
if-estimators-master/demos/demo2.m
3,672
utf_8
d83b47289d2a626114221320185b180a
function demo2 % Unit tests for all one distro functionals close all; clear all; clc; fprintf('\nSome demos on estimating functionals of two distribution.\n'); functionals = {'hellingerDiv', 'tsallisDiv', 'chiSqDiv', 'renyiDiv', 'klDiv'}; tests = {'1D-UnifUnif', '1D-UnifConv', 'Gaussian'}; % This is f...
github
kirthevasank/if-estimators-master
demo3.m
.m
if-estimators-master/demos/demo3.m
3,023
utf_8
a04f8458c27d5dc24e12ad8d51666b47
function demo3 % Unit tests for functionals on X, Y where they come from a joint distribution % X, Y close all; clear all; fprintf('\nSome demos on conditional functionals of one distribution.\n'); functionals = {'shannonMI', 'condShannonEntropy'}; tests = {'1D-UnifUnif', 'Indep-Gaussians', 'Gaussian'}; ...
github
kirthevasank/if-estimators-master
demo1.m
.m
if-estimators-master/demos/demo1.m
2,498
utf_8
4b96dcf8d3e11832fb9d9f5c725ae646
function demo1 % Unit tests for all one distro functionals close all; clear all; clc; fprintf('\nSome demos on estimating functionals of a single distribution.\n'); functionals = {'shannonEntropy'}; tests = {'1D-Uniform', '1D-Conv', '2D-Gaussian'}; % This is for storing parameters specific to the func...
github
kirthevasank/if-estimators-master
klDivergence.m
.m
if-estimators-master/estimators/klDivergence.m
1,285
utf_8
9014a792eea5eac1bd21d21cebce4a8b
function [estim, asympAnalysis, bwX, bwY] = klDivergence(X, Y, ... functionalParams, params) % Estimates the KL Divergence between f and g where X comes from f and Y comes % from g. params = parseTwoDistroParams(params, X, Y); [estim, asympAnalysis, bwX, bwY] = ... getTwoDistroInfFunAvgs(X, Y, @klInfFunX, @k...
github
kirthevasank/if-estimators-master
shannonEntropy.m
.m
if-estimators-master/estimators/shannonEntropy.m
572
utf_8
9b57ad6b1e7301efb646b877e15eb959
function [estim, asympAnalysis, bw] = shannonEntropy(X, functionalParams, params) % This estimates the shannon entropy -\int plog(p) params = parseOneDistroParams(params, X); [estim, asympAnalysis, bw] = getInfFunAvgs(X, @entropyInfFun, ... @entropyAsympVar, params); end function infFunVals = entropyInfFun(den...
github
kirthevasank/if-estimators-master
ut_oneDistro.m
.m
if-estimators-master/estimators/ut_oneDistro.m
2,667
utf_8
dd2ceda932e6b8585a133ef55711896b
function ut_oneDistro % Unit tests for all one distro functionals addpath ../kde close all; clear all; rng('default'); functionals = {'shannonEntropy'}; tests = {'1D-Uniform', '1D-Conv', '2D-Conv'}; functionalParams = struct; params = struct; params.alpha = 0.05; params.doAsympAnalysis = true; p...
github
kirthevasank/if-estimators-master
ut_twoDistro.m
.m
if-estimators-master/estimators/ut_twoDistro.m
1,895
utf_8
a2680e5cdae9574d5ea4ae58fab0e3d8
function ut_oneDistro % Unit tests for all one distro functionals addpath ../kde close all; clear all; functionals = {'hellingerDiv'}; tests = {'1D-UnifUnif', '1D-UnifConv'}; functionalParams = struct; params = struct; params.alpha = 0.05; params.doAsympAnalysis = true; % Test 1 %%%%%%%%%%%%%%%...
github
kirthevasank/if-estimators-master
fAlphaGBeta.m
.m
if-estimators-master/estimators/fAlphaGBeta.m
1,662
utf_8
bae2bee469820fa89770ee39ac94302a
function [estim, asympAnalysis, bwX, bwY] = ... fAlphaGBeta(X, Y, functionalParams, params) % Estimates the integral \int f^alpha g^beta where beta = 1-alpha. X comes % from f and Y comes from g. functionalParams should contain the field alpha. params = parseTwoDistroParams(params, X, Y); infFunX = @(u,v) fA...
github
Christiaanvandertol/SCOPE-master
lut_search.m
.m
SCOPE-master/src/+lut/lut_search.m
1,658
utf_8
4c9813edf5966c6cdfc5f38cf0133a55
function [res, res_std] = lut_search(params, lut_params, response) %% check validity: all lut params in params p_names = params.Properties.VariableNames; lut_names = lut_params.Properties.VariableNames; % absent = setdiff(lut_names, p_names); % assert(isempty(absent), '%s parameter must be in inpu...
github
Christiaanvandertol/SCOPE-master
bin_to_csv.m
.m
SCOPE-master/src/IO/bin_to_csv.m
5,756
utf_8
ea668c6b5838d7f867287651868cb0d7
function bin_to_csv(fnames, V, vmax, n_col, ns) %% pars if sum(vmax>1) write_output(['n_pars', {V(vmax>1).Name}], {''}, fnames.pars_file, n_col.pars, ns) end %% aPAR apar_names = {'simulation_number', 'year', 'DoY', 'iPAR', 'iPARE', 'LAIsunlit', 'LAIshaded'... 'aPARtot', 'aPARsun', 'aPARsha',... 'aPARCabtot...
github
Christiaanvandertol/SCOPE-master
fluspect_B_CX.m
.m
SCOPE-master/src/RTMs/fluspect_B_CX.m
9,787
utf_8
5290f36318db731d7d3c2ecc677e5b35
function leafopt = fluspect_B_CX(spectral,leafbio,optipar) % % function [leafopt] = fluspect(spectral,leafbio,optipar) % calculates reflectance and transmittance spectra of a leaf using FLUSPECT, % plus four excitation-fluorescence matrices % % Authors: Wout Verhoef, Christiaan van der Tol (c.vandertol@utwente.nl), %...
github
Christiaanvandertol/SCOPE-master
RTMo.m
.m
SCOPE-master/src/RTMs/RTMo.m
36,593
utf_8
bee76f8b9360cfc63a65dd9ee097f430
function [rad,gap,canopy,profiles] = RTMo(spectral,atmo,soil,leafopt,canopy,angles,constants,meteo,options) % calculates the spectra of hemisperical and directional observed visible % and thermal radiation (fluxes E and radiances L), as well as the single % and bi-directional gap probabilities % % the function does n...
github
Christiaanvandertol/SCOPE-master
RTMz.m
.m
SCOPE-master/src/RTMs/RTMz.m
10,359
utf_8
37bdc512c7b4853b0294e2ca2a0f9074
function [rad] = RTMz(constants,spectral,rad,soil,leafopt,canopy,gap,angles,Knu,Knh) % function 'RTMz' calculates the small modification of TOC outgoing % radiance due to the conversion of Violaxanthin into Zeaxanthin in leaves % % Author: Christiaan van der Tol (c.vandertol@utwente.nl) % Date: 08 Dec 2016 % ...
github
Christiaanvandertol/SCOPE-master
RTMt_sb.m
.m
SCOPE-master/src/RTMs/RTMt_sb.m
7,495
utf_8
ebda63214b86ac5a6bdfe5beabce834c
function [rad] = RTMt_sb(constants,rad,soil,leafbio,canopy,gap,Tcu,Tch,Tsu,Tsh,obsdir,spectral) % function 'RTMt_sb' calculates total outgoing radiation in hemispherical % direction and total absorbed radiation per leaf and soil component. % Radiation is integrated over the whole thermal spectrum with % Stefan-Boltzma...
github
Christiaanvandertol/SCOPE-master
BSM.m
.m
SCOPE-master/src/RTMs/BSM.m
6,258
utf_8
0e39ebac12bc2036638eabdcf6260e71
function rwet = BSM(soilpar,spec,emp) % Spectral parameters %wl = spec.wl; % wavelengths GSV = spec.GSV; % Global Soil Vectors spectra (nwl * 3) kw = spec.Kw; % water absorption spectrum nw = spec.nw; % water refraction index spectrum % Soil p...
github
Christiaanvandertol/SCOPE-master
ebal_bigleaf.m
.m
SCOPE-master/src/fluxes/ebal_bigleaf.m
12,877
utf_8
86237f68713a8db84719fab75f4d7ff7
function [iter,rad,thermal,soil,bcu,bch,fluxes] ... = ebal_bigleaf(constants,options,rad,gap, ... meteo,soil,canopy,leafbio) % function ebal.m calculates the energy balance of a vegetated surface % % authors: Christiaan van der Tol (c.vandertol@utwente.nl) % Joris Timmermans % d...
github
Christiaanvandertol/SCOPE-master
resistances.m
.m
SCOPE-master/src/fluxes/resistances.m
6,700
utf_8
f0968d6b41183d556a58256965afec89
function [resist_out] = resistances(constants,soil,canopy,meteo) % % function resistances calculates aerodynamic and boundary resistances % for soil and vegetation % % Date: 01 Feb 2008 % Authors: Anne Verhoef (a.verhoef@reading.ac.uk) % Christiaan van der Tol (tol@itc.nl) % ...
github
Christiaanvandertol/SCOPE-master
ebal_sunshade.m
.m
SCOPE-master/src/fluxes/ebal_sunshade.m
12,567
utf_8
bb65697bc5cc76fded6dd518634864f2
function [iter,rad,thermal,soil,bcu,bch,fluxes] ... = ebal_sunshade(constants,options,rad,gap, ... meteo,soil,canopy,leafbio) % function ebal.m calculates the energy balance of a vegetated surface % % authors: Christiaan van der Tol (c.vandertol@utwente.nl) % Joris Timmermans % ...
github
Christiaanvandertol/SCOPE-master
biochemical.m
.m
SCOPE-master/src/fluxes/biochemical.m
24,506
utf_8
34cc1093974dc219492706ec6414a8be
function biochem_out = biochemical(leafbio,meteo,options,constants,fV) % % Date: 21 Sep 2012 % Update: 20 Feb 2013 % Update: Aug 2013: correction of L171: Ci = Ci*1e6 ./ p .* 1E3; % Update: 2016-10 - (JAK) major rewrite to accomodate an iterative solution to the Ball-Berry equation % - also ...
github
Christiaanvandertol/SCOPE-master
biochemical_MD12.m
.m
SCOPE-master/src/fluxes/biochemical_MD12.m
27,278
utf_8
2cdfb981cc02f660f46da17cba02bc0c
function biochem_out = biochemical_MD12(leafbio,meteo,~,constants,fV,Q) %[A,Ci,eta] = biochemical_VCM(Cs,Q,T,eb,O,p,Vcmo,m,Type,Rdparam,stress,Tyear,beta,qLs,NPQs) % Date: 21 Sep 2012 % Update: 28 Jun 2013 Adaptation for use of Farquhar model of C3 photosynthesis (Farquhar et al 1980) % 18 Jul 2013 Inc...
github
Christiaanvandertol/SCOPE-master
ebal.m
.m
SCOPE-master/src/fluxes/ebal.m
13,615
utf_8
4a6297a306fe321d532040bbe2254337
function [iter,rad,thermal,soil,bcu,bch,fluxes,resist_out,meteo] ... = ebal(constants,options,rad,gap, ... meteo,soil,canopy,leafbio,k,xyt,integr) % function ebal.m calculates the energy balance of a vegetated surface % % authors: Christiaan van der Tol (c.vandertol@utwente.nl) % ...
github
Christiaanvandertol/SCOPE-master
leafangles.m
.m
SCOPE-master/src/supporting/leafangles.m
2,171
utf_8
f75c20fd775190446a1b01537666fe9b
function [lidf]= leafangles(a,b) % Subroutine FluorSail_dladgen % Version 2.3 % For more information look to page 128 of "theory of radiative transfer models applied in optical remote sensing of % vegetation canopies" % % FluorSail for Matlab % FluorSail is created by Wout Verhoef...
github
leelening/Contourlet-transform-based-image-compression-code-master
Huffman.m
.m
Contourlet-transform-based-image-compression-code-master/Huffman.m
6,389
utf_8
a0e0a443ff878d9bae16249f1e0266b8
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Dictionary Function % function dict= Dictionary(image_name) % % This function is used to create a huffman dictionary % (generating huffman code) by using tree search method. % Read the image file and get the information disp('Enter the na...
github
leelening/Contourlet-transform-based-image-compression-code-master
fhtree1.m
.m
Contourlet-transform-based-image-compression-code-master/08297407wenben/Huffman3/fhtree1.m
725
utf_8
9856889f9cfb5abda79d3b4174de9a7c
%Hufman tree drawing phase function HT=fhtree1(lst,img) [p,q]=size(lst); [tt,mx]=size(lst); sz1=q; xx=1; k1=0; prt=0; while (k1<1) k1=lst(2)+lst(4); prt=prt-1; lstn(xx)=lst(1); lstn(xx+1)=0; lstn(xx+2)=prt; xx=xx+3; lstn(xx)=lst(3); lstn(xx+1)=1; lstn(xx+2)=prt; xx=xx+3; lst(...
github
leelening/Contourlet-transform-based-image-compression-code-master
fhcode.m
.m
Contourlet-transform-based-image-compression-code-master/08297407wenben/Huffman3/fhcode.m
1,841
utf_8
d2557a7f20d75a5ff9176426ba6932e7
%Hufman code generating phase function HC=fhcode(lstn,img) disp('Code generating phase entered...'); [lm,ln]=size(lstn); ntt=ln-1; [im,in]=size(img); t=0; idd=input('Enter destination huffman code file name : ','s'); tab=input('Enter the Huff Table name (for decoding purpose): ','s'); tb = fopen(tab,'w+'); idd=fopen(id...
github
leelening/Contourlet-transform-based-image-compression-code-master
trible_dec.m
.m
Contourlet-transform-based-image-compression-code-master/3des_matlab/trible_dec.m
976
utf_8
707a189a5a080f34fb731771675e0539
%one round for des encryption function Data=trible_des(temp,kf) r=temp; %initial permutation m=[r(58) r(50) r(42) r(34) r(26) r(18) r(10) r(2) r(60) r(52) r(44) r(36) r(28) r(20) r(12) r(4) r(62) r(54) r(46) r(38) r(30) r(22) r(14) r(6) r(64) r(56) r(48) r(40) r(32) r(24) r(16) r(8) r(57) r(49) r(41) r(33) r(25) r(17)...
github
leelening/Contourlet-transform-based-image-compression-code-master
SBOX.m
.m
Contourlet-transform-based-image-compression-code-master/3des_matlab/SBOX.m
2,020
utf_8
33f96eefde674ca01e35b952e864f2b0
%this program to get sbox value function SValue=des_sbox(ZIn6BitFormat,IndexOfZ) SBox=zeros(4,16,8); SBox(:,:,1)=[14 4 13 1 2 15 11 8 3 10 6 12 5 9 0 7; 0 15 7 4 14 2 13 1 10 6 12 11 9 5 3 8; 4 1 14 8 13 6 2 11 15 12 9 7 3 10 5 0; 15 12 8 2 4 9 1 7 5 11 3 14 10 0 6 13]; SBox(:,:,...
github
leelening/Contourlet-transform-based-image-compression-code-master
KG.m
.m
Contourlet-transform-based-image-compression-code-master/3des_matlab/KG.m
1,030
utf_8
a7548035366a2e46fc8389d92edd2934
%generate the subkey function h=deskg(xl,xr) h=zeros(48*16,1); for i=1:16 switch i case 1 case 2 case 9 case 16 xl=[xl(2:28) xl(1)]; xr=[xr(2:28) xr(1)]; w=[xl xr]; h((i-1)*48+1:i*48)=[w(14) w(17) w(11) w(24) w(1) w(5) ...
github
leelening/Contourlet-transform-based-image-compression-code-master
trible_enc.m
.m
Contourlet-transform-based-image-compression-code-master/3des_matlab/trible_enc.m
972
utf_8
74f51b57ddac56e9cf9f5da27da7022d
%one round for des encryption function Data=trible_enc(temp,kf) r=temp; m=[r(58) r(50) r(42) r(34) r(26) r(18) r(10) r(2) r(60) r(52) r(44) r(36) r(28) r(20) r(12) r(4) r(62) r(54) r(46) r(38) r(30) r(22) r(14) r(6) r(64) r(56) r(48) r(40) r(32) r(24) r(16) r(8) r(57) r(49) r(41) r(33) r(25) r(17) r(9) r(1) r(59) r(51...
github
leelening/Contourlet-transform-based-image-compression-code-master
encryption.m
.m
Contourlet-transform-based-image-compression-code-master/3des_matlab/encryption.m
804
utf_8
77c44c59536acc04c7b4945fbc9c9b80
%one round for trible des encryption function sw=desencryption(m,r,kf) yl=m(1:32); yr=m(33:64); %expansion and permutation x=[yr(32) yr(1) yr(2) yr(3) yr(4) yr(5) yr(4) yr(5) yr(6) yr(7) yr(8) yr(9) yr(8) yr(9) yr(10) yr(11) yr(12) yr(13) yr(12) yr(13) yr(14) yr(15) yr(16) yr(17) yr(16) yr(17) yr(18) yr(19) yr(20) yr...
github
leelening/Contourlet-transform-based-image-compression-code-master
extend2.m
.m
Contourlet-transform-based-image-compression-code-master/00278228contourlet-CP-RLC/contourlet-CP-RLC/extend2.m
1,792
utf_8
607c7de17e89483c3983b26b6987cb80
function y = extend2(x, ru, rd, cl, cr, extmod) % EXTEND2 2D extension % % y = extend2(x, ru, rd, cl, cr, extmod) % % Input: % x: input image % ru, rd: amount of extension, up and down, for rows % cl, cr: amount of extension, left and rigth, for column % extmod: extension mode. The valid modes are: % 'per': period...
github
leelening/Contourlet-transform-based-image-compression-code-master
extend2.m
.m
Contourlet-transform-based-image-compression-code-master/contourlet - 混沌 - 副本/extend2.m
1,792
utf_8
607c7de17e89483c3983b26b6987cb80
function y = extend2(x, ru, rd, cl, cr, extmod) % EXTEND2 2D extension % % y = extend2(x, ru, rd, cl, cr, extmod) % % Input: % x: input image % ru, rd: amount of extension, up and down, for rows % cl, cr: amount of extension, left and rigth, for column % extmod: extension mode. The valid modes are: % 'per': period...
github
leelening/Contourlet-transform-based-image-compression-code-master
huffmanencode.m
.m
Contourlet-transform-based-image-compression-code-master/contourlet-CBC反馈加密 - 副本/huffmanencode.m
2,044
utf_8
5cc2d8fb65e43a935a48a16b6e8c436a
%vector=imread('BABOOEYE.BMP'); %vector=[0.4 0.175 0.15 0.15 0.125]; %vector=uint8(vector); function [zipped,info]=huffmanencode(vector); %vector=imread('BABOO.BMP'); if ~isa(vector,'uint8') error('input must be uint8 vector') end [m,n]=size(vector); vector=vector(:)'; f=frequency(vector); simbols=find(f~=0); f=f(si...
github
leelening/Contourlet-transform-based-image-compression-code-master
extend2.m
.m
Contourlet-transform-based-image-compression-code-master/contourlet-CBC反馈加密 - 副本/extend2.m
1,792
utf_8
607c7de17e89483c3983b26b6987cb80
function y = extend2(x, ru, rd, cl, cr, extmod) % EXTEND2 2D extension % % y = extend2(x, ru, rd, cl, cr, extmod) % % Input: % x: input image % ru, rd: amount of extension, up and down, for rows % cl, cr: amount of extension, left and rigth, for column % extmod: extension mode. The valid modes are: % 'per': period...
github
leelening/Contourlet-transform-based-image-compression-code-master
huffdecode.m
.m
Contourlet-transform-based-image-compression-code-master/contourlet-CBC反馈加密 - 副本/huffdecode.m
794
utf_8
9f6822d58d93024e8333db8e786fda1a
function vector=huffdecode(zipped,info,vector) if ~isa(zipped,'uint8') error('input mudt be a uint8 vector'); end len=length(zipped); string=repmat(uint8(0),1,len*8); bitindex=1:8; for index=1:len string(bitindex+8.*(index-1))=uint8(bitget(zipped(index),bitindex)); end string=logical(string(:)'); len=length(str...
github
leelening/Contourlet-transform-based-image-compression-code-master
Decoding.m
.m
Contourlet-transform-based-image-compression-code-master/contourlet-CBC反馈加密/Decoding.m
2,798
utf_8
73237ff8cad1277573e1a1159a984a4f
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Decoding Function function image1=Decoding(dict,y) % % This function decodes the matrix y into original huffman codes and % compose the codes into orginal image. symbols= (0:255)'; N=length(y); % Elements of the dictionary % symbols=dict...
github
leelening/Contourlet-transform-based-image-compression-code-master
huffmanencode.m
.m
Contourlet-transform-based-image-compression-code-master/contourlet-CBC反馈加密/huffmanencode.m
2,044
utf_8
5cc2d8fb65e43a935a48a16b6e8c436a
%vector=imread('BABOOEYE.BMP'); %vector=[0.4 0.175 0.15 0.15 0.125]; %vector=uint8(vector); function [zipped,info]=huffmanencode(vector); %vector=imread('BABOO.BMP'); if ~isa(vector,'uint8') error('input must be uint8 vector') end [m,n]=size(vector); vector=vector(:)'; f=frequency(vector); simbols=find(f~=0); f=f(si...
github
leelening/Contourlet-transform-based-image-compression-code-master
extend2.m
.m
Contourlet-transform-based-image-compression-code-master/contourlet-CBC反馈加密/extend2.m
1,792
utf_8
607c7de17e89483c3983b26b6987cb80
function y = extend2(x, ru, rd, cl, cr, extmod) % EXTEND2 2D extension % % y = extend2(x, ru, rd, cl, cr, extmod) % % Input: % x: input image % ru, rd: amount of extension, up and down, for rows % cl, cr: amount of extension, left and rigth, for column % extmod: extension mode. The valid modes are: % 'per': period...
github
leelening/Contourlet-transform-based-image-compression-code-master
huffdecode.m
.m
Contourlet-transform-based-image-compression-code-master/contourlet-CBC反馈加密/huffdecode.m
794
utf_8
9f6822d58d93024e8333db8e786fda1a
function vector=huffdecode(zipped,info,vector) if ~isa(zipped,'uint8') error('input mudt be a uint8 vector'); end len=length(zipped); string=repmat(uint8(0),1,len*8); bitindex=1:8; for index=1:len string(bitindex+8.*(index-1))=uint8(bitget(zipped(index),bitindex)); end string=logical(string(:)'); len=length(str...
github
leelening/Contourlet-transform-based-image-compression-code-master
extend2.m
.m
Contourlet-transform-based-image-compression-code-master/contourlet分解与重构/extend2.m
1,792
utf_8
607c7de17e89483c3983b26b6987cb80
function y = extend2(x, ru, rd, cl, cr, extmod) % EXTEND2 2D extension % % y = extend2(x, ru, rd, cl, cr, extmod) % % Input: % x: input image % ru, rd: amount of extension, up and down, for rows % cl, cr: amount of extension, left and rigth, for column % extmod: extension mode. The valid modes are: % 'per': period...
github
tomazas/icist2015-master
run_experiment.m
.m
icist2015-master/run_experiment.m
3,067
utf_8
a1521b51cc79b61fa2d33fe740676d86
% runs all tests for passed feature function and classifier function function [xfold_kappas] = run(feat_func, class_func, p) addpath('features/'); addpath('classifiers/') addpath('utils/'); addpath('other/'); addpath('libsvm/matlab/'); % structure of the signal % S = struct: % sig1:...
github
tomazas/icist2015-master
test_all.m
.m
icist2015-master/test_all.m
916
utf_8
03073fd7761d686224482f90db128310
% tests passed feature function with all existing classifiers defined in their folder function test_all(feat_func, params, outname, restrict) % find and test all classifiers listing = dir('classifiers/*.m'); % output results to CSV file fp = fopen(outname, 'wt'); fprintf(fp, 'sep=;\n'); % ensure delimiter ...
github
tomazas/icist2015-master
classify_qda.m
.m
icist2015-master/classifiers/classify_qda.m
239
utf_8
39fbd12ee95c45c664474713d60c2189
% Matlab quadratic discriminant analysis classification function [c, training_err] = classify_qda(p, test_data, train_data, train_labels) [c, training_err, post, logl, str] = classify(test_data, train_data, train_labels, 'quadratic'); end
github
tomazas/icist2015-master
classify_knn.m
.m
icist2015-master/classifiers/classify_knn.m
759
utf_8
c3af3e0f68b1d077425dbb64f463e6c5
% function doing kNN classification of data function [c, training_err] = classify_knn(p, test_data, train_data, train_labels) k = 15; % create and train kNN model mdl = ClassificationKNN.fit(train_data, train_labels, 'NumNeighbors', k, 'Distance', 'euclidean'); %train_accuracy = 1-resubLoss(mdl); %...
github
tomazas/icist2015-master
classify_lda.m
.m
icist2015-master/classifiers/classify_lda.m
229
utf_8
f4c89b966d1ab668530f58b45f7efa62
% Matlab linear discriminant analysis classifier function [c, training_err] = classify_lda(p, test_data, train_data, train_labels) [c, training_err, post, logl, str] = classify(test_data, train_data, train_labels, 'linear'); end
github
tomazas/icist2015-master
classify_svm.m
.m
icist2015-master/classifiers/classify_svm.m
556
utf_8
eac20738ec66cdfa1c977a5f3c710df5
% libSVM SVM classifier function [predict_label, training_err] = classify_svm(p, test_data, train_data, train_labels) model = svmtrain(train_labels, train_data, '-c 10 -g 0.07'); fake_labels = zeros(size(test_data,1), 1); % since we don't know the true labels, pass fake ones [predict_label, accuracy, d...
github
tomazas/icist2015-master
get_trials.m
.m
icist2015-master/utils/get_trials.m
4,232
utf_8
2031e732d811c8739618bf2a3f9d40b6
% extract all trials from the EEG signal function [s, trials, csp_matrix] = get_features(s,h,p,bare) fprintf('Removing signal artifacts...\n'); if ~bare % apply some post processing s = strip_artifacts(s,h.SampleRate); end num_samples = size(s,1); num_channels = size(s,2); signal_time ...
github
tomazas/icist2015-master
eval_feats.m
.m
icist2015-master/utils/eval_feats.m
1,311
utf_8
c991cac4b11c85bcff20ac7e1f68be3d
% extract features, classify them and verify correctness using 10xfold crossvalidation function [training_err, testing_err, tenfold_train_err, tenfold_test_err] = eval_feats(p, feat_func, class_func, train_trials, test_trials, train_labels, test_labels) [train_data, test_data] = feat_func(p, train_trials, test_tri...
github
tomazas/icist2015-master
normalize.m
.m
icist2015-master/utils/normalize.m
418
utf_8
2f0fb3740db686cffce612a503475860
% normalize signal function ret = normalize(s,mode) if nargin < 2 mode = 0; end if mode == 0 % 0 mean and unit variance mu = mean(s(:)); sigma = sqrt(var(s(:))); ret = (s - ones(size(s))*mu) ./ sigma; else % 0 mean, norm by max amplitude mu =...
github
tomazas/icist2015-master
channel_diff_feats.m
.m
icist2015-master/features/channel_diff_feats.m
1,657
utf_8
244e628440eba1e513f6ef284dface87
% implementation of channel difference filtering for feature generation function [train_data, test_data] = channel_diff_feats(p, train_trials, test_trials, train_labels, test_labels) [channels, samples, trials] = size(train_trials); ch = [8 10 12 20]; ky = [ 2 3 9 15 14 7 0 0; ... ...
github
clzirbel/Random_Processes-master
transition_matrix_powers.m
.m
Random_Processes-master/Matlab/transition_matrix_powers.m
1,854
utf_8
3770b2d90d4ed31dca7dee5cb1de4504
% transition_matrix_powers(P,n,minimumstate) uses grayscale heatmaps to display powers n of the matrix P % the variable n is a vector of up to 6 numbers % the default value for P is gambler_transition_matrix(10,20,0.5) % the default value for n is n = [1 2 3 20 225 2000] % the default value for minimumstate is 0; state...
github
clzirbel/Random_Processes-master
pcolor_fixed.m
.m
Random_Processes-master/Matlab/pcolor_fixed.m
375
utf_8
2b191f6f780c59f2e26dc4770cf1755d
% pcolor_fixed(x,y,M) adds a last row and column to M and to x and y so that the last row and column are not cut off function [void] = pcolor_fixed(x,y,M) [A,B] = size(M); x(B+1) = max(x) + 1; % add one element y(A+1) = max(y) + 1; % add one element M(A+1,B+1) = 0; % add one row and one column to M...
github
clzirbel/Random_Processes-master
print_matrix.m
.m
Random_Processes-master/Matlab/print_matrix.m
332
utf_8
a0b5663716524439e9d757980e80325f
% print_matrix(P) prints a matrix to the screen in a reasonable way for probability transition matrices % It is set to print four places after the decimal, but you can adjust that if you want. function [void] = print_matrix(P) [a,b] = size(P); for i = 1:a, for j = 1:b, fprintf('%0.4f ',P(i,j)); end fprintf...
github
clzirbel/Random_Processes-master
gambler_transition_matrix.m
.m
Random_Processes-master/Matlab/gambler_transition_matrix.m
1,131
utf_8
9dddc1124deacd64ba38288f67b4a5b9
% gambler_transition_matrix(m,n,p) is a function which sets up the transition matrix for a gambler's wealth after successive iid bets of 1 dollar. % Input parameters are m, the amount of money the gambler has, n, the amount the opponent has, and p, the probability that the gambler wins each bet. function [P] = gambler...
github
moonlightlane/pitch-detection-master
plotMarker.m
.m
pitch-detection-master/plotMarker.m
995
utf_8
dd91bb4935ce565296f265d887cb745a
%% ------------------------------------------------------------------------ %% the timer callback function definition function plotMarker(... obj, ... % refers to the object that called this function (necessary parameter for all callback functions) eventdata, ... % this parameter is not used but...
github
moonlightlane/pitch-detection-master
MPM_pitch_detection.m
.m
pitch-detection-master/MPM_pitch_detection.m
5,940
utf_8
98c415aade048c651886e027eaebf56c
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Matlab Implementation of MPM pitch detection algorithm %% % Version V1.0 % Date: Feb 15, 2015 % Author: Zichao Wang %% Documentation % This Function implements the MPM pitch detection algorithm % by Dr. Pilip McLeod. You can read more about this algori...
github
moonlightlane/pitch-detection-master
MPM.m
.m
pitch-detection-master/MPM.m
6,113
utf_8
4af452d5e40aa627aa2cf053f2b98ed4
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Matlab Implementation of MPM pitch detection algorithm %% % Version V2.0 % Date: March 16, 2015 % Author: Zichao Wang %% Documentation % This Function implements the MPM pitch detection algorithm % by Dr. Pilip McLeod. You can read more about this algo...
github
moonlightlane/pitch-detection-master
AudioDisplay.m
.m
pitch-detection-master/AudioDisplay.m
5,016
utf_8
e8de62c2d879c6dcbd6204046ee00ab2
function varargout = AudioDisplay(varargin) % AUDIODISPLAY M-file for AudioDisplay.fig % AUDIODISPLAY, by itself, creates a new AUDIODISPLAY or raises the existing % singleton*. % % H = AUDIODISPLAY returns the handle to a new AUDIODISPLAY or the handle to % the existing singleton*. % % AUDIODI...
github
moonlightlane/pitch-detection-master
AudioDisplay.m
.m
pitch-detection-master/AudioDisplay/AudioDisplay.m
5,167
utf_8
24b245e0832673cb8b1bcc4aa9a25a19
function varargout = AudioDisplay(varargin) % AUDIODISPLAY M-file for AudioDisplay.fig % AUDIODISPLAY, by itself, creates a new AUDIODISPLAY or raises the existing % singleton*. % % H = AUDIODISPLAY returns the handle to a new AUDIODISPLAY or the handle to % the existing singleton*. % % ...
github
krzyzanowskim/Google1Password-master
OnePasswordExtension.m
.m
Google1Password-master/Pods/1PasswordExtension/OnePasswordExtension.m
32,137
utf_8
d788cadccae39642009f7fdca943c92e
// // 1Password Extension // // Lovingly handcrafted by Dave Teare, Michael Fey, Rad Azzouz, and Roustem Karimov. // Copyright (c) 2014 AgileBits. All rights reserved. // #import "OnePasswordExtension.h" // Version #define VERSION_NUMBER @(112) static NSString *const AppExtensionVersionNumberKey = @"version_number...
github
jn2clark/2DPhaseRetrieval-master
align_arrays.m
.m
2DPhaseRetrieval-master/Algorithm/align_arrays.m
8,919
utf_8
c69c3de3f92d0f7299b16f9eb0654c45
function [array2] = align_arrays(array1,array2) %jclark %aligns array2 with array1 based on cross corr (upsampled) %get the hkl required for shifting using upsampled cross-corr [h k l]=register_3d_reconstruction(array1,array2); %since we are dealing with intensities for phasing, want only integer %shifting to avoid a...
github
jn2clark/2DPhaseRetrieval-master
bin_data_lite.m
.m
2DPhaseRetrieval-master/Algorithm/bin_data_lite.m
1,994
utf_8
6139b4a47df937bf44755b30a7867f01
function [data] = bin_data_lite(data,params) bin = params.binning; nx=size(data); %pad the array so that it bins exactly x0=nx(2); y0=nx(1); if max(size(nx)) == 2,nx=[nx,1];end disp(' ') disp('Resizing data....') disp(['Current data size [x,y,z] - [',num2str([x0,y0,nx(3)]),']']) while mod(x0,bin(1)) ~=0,x0=x0+1;en...
github
jn2clark/2DPhaseRetrieval-master
align_iterates_lite.m
.m
2DPhaseRetrieval-master/Algorithm/align_iterates_lite.m
12,293
utf_8
47dbea2088c813a37676fae01d88835e
function [aligned_its] = align_iterates_lite( iterates,ind,val,sub_pix) %Jclark % aligns a whole series of iterates % ind is the one to align to. default == 1 % use ind = -1 to align sequenialy, ie. 2 -1,3-2,4-3 etc % set val to any number to do phase offset removal try ind; catch ind = 1; end try val; c...
github
jn2clark/2DPhaseRetrieval-master
breed_iterates_lite.m
.m
2DPhaseRetrieval-master/Algorithm/breed_iterates_lite.m
3,265
utf_8
4e9a67e8d04e9cbbcdace6815756cbc1
function [params] = breed_iterates_lite(params) %jclark %combine iterates for guided algorithm params=set_breed_defaults(params); %assume that each time is aligned (time here is pop) ntimes=size(params.pnm,ndims(params.pnm)); %get the ntimes %get the best disp(' ') disp(['Using ',params.GA_metric,' as the metric f...
github
jn2clark/2DPhaseRetrieval-master
modulus_projector_lite.m
.m
2DPhaseRetrieval-master/Algorithm/modulus_projector_lite.m
1,220
utf_8
d9f340a96b9b3b761e313b60f5f91745
function [pnm error params] = modulus_projector_lite(pn,data,params) % jclark % modulus constraint projector % get estimate for scattered wave psi = fftxy(pn,1); % calculate the current error error=calc_chi(abs(psi(data ~= 0)) ,sqrt(data(data ~= 0))); % replace modulus psi=replace_modulus(psi,sqrt(data),params); % ...
github
jn2clark/2DPhaseRetrieval-master
save_matlabphasing_lite.m
.m
2DPhaseRetrieval-master/Algorithm/save_matlabphasing_lite.m
4,072
utf_8
a173ddb64cc6aca26f9e866f69aaef52
function save_matlabphasing_lite(params) % jclark % saves the output from the phasing % saves the params and images as well as % copying the original script disp(' ') disp('Saving reconstruction....') disp(' ') % create save name from params [ name ] = create_save_name_lite(params); disp(name) disp(' ') % make the ...
github
jn2clark/2DPhaseRetrieval-master
bin_crop_center_lite.m
.m
2DPhaseRetrieval-master/Algorithm/bin_crop_center_lite.m
15,124
utf_8
26d10e090c2df9faed0e50703a6b7dd4
function [ params ] = bin_crop_center_lite(params) %jclark %loads data, aligns data, centers data, crops data, bins data %thresholds data, removes aliens (spurious data) %returns the intensity %set defualts params = set_params_defaults(params); %background subtract flag, 1 =yes. will turn off if no file found do_bg ...
github
jn2clark/2DPhaseRetrieval-master
center_array_lite.m
.m
2DPhaseRetrieval-master/Algorithm/center_array_lite.m
855
utf_8
81c70c566cd3f17ba326b7a0520dcd22
function [ array xyz] = center_array_lite(array) %jclark %returns the ceom, for even arrays want n/2+1 as the center xyz = center_of_mass_v2(array); %remeber order is different to xyz nn = size(array); switch ndims(array) case 2 cent_xyz = [nn(2)/2+1,nn(1)/2+1]; shift_xyz = cas...
github
jn2clark/2DPhaseRetrieval-master
create_annulus.m
.m
2DPhaseRetrieval-master/Algorithm/create_annulus.m
3,445
utf_8
5821c6b0c3ae81a58632eb07bd71087b
function [ annulus ] = create_annulus(n1,n2,rad1,rad2) %jclark vals = sort([rad1,rad2]); nn=min([n1,n2]); [ annulus ] = generate_circle_nd(nn,nn,vals(2))-generate_circle_nd(nn,nn,vals(1)); annulus=zero_pad_ver3(annulus,n2,n1); end function [ circ ] = generate_circle_nd(n1,n2,rad) %jclark [x y]=meshgrid(-n2...
github
jn2clark/2DPhaseRetrieval-master
init_phasing_lite.m
.m
2DPhaseRetrieval-master/Algorithm/init_phasing_lite.m
4,587
utf_8
50d7ff24dfa0a5e97ede7f6218775a55
function params = init_phasing_lite(params) %jclark %init the arrays and support. need to add support for loading a support %need to add for 3D %create support if numel(size(params.data)) == 3 support=zero_pad_ver3(ones(round([params.sy,params.sx,params.sz])),params.nn(2),params.nn(1),params.nn(3) ); else su...
github
jn2clark/2DPhaseRetrieval-master
zero_pad_ver3.m
.m
2DPhaseRetrieval-master/Algorithm/zero_pad_ver3.m
3,049
utf_8
159934675b723e0ecbf918b775a0096a
function [ new_array ] = zero_pad_ver3( input,newx,newy,newz ) %jclark nd=ndims(input); nn=size(input); x=newx-nn(2); y=newy-nn(1); if ndims(input) == 3,z=newz-nn(3);else z=0;end nnc=[floor(x/2),ceil(x/2),floor(y/2),ceil(y/2),floor(z/2),ceil(z/2)]; new_array = init_pad(input,nnc); new_array = init_crop(new_array,...
github
jn2clark/2DPhaseRetrieval-master
iterative_phasing_lite.m
.m
2DPhaseRetrieval-master/Algorithm/iterative_phasing_lite.m
14,464
utf_8
582253a6032e526d0655c5944aab4257
function [params] = iterative_phasing_lite(params) % jclark % performs phasing from diffraction. This version % specifially designed for 2D XFEL data with or without missing % data. params is a structure created using Matlab_phasing_ver1_1.m file % set defaults if they don't exist params = set_defaults(params); % ...
github
jn2clark/2DPhaseRetrieval-master
register_3d_reconstruction.m
.m
2DPhaseRetrieval-master/Algorithm/register_3d_reconstruction.m
8,531
utf_8
63f2f703bb63fdbb0162e28f4c82843f
function [h k l] = register_3d_reconstruction(a,b) %jclark %returns the hkl required to shift b to a %e.g a=circshift(b,[h,k,l]) hk=dftregistration(fft2(squeeze(sum(a,3))),fft2(squeeze(sum(b,3))),100); hl=dftregistration(fft2(squeeze(sum(a,2))),fft2(squeeze(sum(b,2))),100); kl=dftregistration(fft2(squeeze(sum(a,1))),...
github
chuhang/GPS_Refinement-master
vpdetection.m
.m
GPS_Refinement-master/street_image_proc/vpdetection.m
1,876
utf_8
c73ef502a723db8acea3a426ff09870f
%% % Copyright (c) 2011 Chen Feng (cforrest[at]umich[dot]edu) % and the University of Michigan % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2 of the License, or % ...
github
cnettel/jackdaw-master
diffpoisson.m
.m
jackdaw-master/diffpoisson.m
3,089
utf_8
51495bc84269f07bbbfad64b4a071916
function [f] = diffpoisson(scale,y,basey,minval,absrefpoint,filter,qbarrier) mask = ~(y<0 | isnan(y)); rscale = 1./scale; filterrsq = 1./filter.^2; baseyscaled = basey .* rscale; absrefpointscaled = absrefpoint .* rscale; %y(mask) = y(mask) + qbarrier * 0.5 .* rscale(mask) .* filterrsq(mask); f = @(varargin)diff_func...
github
cnettel/jackdaw-master
createwindows.m
.m
jackdaw-master/createwindows.m
2,410
utf_8
c3e3c37f4ef4de7c43631d83ec4b07e1
function [factor, basepenalty] = createwindows(pattern, mask, qbarrier) [dims, side2, fullsize, pshape, cshape] = getdims(pattern); function [factor] = createfilter(filter, pshape, side2, fullsize) shape1 = pshape; shape1(1) = 1 filter1 = repmat(filter, shape1); shapeb = pshape; shapeb(:) = 1; shapeb(2) ...
github
cnettel/jackdaw-master
jackdawlinop.m
.m
jackdaw-master/jackdawlinop.m
1,787
utf_8
22e16c079481273b276029da30627540
function linop = jackdawlinop(pattern, filter) [dims, side2, fullsize, pshape, cshape] = getdims(pattern); if dims == 3 % 3D mode also implies half-pixel shift in centering, for now... %range = linspace(0, -pi + (pi / side), side); range = fftshift(pi / 2 + ((0.25:(side2 - 0.75)) * pi/side2)); %range = fftshift(ran...
github
vsubhashini/caffe-master
classification_demo.m
.m
caffe-master/matlab/demo/classification_demo.m
5,412
utf_8
8f46deabe6cde287c4759f3bc8b7f819
function [scores, maxlabel] = classification_demo(im, use_gpu) % [scores, maxlabel] = classification_demo(im, use_gpu) % % Image classification demo using BVLC CaffeNet. % % IMPORTANT: before you run this demo, you should download BVLC CaffeNet % from Model Zoo (http://caffe.berkeleyvision.org/model_zoo.html) % % *****...
github
PrincetonUniversity/msddm-master
chisq.m
.m
msddm-master/chisq.m
727
utf_8
8fdfa15d3b9563bdd44956ce74dec924
% Compute Chi sq for one set of (correct or incorrect) RTs % QUANTILE WEIGHTS HERE function [val, df,q] = chisq(rtData,tArray,ddmcdf,nTotalTrials) nTrials = length(rtData); % qBins = [.1 .2 .2 .2 .2 .1]; % qBins = [.1 .1 .1 .1 .1 .1]; qBins = [.05 .1*ones(1,9) .05]; cpv = cumsum(qBins); q = quantile(rtData,cpv); q(end...
github
PrincetonUniversity/msddm-master
test_msfit_2stage.m
.m
msddm-master/test_msfit_2stage.m
933
utf_8
8168f9df0e3a3de83c4e729122194ff0
function test_msfit_2stage close all a = [.04 .08]; z = [.215 .215]; realX = [a(1) a(2) z(1)]; s = [.3 .3]; x0 = 0; dl = [0 1]; x0dist = 1; dt = .005; nSims = 5e3; [rt,er,rtP,rtM,tFinal] = sim_msddm(nSims,a,s,dt,z,x0,x0dist,dl) rtResp = -1*(er-1); % responses (>0 for top boundary) %Let's go with fminsearch first....
github
PrincetonUniversity/msddm-master
obj2a1d2z1xT0.m
.m
msddm-master/obj2a1d2z1xT0.m
288
utf_8
cb425a3d7e3d7a5ed42a35f6206a1cd3
% 6 params: 2 drifts, 1 deadline, 2 thresholds, x0, T0 function val = obj2a1d2z1xT0(x,rt,rtResp) a = [x(1) x(2)]; dl = [0 x(3)]; z = [x(4) x(5)]; x0 = x(6); T0 = x(7); % Fixed (experimentally set) values s = [1 1]; tFinal = max(rt) + 3; val = rt2002(rt,rtResp,a,s,z,x0,1,dl,tFinal,T0);
github
PrincetonUniversity/msddm-master
test_msfit.m
.m
msddm-master/test_msfit.m
829
utf_8
a85d9a7a838ccc10fe92f6452df52970
function test_msfit close all a = .09; z = .215; realX = [a z]; s = .3; x0 = 0; x0dist = 1; dt = .005; dl = [0]; nSims = 5e3; [rt,er,rtP,rtM,tFinal] = sim_msddm(nSims,a,s,dt,z,x0,x0dist,dl) rtResp = -1*(er-1); % responses (>0 for top boundary) %Let's go with fminsearch first... opts = optimset('fminsearch'); opts ...
github
PrincetonUniversity/msddm-master
multi_stage_ddm_metrics.m
.m
msddm-master/multi_stage_ddm_metrics.m
9,512
utf_8
2619367bce9b32639e6396f685afdb90
function [mean_RT, mean_ER, mean_RT_plus, mean_RT_minus]=multi_stage_ddm_metrics(a ,s, deadlines, thresholds, x0, x0dist) % Input: % a = vector of drift rates at each stage % s = vector of diffusion rates at each stage % deadlines = vector of times when stages start. First entry should be 0. % thresholds = vector of t...
github
PrincetonUniversity/msddm-master
rt2002.m
.m
msddm-master/rt2002.m
833
utf_8
f65898219ff8ab92ab79916c0de4ef78
% rtResp: >0 for correct, <=0 for incorrect function [val,df] = rt2002(rtData, rtResp, a,s,th,x0,x0dist, ... dl,tFinal,T0) if nargin < 10 T0 = 0; end [tArray,~,yPlus,yMinus] = multistage_ddm_fpt_dist(... a,s,th,x0,x0dist,dl,tFinal); dt = tArray(3)-tArray(2); nShift = round(T0/...
github
PrincetonUniversity/msddm-master
multistage_ddm_fpt_dist.m
.m
msddm-master/multistage_ddm_fpt_dist.m
5,604
utf_8
1677edefa224b4c8179ceed31e9fbf18
function [T,Y, Yplus, Yminus]=multistage_ddm_fpt_dist(a,s,threshold,x0,x0dist,deadlines,tfinal) %Input: % a = vector of drift rates % s = vector of diffusion rates % z = threshold % x0= discretized initial condition support set % x0dist= discretized pdf of the initial condition (equal to 1 if x0 is deterministic) % d...
github
PrincetonUniversity/msddm-master
chisq_rt2002.m
.m
msddm-master/chisq_rt2002.m
471
utf_8
69eb02d73dda5187ce2fac8be934f52d
% rtResp: >0 for correct, <=0 for incorrect function val = chisq_rt2002(rtData, rtResp, a,s,th,x0,x0dist, ... dl,tFinal) [tArray,~,yPlus,yMinus] = multistage_ddm_fpt_dist(... a,s,th,x0,x0dist,dl,tFinal); % From vanila Chi-sq from Ratcliffe Tuerlinckx 2002. nTotalTrials = lengt...
github
StewartNash/particle_diffusion_4-master
updatepositionborder.m
.m
particle_diffusion_4-master/updatepositionborder.m
3,058
utf_8
03d4659b562160fb57bb2c809a815cd5
%PLEASE SUBMIT MODIFICATIONS AND IMPROVEMENTS! %File: updatepositionborder.m (MATLAB) %Version: 0.0 %Author: Stewart Nash %Date: February 27, 2015 %Description: Function returns position of indexed particles given indexed velocity, current position, time increment, index size, and grid size. It also updates the angle ...
github
StewartNash/particle_diffusion_4-master
enlarge.m
.m
particle_diffusion_4-master/enlarge.m
2,780
utf_8
402b9e157cf017ef1c5651a93d3c0182
%PLEASE SUBMIT MODIFICATIONS AND IMPROVEMENTS! %File: enlarge.m (MATLAB) %Version: 0.0 %Author: Stewart Nash %Date: February 26, 2015 %Description: Increases visual size of particle on grid by turning on immediately adjacent (non-diagonal) pixels %Note: Particle index means a consecutive list of integers starting wit...
github
StewartNash/particle_diffusion_4-master
updatedomain.m
.m
particle_diffusion_4-master/updatedomain.m
1,079
utf_8
2b96568fec513123cf95d5a1be9219d9
%PLEASE SUBMIT MODIFICATIONS AND IMPROVEMENTS! %File: updatedomain.m (MATLAB) %Version: 0.1 %Author: Stewart Nash %Date: February 27, 2015 %Description: Function indicates position in square grid where particles are present with a value of 1 %Note: Particle index means a consecutive list of integers starting with 1. ...
github
StewartNash/particle_diffusion_4-master
updatevelocity.m
.m
particle_diffusion_4-master/updatevelocity.m
797
utf_8
7859b8f9d4648c6ebba8b4a3b2adb471
%PLEASE SUBMIT MODIFICATIONS AND IMPROVEMENTS! %File: updatevelocity.m (MATLAB) %Version: 0.0 %Author: Stewart Nash %Date: February 25, 2015 %Description: Update velocity vector given speed and angle of particles %Note: Particle index means a consecutive list of integers starting with 1. %>>>>Input Parameters<<<<% %...
github
rodrigo-garcia-leon/thesis-matlab-master
matrix2latex.m
.m
thesis-matlab-master/Text/matrix2latex.m
18,532
utf_8
ec33fe311ffa88b2054d61286564a88f
function varargout = matrix2latex(varargin) % MATRIX2LATEX M-file for matrix2latex.fig % MATRIX2LATEX, by itself, creates a new MATRIX2LATEX or raises the existing % singleton*. % % H = MATRIX2LATEX returns the handle to a new MATRIX2LATEX or the handle to % the existing singleton*. % % MATRIX2...
github
rodrigo-garcia-leon/thesis-matlab-master
plotlangendijk2002.m
.m
thesis-matlab-master/tb_AMT/monaural/plotlangendijk2002.m
14,332
utf_8
f7fdc99f6cc242e006ab476d31d63d98
function out = plotlangendijk2002( p,rang,tang,varargin) %PLOTLANGENDIJK2002 plots pdf-matrixes with gray colormap according to Langendijk et al. (2002) % Usage: plotlangendijk2002(p,rang,tang); % % Input parameters: % p : pdf-matrix for all target and response positions % rang : response angles %...
github
rodrigo-garcia-leon/thesis-matlab-master
baumgartner2014.m
.m
thesis-matlab-master/tb_AMT/monaural/baumgartner2014.m
12,856
utf_8
44a8ace62c76c6065b5a8002f507ad0f
function varargout = baumgartner2014( target,template,varargin ) %BAUMGARTNER2014 Model for localization in saggital planes % Usage: [p,respang] = baumgartner2014( target,template ) % [p,respang,tang] = baumgartner2014( target,template ) % [p,respang,tang] = baumgartner2014( target,template...