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
atcollab/at-master
mpi_sweep_octave_example.m
.m
at-master/utils/mpi_sweep/mpi_sweep_octave_example.m
1,866
utf_8
e5088c7fd19ff8ffbebb60ba590827e1
#!/usr/bin/env octave function mpi_sweep_octave_example ## Make sure that AT source files are in path. ## For this go to atoctave folder and run ## > octave --eval 'bootstrap;savepath' ## this code will run on all MPI nodes D1.FamName = 'DR01'; D1.Length = 3; D1.PassMethod = 'DriftPass'; QF.FamName...
github
atcollab/at-master
updateContents.m
.m
at-master/atmat/updateContents.m
5,941
utf_8
8148907889c137a3c59883ffcfc38592
function updateContents(folder) %UPDATECONTENTS Create a Contents.m file including subdirectories % % UPDATECONTENTS scans through the current directory, and % its subdirectories, and builds a Contents file similar to Matlab's % report-generated Contents.m files. Any existing Contents.m file will be % overwrit...
github
atcollab/at-master
getContents.m
.m
at-master/atmat/getContents.m
6,308
utf_8
3b7c2a87d47634bac780fdaf77e0a825
function [cont,dirflag] = getContents(directory,varargin) %GETCONTENTS Get the contents of a specified directory % % This function returns the contents of a specified directory. % % CONT = IOSR.GENERAL.GETCONTENTS(DIRECTORY) returns the files and % folders in a directory and returns them to the cell array cont. I...
github
atcollab/at-master
atsurvey2spos.m
.m
at-master/atmat/pubtools/atsurvey2spos.m
1,453
utf_8
e8ffa61b0458986160f7eafd9cd58d4e
function [s,distance]=atsurvey2spos(r,xycoord,varargin) % returns closest lattics s coordinates to xycoord points % % input: % r: AT lattice % xycoord: 2xN vector of [x,y] cartesian coordinates % 'slices', value: number of slices to split r % (more slices = more precision, longer computation ...
github
atcollab/at-master
freqsearch.m
.m
at-master/atmat/pubtools/freqsearch.m
12,397
utf_8
1143d29bbd7a626f9c9191e6855bc291
function varargout = freqsearch3(data, varargin) % ========================================================================= % Find the frequency terms in the data set with the use of filters and FFT % or a "search" algorithm (slower but more accurate). The function returns % the number of oscillations per unit tim...
github
atcollab/at-master
calc_TouschekPM.m
.m
at-master/atmat/pubtools/calc_TouschekPM.m
4,625
utf_8
d66ee65b0c9d7c29acb6ab9a729fc914
function tauT = calc_TouschekPM(TD,dppPM,Trf,Ib,U0,coupling, sigE, emit_x) %tauT = calc_TouschekPM(TD,dppPM,Trf,Ib,U0,coupling, sigE, emit_x) %tauT = calc_TouschekPM(TD,dppPM,alpha,Ib,U0,coupling, sigE, emit_x) % Ib, mA, single bunch current % U0, MeV, one-turn energy loss % emit_x, nm-rad % couplin...
github
atcollab/at-master
atundulator.m
.m
at-master/atmat/pubtools/atundulator.m
3,079
utf_8
d56ceb8dae400fe56478e891f72882d5
function undulator=atundulator(LUnd,nperiod,varargin) % define undulator model % % input: % Lund= undulator length % nperiod = number of periods % 'BendAngle', value : half pole bending angle in rad % 'B0andEnergy', value (2x1): [half pole B0 field in T, Energy in eV] % converts ...
github
atcollab/at-master
atdynap.m
.m
at-master/atmat/pubtools/atdynap.m
1,887
utf_8
48612afda2e9f15e132e97e7e074d0ff
function [xx,zz]=atdynap(ring,nt,dpp,rfrac) %ATDYNAP Compute the dynamic aperture % % %[XX,ZZ]=ATDYNAP(RING,NTURNS,DPP,RFRAC) % %XX,ZZ : limit of the dynamic aperture (betatron amplitudes in m) %RING : Structure for tracking %NTURNS: Number of turns %DPP : Off-momentum value (default: 0) %RFRAC : Resolution of the g...
github
atcollab/at-master
calc_Touschek.m
.m
at-master/atmat/pubtools/calc_Touschek.m
4,772
utf_8
723aa4acb63d395f0cb6103c70bbc674
function tauT = calc_Touschek(THERING,Ib,varargin) %tauT = calc_Touschek(THERING, Ib) %tauT = calc_Touschek(THERING, Ib,hori_acceptance) %tauT = calc_Touschek(THERING, Ib,hori_acceptance,U0) %tauT = calc_Touschek(THERING, Ib,hori_acceptance,U0,coupling) %tauT = calc_Touschek(THERING, Ib,hori_acceptance,U0,coupling...
github
atcollab/at-master
fitgaussian.m
.m
at-master/atmat/pubtools/haissinski/fitgaussian.m
7,136
utf_8
209df9e5c867353dfd6bfa850f67c4fa
function varargout = fitgaussian(varargin) % GAUSSIAN_PARAM FITERR GAUSSFIT SIGERROR]= FITGAUSSIAN(DATA,[property_value_pair]); % % DATA is a 1D vector to which we want to fit a gaussian profile. The % function will return a structure with various fitted parameters. % SCALEFACTOR is optional and is applied in t...
github
atcollab/at-master
atset_s_shift.m
.m
at-master/atmat/pubtools/LatticeTuningFunctions/errors/atset_s_shift.m
3,577
utf_8
a6ba1e6975dcd22aa1ac788c38c0fff6
function rerr=atset_s_shift(r,pos,DS) %ATSET_S_SHIFT Implements DS longitudinal position drift % by changing drifts at the sides of the % elements defined by pos in r % % for dipoles the T2(1) field is also changed and the the out DS is % modified: % T2(1)=DS*sin(bendignangle) % DSout=DS*cos(bendignangle) % % pos and D...
github
atcollab/at-master
atsettiltdipole.m
.m
at-master/atmat/pubtools/LatticeTuningFunctions/errors/atsettiltdipole.m
3,004
utf_8
5bd60291c9e71410d38e824b88914a14
function ring=atsettiltdipole(varargin) %ATSETTILTDIPOLE sets the entrance and exit rotation matrices % of an element or a group of elements in THERING % % RING=ATSETTILTDIPOLE(RING,ELEMINDEX, PSI) % ELEMINDEX contains indexes of elements to be rotated % PSI - angle(s) of rotation in RADIANS % POSITIVE PSI correspond...
github
atcollab/at-master
getMagGroupsFromGirderIndex.m
.m
at-master/atmat/pubtools/LatticeTuningFunctions/errors/errorsmanipulation/getMagGroupsFromGirderIndex.m
559
utf_8
28b01fd7aaceb36986e1ab6c9514de1a
function maggroups=getMagGroupsFromGirderIndex(r) %GETMAGGROUPSFROMGIRDERINDEX Gets magnets on a girder % output maggroups in r with indexes between GS and GE markers. % % maggroups is a cell array of magnet indexes describing a single magnet in % reality, but sliced in the lattice % a single magnet has the same MagNum...
github
atcollab/at-master
ThetaPhiGirder.m
.m
at-master/atmat/pubtools/LatticeTuningFunctions/errors/errorsmanipulation/ThetaPhiGirder.m
1,249
utf_8
bdf76010e76c46b04836bfbd30da6bfe
function rtp=ThetaPhiGirder(r,mag_gr) %rtp=ThetaPhiGirder(r,mag_gr) % % sets misalignment to model theta, phi errors for magnets on girder % % mag_gr is the output of getMagGroupsFromGirderIndex(ring) % %see also: GetExistingErrors setANYshift setTiltAbout seterrorrand % get girder centers gm=cellfun(@(mg)gmisal(r...
github
atcollab/at-master
EquivalentGradientsFromAlignments6D.m
.m
at-master/atmat/pubtools/LatticeTuningFunctions/correction/RDT/EquivalentGradientsFromAlignments6D.m
2,854
utf_8
71d7239491abcbbe844a8e780d5a1d84
function [kn,ks,ind]=EquivalentGradientsFromAlignments6D(r,inCOD) %EQUIVALENTGRADIENTSFROMALIGNMENTS6D Estimated normal quad gradients from sext offsets %[kn, 1) estimated normal quad gradients from sext offsets, quad % errors in quadrupoles and sextupoles. % ks, 2) estimated skew quad gradients from se...
github
atcollab/at-master
semrdtresp_mod.m
.m
at-master/atmat/pubtools/LatticeTuningFunctions/correction/RDT/semrdtresp_mod.m
1,993
utf_8
ee46c3c10b71f273b696acabb09f2800
function [f1,f2,skew]=semrdtresp_mod(mach,bpmidx,skewidx) %SEMRDT compute resonance driving terms at BPM locations % %[f1,f2,skew]=semrdtresp_mod(mach,bpmidx,skewidx) % % mach : AT lattice % bpmindx : BPM indexes % skewidx : skew quadrupole indexes % % f1 : f1001 RDT % f2 : f1010 RDT % skew : skew.beta skew...
github
atcollab/at-master
DisplayCorrectionEffect.m
.m
at-master/atmat/pubtools/LatticeTuningFunctions/correction/correction_chain/DisplayCorrectionEffect.m
7,457
utf_8
a232fd9497506ab41bf0b0245ff89459
function [d0,de,dc]=DisplayCorrectionEffect(... r0,... rerr,... rcor,... inCODe,... inCODc,... refpts,... indHCor,... indVCor,... indQCor,... indSCor) % [d0,de,dc]=DisplayCorrectionEffect(... % r0,... 1) reference lattice % rerr,... 2) lattice with errors % ...
github
atcollab/at-master
atmatchtunedelta.m
.m
at-master/atmat/pubtools/LatticeTuningFunctions/correction/tune/atmatchtunedelta.m
1,408
utf_8
594b0a1ba71cd2b3b662ce2905629a04
function arctune0=atmatchtunedelta(arc,tune,quadfams) % function arcchrom0=atmatchtunedelta(arc,c,quadfams) % % arc : at lattice % tune : tune to get (with integer part) size(tune)=[2,1] % quadfams: {[findcells(arc,'FamName','QF1','QF2')],... % [findcells(arc,'FamName','QD1','QD2')] } % % delta on q...
github
atcollab/at-master
BumpAtBPM.m
.m
at-master/atmat/pubtools/LatticeTuningFunctions/correction/orbitbumps/matching/BumpAtBPM.m
2,920
utf_8
115949ead276c24cea46066103bd887f
function [rbump,hs,vs]=BumpAtBPM(ring0,inCOD,bumph,bumpv,indBPMbump,indHCor,indVCor) % function roff=BumpAtBPM(... % ring0,... AT lattice structure % inCOD,... initial 6x1 coordinate guess % bumph,... hor. bump value at indBPMbump % bumpv,... ver. bump value at indBPMbump % indBPMbump, bump positio...
github
atcollab/at-master
distance2curve.m
.m
at-master/atmat/pubtools/distance2curve/distance2curve.m
55,867
utf_8
ad166e4d19008dd21756da4a9d60319e
function [xy,distance,t_a] = distance2curve(curvexy,mapxy,interpmethod) %DISTANCE2CURVE Gets the minimum distance from a point to a general curvilinear n-dimensional arc % usage: [xy,distance,t] = distance2curve(curvexy,mapxy) % uses linear curve segments % usage: [xy,distance,t] = distance2curve(curvexy,mapxy,interpme...
github
atcollab/at-master
atreadbeta.m
.m
at-master/atmat/pubtools/lattice_tools/atreadbeta.m
7,602
utf_8
b82299ba84340d21116de4990fde8cef
function [superp,periods]=atreadbeta(filename,cavipass,bendpass,quadpass) %ATREADBETA reads a BETA file % %ring=ATREADBETA(fname,cavipass,bendpass,quadpass,multipass) % %FILENAME: BETA file %CAVIPASS: pass method for cavities (default IdentityPass) %BENDPASS: pass method for dipoles (default BndMPoleSymplectic4Pass)...
github
atcollab/at-master
intlat.m
.m
at-master/atmat/atgui/intlat.m
12,947
utf_8
4ae7078bdd2fb416bd61740364f2fee9
function intlat(varargin) %INTLAT Interactive AT lattice editor % INTLAT(DIRECTION) % Direction is the initial angle[rad] of the orbit with respect % to the plot axis global THERING if nargin < 1 | isnumeric(varargin{1}) if nargin == 1 STARTANGLE = varargin{1}; else STARTANGLE = 0; end ...
github
atcollab/at-master
ataddmpoleerrors.m
.m
at-master/atmat/lattice/ataddmpoleerrors.m
2,135
utf_8
fa44b965ae74e661bb1a4b2edcfca94e
function newring = ataddmpoleerrors(ring,type,newindex,strength,radius,randflag) %ataddrandmpole adds a random multipole component to all elements of type %'type' where type can be 'dipole', 'quadrupole', or 'sextupole' % %[newring] = ATRANDMPOLE(ring,type,newindex,strength,radius) % %ring = input ring %type = 'dipole'...
github
atcollab/at-master
readmad.m
.m
at-master/atmat/lattice/Converters/readmad.m
7,722
utf_8
8357572071d29729e9cebd24c41b84da
function ATLATTICE = readmad(FILENAME) %READMAD reads the file output of MAD commands % TWISS, STRUCTURE, SURVEY. % % ATLATTICE = readmad(FILENAME) % % READMAD reads the MAD file header to determine the number of elements % in the lattice, symmetry flag, the number of supperperiods etc. % % Then it interprets...
github
atcollab/at-master
atfrommadx.m
.m
at-master/atmat/lattice/Converters/MADX2AT/atfrommadx.m
27,333
utf_8
0e8d4629973f9993e9113666184071bc
function atfrommadx(seqfilemadX,E0,outfilename) %function atfrommadx(seqfilemadX,E0,outfilename) % tansform madX sequence file (savesequence) file into AT lattice structure. % % This procedure reads a saved lattice (sequence in madx) in madX % and converts it to an AT lattice % % (madx comands to save the sequences : %...
github
atcollab/at-master
plotERAperture.m
.m
at-master/atmat/atplot/plotfunctions/plotERAperture.m
1,961
utf_8
4a9c3a29f1b184a849d8fbaea79cee22
function varargout=plotERAperture(varargin) %PLOTERAPERTURE Plot RApertures EApertures % %Helper function for atplot: % plot the Elliptic and Rectangular physical apertures % % USAGE: % >> atbaseplot(ring,@plotERAperture); % >> atplot(ring,@plotERAperture); (obsolete) % %See also atplot atbaseplot if nargout == ...
github
atcollab/at-master
BunchLength.m
.m
at-master/atmat/atphysics/LongitudinalDynamics/BunchLength.m
1,651
utf_8
b9ba831b0e8ab4233e84dbdc40897841
function BL = BunchLength (Ib,Zn,Vrf,U0,E0,h,alpha,sigdelta,circ) % bunch length due to the potential well effect % the output is the zerocurrent bunch length x bunch lengthening % % BL = BunchLength (Ib,Zn,Vrf,U0,E0,h,alpha,sigdelta,circ) % % Ib is the bunch current [A] (it may be a vector for multiple values) % Zn...
github
atcollab/at-master
findtune.m
.m
at-master/atmat/atphysics/TuneAndChromaticity/findtune.m
2,153
utf_8
430281c9b2bf8858079c67247c3f5100
function [tune,spectrum]=findtune(pos,method) %FINDTUNE get the tune value from turn by turn positions % %TUNE=FINDTUNE(POS,METHOD) % %POS: Tune-by-turn particle position %METHOD: Method for tune determination: % 1: Highest peak in fft % 2: Interpolation on fft results % ...
github
atcollab/at-master
thinmpoleraddiffm.m
.m
at-master/atmat/atphysics/Radiation/thinmpoleraddiffm.m
3,006
utf_8
9c934f83e1f4500d880e450a91af7eaf
function [B66, M, rout] = findthinmpoleraddiffm(rin, PolynomA, PolynomB, L, irho, E0, max_order) %FINDTHINMPOLERADDIFFM % Physical constants used in calculations persistent TWOPI CGAMMA M0C2 LAMBDABAR CER CU if isempty(TWOPI) %Initialize constansts on the first call TWOPI = 2*pi; CGAMMA = 8.8...
github
atcollab/at-master
findthinmpoleraddiffm.m
.m
at-master/atmat/atphysics/Radiation/findthinmpoleraddiffm.m
3,006
utf_8
9c934f83e1f4500d880e450a91af7eaf
function [B66, M, rout] = findthinmpoleraddiffm(rin, PolynomA, PolynomB, L, irho, E0, max_order) %FINDTHINMPOLERADDIFFM % Physical constants used in calculations persistent TWOPI CGAMMA M0C2 LAMBDABAR CER CU if isempty(TWOPI) %Initialize constansts on the first call TWOPI = 2*pi; CGAMMA = 8.8...
github
atcollab/at-master
thickmpoleraddiffm.m
.m
at-master/atmat/atphysics/Radiation/thickmpoleraddiffm.m
1,708
utf_8
cc43d4f668b8b722cf435a9b6b4b175c
function [Bcum, Mcum, r] = findthickmpoleraddifm(rin, PolynomA, PolynomB,L, irho, E0, max_order,num_steps) %FINDTHICKMPOLERADDIFFM % Fourth order-symplectic integrator constants persistent DRIFT1 DRIFT2 KICK1 KICK2 if isempty(DRIFT1) DRIFT1 = 0.6756035959798286638; DRIFT2 = -0.1756035959798286639; ...
github
atcollab/at-master
findthickmpoleraddiffm.m
.m
at-master/atmat/atphysics/Radiation/findthickmpoleraddiffm.m
1,709
utf_8
ebc35623ce562ec6ce4133a19cb63d42
function [Bcum, Mcum, r] = findthickmpoleraddifm(rin, PolynomA, PolynomB,L, irho, E0, max_order,num_steps) %FINDTHICKMPOLERADDIFFM % Fourth order-symplectic integrator constants persistent DRIFT1 DRIFT2 KICK1 KICK2 if isempty(DRIFT1) DRIFT1 = 0.6756035959798286638; DRIFT2 = -0.1756035959798286639; ...
github
atcollab/at-master
naff_cc.m
.m
at-master/atmat/atphysics/nafflib/naff_cc.m
2,023
utf_8
f4beeffc5c9f251ee33da68512ec0199
function naff_cc %NAFF_CC Compile nafflibrary for Matlab % % Modified by Laurent S. Nadolski % April 6th, 2007 cd_old = pwd; cd(fileparts(which('naff_cc'))) disp(['Compiling NAFF routines on ', computer,'.']) switch computer case 'SOL2' PLATFORMOPTION = ['-D',computer,' ']; case 'GLNXA64' PL...
github
atcollab/at-master
twissring.m
.m
at-master/atmat/atphysics/ParameterSummaryFunctions/twissring.m
4,892
utf_8
7e51fadcac888999286ae29c5d767c9c
function [TD, varargout] = twissring(RING,DP,varargin) %TWISSRING calculates linear optics functions for an UNCOUPLED ring % % [TwissData, tune] = TWISSRING(LATTICE,DP) calculates twiss parameters % and closed orbit coordinates at the RING entrance assuming % constant energy deviation DP. % % [TwissData,...
github
atcollab/at-master
twissline.m
.m
at-master/atmat/atphysics/ParameterSummaryFunctions/twissline.m
6,230
utf_8
83e74ff872e535dae8dba2a0ae9e1efc
function [TD, varargout] = twissline(LINE,DP,TWISSDATAIN,varargin) %TWISSLINE calculates linear optics functions for an UNCOUPLED transport line % % TwissData = TWISSLINE(LATTICE,DP,TWISSDATAIN) propagates twiss % parameters and closed orbit coordinates from the LINE entrance % given by TWISSDATAIN assumin...
github
smallcorgi/3D-Deepbox-master
writeLabels.m
.m
3D-Deepbox-master/visualization/writeLabels.m
2,759
utf_8
9f25c784ee622dc760d160581deac377
function writeLabels(objects,label_dir,img_idx) % parse input file fid = fopen(sprintf('%s/%06d.txt',label_dir,img_idx),'w'); % for all objects do for o = 1:numel(objects) % set label, truncation, occlusion if isfield(objects(o),'type'), fprintf(fid,'%s ',objects(o).type); else ...
github
mmclkv/caffe-mask-rcnn-master
classification_demo.m
.m
caffe-mask-rcnn-master/matlab/demo/classification_demo.m
5,466
utf_8
45745fb7cfe37ef723c307dfa06f1b97
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
rpng/clatt-master
isspd.m
.m
clatt-master/isspd.m
717
utf_8
264b483d9cf3dbe9867b79e3e554a1c4
function [t,R] = isspd(Sigma) %ISPDS Test if a matrix is positive definite symmetric % T = ISPDS(SIGMA) returns a logical indicating whether the matrix SIGMA is % square, symmetric, and positive definite, i.e., it is a valid full rank % covariance matrix. % % [T,R] = ISPDS(SIGMA) returns the cholesky factor of ...
github
rpng/clatt-master
rws.m
.m
clatt-master/rws.m
10,484
utf_8
0102e197e65e4fb724d6fb3ec9d3ea8b
%% Real-world simulation function [v_m,omega_m,v,omega,xR_true,zr,Rr, zl,Rl, xT_true,PHI,Qd,zt,Rt ] = rws(nR,nSteps, nL,xL_true, dt, ... v_true,omega_true,sigma_v,sigma_w, sigma_r,sigma_th,sigma_p, ... nT, vt, sigma_a, at, sigma_j,dim_target, ... max_range,min_range, r_max,omega_max,DORANDOM,SIGPERCEN...
github
rezazad68/Dynamic-3D-Action-Recognition-on-RGB-D-Videos-master
elm_kernel.m
.m
Dynamic-3D-Action-Recognition-on-RGB-D-Videos-master/elm_kernel.m
8,062
utf_8
5f5cf9aaa5bfe2cd1d8e863c871cbbf9
function [TrainingTime, TestingTime, TrainingAccuracy, TestingAccuracy, TY, ConfusMatrix] = elm_kernel(train_data, test_data, Elm_Type, Regularization_coefficient, Kernel_type, Kernel_para) % Usage: elm(TrainingData_File, TestingData_File, Elm_Type, NumberofHiddenNeurons, ActivationFunction) % OR: [TrainingTime,...
github
luciana-marques/orps-master
DataGeneration.m
.m
orps-master/DataGeneration.m
22,194
utf_8
f81037670752ee4a6c4925a030e28ca6
%========================================================================= % Load Scheduling Problem - Data Generation % Based on: Vasirani and Ossowski (2012) and Mohsenian-Rad et al. (2010) % Institution: Federal University of Minas Gerais (UFMG) % Department: Graduate Program in Electrical Engineering % Author:...
github
luciana-marques/orps-master
LocalSearch.m
.m
orps-master/LocalSearch.m
3,859
utf_8
a4994e40245585afd181436240ec5a32
%=============================================================== % Load Scheduling Problem - Local Search % Institution: Federal University of Minas Gerais (UFMG) % Department: Graduate Program in Electrical Engineering % Course: Network Optimization % Author: Luciana Sant'Ana Marques % Date: Feb 23th, 2018 at 16...
github
luciana-marques/orps-master
SimulatedAnnealing.m
.m
orps-master/SimulatedAnnealing.m
5,346
utf_8
144c6ee658cf75cc304607c331e11b8e
%=============================================================== % Simulated Annealing for Scheduling Problem % Institution: Federal University of Minas Gerais (UFMG) % Department: Graduate Program in Electrical Engineering % Author: Luciana Sant'Ana Marques % Date: Feb 23th, 2018 at 16:28 %============================...
github
luciana-marques/orps-master
InstanceGeneration.m
.m
orps-master/InstanceGeneration.m
1,439
utf_8
0d71f8b8798c208034da7601cb1bb7b7
%=============================================================== % Load Scheduling Problem - Instance Generation % Institution: Federal University of Minas Gerais (UFMG) % Department: Graduate Program in Electrical Engineering % Author: Luciana Sant'Ana Marques % Date: Feb 20th, 2018 at 16:33 %===================...
github
luciana-marques/orps-master
UpdateCost.m
.m
orps-master/UpdateCost.m
2,422
utf_8
fbea553a182a9a10e872c40f7a1b2aec
%=============================================================== % Calculate Total Cost of a Solution Considering only the % Modified load % Institution: Federal University of Minas Gerais (UFMG) % Department: Graduate Program in Electrical Engineering % Author: Luciana Sant'Ana Marques % Date: Feb 23th, 2018 at ...
github
luciana-marques/orps-master
TotalCostF.m
.m
orps-master/TotalCostF.m
2,162
utf_8
e552444b4471acef52f53422169cc3eb
%=============================================================== % Calculate Total Cost of a Solution % Institution: Federal University of Minas Gerais (UFMG) % Department: Graduate Program in Electrical Engineering % Author: Luciana Sant'Ana Marques % Date: Feb 1923th, 2018 at 16:29 %============================...
github
luciana-marques/orps-master
Neighborhood.m
.m
orps-master/Neighborhood.m
3,657
utf_8
9f1cb2f303c98193530522ba645ddfdc
%=============================================================== % Demand Response Problem % Title: Neighborhood Strucutre Generation % Institution: Federal University of Minas Gerais (UFMG) % Department: Graduate Program in Electrical Engineering % Author: Luciana Sant'Ana Marques Arnoux and Isabella % Date: Jun...
github
luciana-marques/orps-master
RankingHeuristic.m
.m
orps-master/RankingHeuristic.m
3,836
utf_8
a4a0503f13019128111b426b16b2801b
%=============================================================== % Ranking Heuristic to Load Scheduling Problem % Construction of an initial solution % Based on: Wu et al. (2012) - with many modifications % Institution: Federal University of Minas Gerais (UFMG) % Department: Graduate Program in Electrical Engineer...
github
remega/LEDOV-eye-tracking-database-master
pm_norm.m
.m
LEDOV-eye-tracking-database-master/metrics/pm_norm.m
114
utf_8
c065a431c1f58d5599e0824c785841dd
function map_new=pm_norm(map) tempmin=min(map(:)); temp2=map-tempmin; map_new=temp2./max(temp2(:)); end
github
remega/LEDOV-eye-tracking-database-master
NSS.m
.m
LEDOV-eye-tracking-database-master/metrics/NSS.m
530
utf_8
76acfa14c05ad2755d4c797e413301d9
% created: Zoya Bylinskii, Aug 2014 % This finds the normalized scanpath saliency between two different % saliency maps as the mean value of the normalized saliency map at % fixation locations. function score = NSS(saliencyMap, fixationMap) % saliencyMap is the saliency map % fixationMap is the human fixation map...
github
remega/LEDOV-eye-tracking-database-master
TestLEDOV.m
.m
LEDOV-eye-tracking-database-master/metrics/TestLEDOV.m
3,232
utf_8
670739a69a2d2a617081f2f199427c46
function res = TestLEDOV(saldir) load('./LEDOV/VideoNameList.mat','VideoNameList') load('./LEDOV/namelist.mat','testlist','trainlist','vaildlist') videoDir='./LEDOV'; countvid=0; for m=testlist' tic InputVideoName_short=VideoNameList{m}; InputVideoName=[InputVideoName_short '.mp4']; load([videoDir '...
github
jun-zhang/WebRTC-VideoEngine-Demo-master
apmtest.m
.m
WebRTC-VideoEngine-Demo-master/webrtc_videoengine_demo/webrtc/modules/audio_processing/test/apmtest.m
9,470
utf_8
ad72111888b4bb4b7c4605d0bf79d572
function apmtest(task, testname, filepath, casenumber, legacy) %APMTEST is a tool to process APM file sets and easily display the output. % APMTEST(TASK, TESTNAME, CASENUMBER) performs one of several TASKs: % 'test' Processes the files to produce test output. % 'list' Prints a list of cases in the test set,...
github
jun-zhang/WebRTC-VideoEngine-Demo-master
exportfig.m
.m
WebRTC-VideoEngine-Demo-master/webrtc_videoengine_demo/webrtc/modules/video_coding/codecs/test_framework/exportfig.m
14,995
utf_8
d7427be6e56c37d4aec2f2c91c9a6341
function exportfig(varargin) %EXPORTFIG Export a figure to Encapsulated Postscript. % EXPORTFIG(H, FILENAME) writes the figure H to FILENAME. H is % a figure handle and FILENAME is a string that specifies the % name of the output file. % % EXPORTFIG(...,PARAM1,VAL1,PARAM2,VAL2,...) specifies % parameters th...
github
jun-zhang/WebRTC-VideoEngine-Demo-master
plotBenchmark.m
.m
WebRTC-VideoEngine-Demo-master/webrtc_videoengine_demo/webrtc/modules/video_coding/codecs/test_framework/plotBenchmark.m
11,672
utf_8
a80ed712ca3895c1e7b6383d4cc07d38
function plotBenchmark(fileNames, export) %PLOTBENCHMARK Plots and exports video codec benchmarking results. % PLOTBENCHMARK(FILENAMES, EXPORT) parses the video codec benchmarking result % files given by the cell array of strings FILENAME. It plots the results and % optionally exports each plot to an appropriatel...
github
sudrag/Perception-and-Computer-Vision-in-MATLAB-master
dpsimplify.m
.m
Perception-and-Computer-Vision-in-MATLAB-master/AR Tag Detection/Scripts/dpsimplify.m
6,599
utf_8
ec1b680dd31937dca16da7df9996aeba
function [ps,ix] = dpsimplify(p,tol) % Recursive Douglas-Peucker Polyline Simplification, Simplify % % [ps,ix] = dpsimplify(p,tol) % % dpsimplify uses the recursive Douglas-Peucker line simplification % algorithm to reduce the number of vertices in a piecewise linear curve % according to a specified toleranc...
github
sudrag/Perception-and-Computer-Vision-in-MATLAB-master
homography2d.m
.m
Perception-and-Computer-Vision-in-MATLAB-master/AR Tag Detection/Scripts/homography2d.m
2,957
utf_8
5d39781c0ed194cfeea3f44954b4ea80
% HOMOGRAPHY2D - computes 2D homography % % Usage: H = homography2d(x1, x2) % H = homography2d(x) % % Arguments: % x1 - 3xN set of homogeneous points % x2 - 3xN set of homogeneous points such that x1<->x2 % % x - If a single argument is supplied it is assumed ...
github
sudrag/Perception-and-Computer-Vision-in-MATLAB-master
normalise2dpts.m
.m
Perception-and-Computer-Vision-in-MATLAB-master/AR Tag Detection/Scripts/normalise2dpts.m
2,430
utf_8
f0428a0b70a640f4503e444e7e286535
% NORMALISE2DPTS - normalises 2D homogeneous points % % Function translates and normalises a set of 2D homogeneous points % so that their centroid is at the origin and their mean distance from % the origin is sqrt(2). This process typically improves the % conditioning of any equations used to solve homographies...
github
sudrag/Perception-and-Computer-Vision-in-MATLAB-master
ransacfitfundmatrix.m
.m
Perception-and-Computer-Vision-in-MATLAB-master/Visual Odometry/code/ransacfitfundmatrix.m
5,973
utf_8
ade5620bd3b104b73b18d18a647de42c
% RANSACFITFUNDMATRIX - fits fundamental matrix using RANSAC % % Usage: [F, inliers] = ransacfitfundmatrix(x1, x2, t) % % Arguments: % x1 - 2xN or 3xN set of homogeneous points. If the data is % 2xN it is assumed the homogeneous scale factor is 1. % x2 - 2xN or 3xN set of ho...
github
sudrag/Perception-and-Computer-Vision-in-MATLAB-master
ransac.m
.m
Perception-and-Computer-Vision-in-MATLAB-master/Visual Odometry/code/ransac.m
10,480
utf_8
c5e0917ad9d7194d2ab04f6741400fac
% RANSAC - Robustly fits a model to data with the RANSAC algorithm % % Usage: % % [M, inliers] = ransac(x, fittingfn, distfn, degenfn s, t, feedback, ... % maxDataTrials, maxTrials) % % Arguments: % x - Data sets to which we are seeking to fit a model M % It is...
github
sudrag/Perception-and-Computer-Vision-in-MATLAB-master
normalise2dpts.m
.m
Perception-and-Computer-Vision-in-MATLAB-master/Visual Odometry/code/normalise2dpts.m
2,501
utf_8
00a5d4cb7272f147a49e349c2772fe72
% NORMALISE2DPTS - normalises 2D homogeneous points % % Function translates and normalises a set of 2D homogeneous points % so that their centroid is at the origin and their mean distance from % the origin is sqrt(2). This process typically improves the % conditioning of any equations used to solve homographies...
github
johnfgibson/whyjulia-master
ksbenchmark.m
.m
whyjulia-master/codes/ksbenchmark.m
2,820
utf_8
823086545f955482f5a264767f751251
function ksbenchmark(Nx, printnorms) % ksbenchmark: run a Kuramoto-Sivashinky simulation, benchmark, and plot % Nx = number of gridpoints % printnorms = 1 => print norm(u0) and norm(uT), 0 => don't Lx = Nx/16*pi; % spatial domain [0, L] periodic dt = 1/16; % discrete time step T = 200; ...
github
sajeed786/Earthquake-Prediction-master
MFO.m
.m
Earthquake-Prediction-master/MFO.m
5,867
utf_8
ded7613a78e724ccac5ece6882985164
%______________________________________________________________________________________________ % Moth-Flame Optimization Algorithm (MFO) % Source codes demo version 1.0 % ...
github
sajeed786/Earthquake-Prediction-master
obj.m
.m
Earthquake-Prediction-master/obj.m
406
utf_8
81454c92b7086ffa726f5fd97b409dca
function [lb,ub,dim,fobj] = obj() lb=-1; ub=1; dim=40; fobj = @get_cost_mse; end function mse = get_cost_mse(y,x,w) %fprintf('inside cost_mse function '); pred_random = x * w'; O = ones(437,1); act_op = O ./ (O + exp(-pred_random)); maxm = max(y); minm = min(y); denorm_op = ((act_op - 0.1) / 0.8) * (maxm...
github
sajeed786/Earthquake-Prediction-master
initialization.m
.m
Earthquake-Prediction-master/initialization.m
2,272
utf_8
092dd93bd670c6c2b240828b47f0ef0a
%______________________________________________________________________________________________ % Moth-Flame Optimization Algorithm (MFO) % Source codes demo version 1.0 % ...
github
uncledickHe/basic_beamforming-master
espritBeamforming.m
.m
basic_beamforming-master/esprit/espritBeamforming.m
25,178
utf_8
f069d37c8ba26ff11e24f8ce3fc1cb1f
function espritBeamforming() % ------------------------------------------------ % ESPRIT BEAMFORMING DEMO % Simulation of several sources around the array % % Jose Ignacio Dominguez Simon % % Array Signal Processing % Aalborg University - 2015 ...
github
yluthu/fpga-nn-experiment-master
hexdump.m
.m
fpga-nn-experiment-master/matlab/hexdump.m
1,013
utf_8
0a4bda98e31a5a278a5b4b452bc39400
% dump data as single precision numbers into Intel HEX format function [] = hexdump(data, filename) data = single(data); line = []; twos = []; result = []; for i = 1:length(data) % size address type data line = [':04', dec2hex(i - 1, 4), '00', ...
github
eslamtharwat/2-IRIS-Detection-and-Recognition-master
face.m
.m
2-IRIS-Detection-and-Recognition-master/face.m
955
utf_8
95628a1095dc996f9ace708adc32baff
% function [face,skin_region]=face(I); % % skin_region=skin(I); % % se = strel('disk',3); % dil = imdilate(skin_region,se); % morphologic dilation % d2 = imfill(dil, 'holes'); % morphologic fill % face = bwdist(~d2); % computing minimal euclidean distance to non-white pixel % figure;imsho...
github
danielemarinazzo/multiscaleGrangerCausality-master
egc_SetLag.m
.m
multiscaleGrangerCausality-master/egc_SetLag.m
795
utf_8
05c6dc2b94538906b60bf5c932dddab6
%% Sets the vector of indexes for series and lags to be used in Conditional Entropy estimation % inputs: % p: vector of embedding dimensions (one for each series; if 0, the series is excluded) % tau: vector of embedding delays (one for each series) % u: vector of propagation times (one for each series) % zerolag: ...
github
danielemarinazzo/multiscaleGrangerCausality-master
iss_varma2iss.m
.m
multiscaleGrangerCausality-master/iss_varma2iss.m
1,210
utf_8
a0ce27bd483b148861a8982d8af50c31
%% VARMA with B0 term to (Innovations form) State Space parameters % computes innovations form parameters for a state space model from VARMA % parameters using Aoki's method - this version allows for zero-lag MA coefficients function [A,C,K,R,lambda0] = iss_varma2iss(Am,Bm,V,B0) % INPUT: VARMA parameters Am, ...
github
danielemarinazzo/multiscaleGrangerCausality-master
egc_LinReg_Ftest.m
.m
multiscaleGrangerCausality-master/egc_LinReg_Ftest.m
1,710
utf_8
c67017c67f4810a95b07f8d1dc4c6bbf
%% Statistics of difference in conditional entropies estimated through linear regression % Upu: reiduals of unrestricted regression % Upr: reiduals of restricted regression % Nu: number of coefficients for unrestricted regression % Nr: number of coefficients for restricted regression function [p_value] = egc_L...
github
danielemarinazzo/multiscaleGrangerCausality-master
eMVAR_MVARfilter.m
.m
multiscaleGrangerCausality-master/eMVAR_MVARfilter.m
620
utf_8
83b62a141b725ae83f035fc783ccfd21
%% FILTER A VECTOR NOISE WITH A SPECIFIED STRICTLY CAUSAL MVAR MODEL: Y(n)=A(1)Y(n-1)+...+A(p)Y(n-p)+U(n) %%% INPUT % A=[A(1)...A(p)]: M*pM matrix of the MVAR model coefficients (strictly causal model) % U: M*N matrix of innovations %%% OUTPUT % Y: M*N matrix of simulated time series function [Y]=eMVAR_MVAR...
github
danielemarinazzo/multiscaleGrangerCausality-master
surrshuf.m
.m
multiscaleGrangerCausality-master/surrshuf.m
194
utf_8
3f27b575a884ee11981562fdb7eb740d
%genera x surrogato con sample shuffling - distruggeanche gli autospettri function xs=surrshuf(x) sx=size(x); p=randperm(sx(1)); xs=zeros(sx(1),1); for k = 1:sx(1) xs(k)=x(p(k)); end
github
danielemarinazzo/multiscaleGrangerCausality-master
egc_buildvectors.m
.m
multiscaleGrangerCausality-master/egc_buildvectors.m
1,046
utf_8
c0fabb97db424e857b26211aa6ff0c39
%% form embedding matrix (for entropy computation) % Y: (quantized) input multiple time series, dimension M*N % V: list of candidates, dimension Nc*2, Nc is number of candidates; 1st column: index of the signal; 2nd column: index of the lag % A: output matrix of the vectors specified from the signals Y according to ...
github
danielemarinazzo/multiscaleGrangerCausality-master
eMVAR_idMVAR.m
.m
multiscaleGrangerCausality-master/eMVAR_idMVAR.m
1,452
utf_8
d1cedfd57662c15c9969b53a64ab836b
%% IDENTIFICATION OF STRICTLY CAUSAL MVAR MODEL: Y(n)=A(1)Y(n-1)+...+A(p)Y(n-p)+U(n) % makes use of autocovariance method (vector least squares) %%% input: % Y, M*N matrix of time series (each time series is in a row) % p, model order % Mode, determines estimation algorithm (0:builtin least squares, else other m...
github
danielemarinazzo/multiscaleGrangerCausality-master
eMVAR_InstModelfilter.m
.m
multiscaleGrangerCausality-master/eMVAR_InstModelfilter.m
2,355
utf_8
a77cbc2e982dff26e398b5f61504ed3e
%% realization of the instantaneous model : U = L*W %%% OUTPUT % U: N*M matrix of filtered noises % INPUT % N data length % C: input covariance matrix (may be interpreted as Su or Sw, see above) % B0: M*M matrix of instantaneous effects (when relevant) % when flag='StrictlyCausal': % given Su, applies Chole...
github
danielemarinazzo/multiscaleGrangerCausality-master
egc_LinReg.m
.m
multiscaleGrangerCausality-master/egc_LinReg.m
738
utf_8
4044f07d3346650cddc464cec66273c7
%% LINEAR REGRESSION %%% INPUTS: % data: N*M matrix of the M signals each having length N % j: index (column) of the series considered as output, the one we want to describe % V: two column vector of series (col 1) and lag (col 2) indexes function [S,Up,Am]=egc_LinReg(data,j,V) if isempty(V) %if no conditio...
github
danielemarinazzo/multiscaleGrangerCausality-master
msgc.m
.m
multiscaleGrangerCausality-master/msgc.m
2,184
utf_8
08c1d9bb93a08811c532e7ee5ba4e736
%% MULTISCALE GC computation %%% inputs % Am, Su: VAR parameters (Am: M x pM coeff matrix; Su: M x M innovation covariance matrix) % tau: scale factor % ncoeff: number of coefficients of FIR filter (if no averaging) % whichfilter: 'F' for FIR (default), 'A' for averaging %%% outputs % GCdws: GC at scale tau ...
github
danielemarinazzo/multiscaleGrangerCausality-master
egc_gcMVAR.m
.m
multiscaleGrangerCausality-master/egc_gcMVAR.m
1,845
utf_8
cbbb1c17fc5a26db10138e66abb9af3f
%% GRANGER CAUSALITY FROM STRICTLY CAUSAL MVAR MODEL: Y(n)=A(1)Y(n-1)+...+A(p)Y(n-p)+U(n) % estimates Granger Causality in multiple time series from MVAR model fitted on data % performs also row-by-row MVAR identification, equivalent to idMVAR (with vector least squares) %%% input: % Y, M*N matrix of time series ...
github
danielemarinazzo/multiscaleGrangerCausality-master
surriaafft.m
.m
multiscaleGrangerCausality-master/surriaafft.m
1,502
utf_8
f60f7c2acff33418e0cc6efa5895b5ab
% genera iterative amplitude adjusted fourier tranform surrogates % algoritmo di Schreiber e Schmitz - Physical Review Letters 1996 % y: serie da surrogare % nit: numero di iterazioni volute (default 7) % stop: se metto 'spe' esce con lo spettro conservato, se metto 'dis' esce con la distribuzione conservata ...
github
avinashk94/CVIP-master
harris.m
.m
CVIP-master/Assignment/hw2/50248877_hw2/code/harris.m
3,097
utf_8
c3a11b6fc77fa908635b8f9b14ad52a2
% HARRIS - Harris corner detector % % Usage: [cim, r, c] = harris(im, sigma, thresh, radius, disp) % % Arguments: % im - image to be processed. % sigma - standard deviation of smoothing Gaussian. Typical % values to use might be 1-3. % thresh - thres...
github
avinashk94/CVIP-master
harris.m
.m
CVIP-master/Assignment/hw2/hw2/code/harris.m
3,097
utf_8
c3a11b6fc77fa908635b8f9b14ad52a2
% HARRIS - Harris corner detector % % Usage: [cim, r, c] = harris(im, sigma, thresh, radius, disp) % % Arguments: % im - image to be processed. % sigma - standard deviation of smoothing Gaussian. Typical % values to use might be 1-3. % thresh - thres...
github
avinashk94/CVIP-master
find_sift.m
.m
CVIP-master/Assignment/hw3/hw3/code/find_sift.m
5,054
utf_8
bd661341ed3535975182b3f451a3c152
function sift_arr = find_sift(I, circles, enlarge_factor) %% %% Compute non-rotation-invariant SIFT descriptors of a set of circles %% I is the image %% circles is an Nx3 array where N is the number of circles, where the %% first column is the x-coordinate, the second column is the y-coordinate, %% and the...
github
avinashk94/CVIP-master
harris.m
.m
CVIP-master/Assignment/hw3/hw3/code/harris.m
3,097
utf_8
c3a11b6fc77fa908635b8f9b14ad52a2
% HARRIS - Harris corner detector % % Usage: [cim, r, c] = harris(im, sigma, thresh, radius, disp) % % Arguments: % im - image to be processed. % sigma - standard deviation of smoothing Gaussian. Typical % values to use might be 1-3. % thresh - thres...
github
avinashk94/CVIP-master
distanceToSet.m
.m
CVIP-master/Assignment/hw1/release/custom/distanceToSet.m
1,570
utf_8
e468b68972d12528f3824237c308520c
function histInter = distanceToSet(wordHist, histograms) % Sum of minimums (Baseline implementation) %intersections = bsxfun(@min, histograms, repmat(wordHist, 1, size(histograms, 2))); %histInter = sum(intersections); % Bhattacharyya coefficient %intersections = bsxfun(@times, sqrt(histograms), repmat(sqrt(wordHist)...
github
avinashk94/CVIP-master
computeDictionary.m
.m
CVIP-master/Assignment/hw1/release/matlab/computeDictionary.m
356
utf_8
7baa8b2034d3469217474b5c13857ac2
% Computes filter bank and dictionary, and saves it in dictionary.mat function computeDictionary() load('../data/traintest.mat'); interval= 1; train_imagenames = train_imagenames(1:interval:end); [filterBank,dictionary] = getFilterBankAndDictionary(strcat(['../data/'],train_imagenames)); save('dictionary.mat...
github
numpde/as-master
sample_network3.m
.m
as-master/p/network/20171002-RatPathways-EPFL/B-subgraphs/sample_network3.m
4,012
utf_8
e569b5292d7cf526f9ed50bf6bd28064
% Subsampling from a large network. % Pick a seed according to the degree distribution. % Carry out random walks in the network. % Stop when the number of subsampled nodes reaches the pre-specified number. % Difference from sample_network2: attempt to control both node and edge sizes. % Select the seed according to the...
github
numpde/as-master
construct_clique_complex.m
.m
as-master/p/network/20171002-RatPathways-EPFL/B-subgraphs/construct_clique_complex.m
2,403
utf_8
fd8bd622b6598d8ae7862faa4dd7c5f5
% Construct the clique complex from an undirected graph. % Apply only to small graphs. function [nsimplices, simplices] = construct_clique_complex(G) nnodes = length(G(1, :)); % Exhaust all cliques. nsimplices = 0; simplices = {}; % Nodes. for n = 1:nnodes simplices{n} = [n]; end ...
github
numpde/as-master
atof2.m
.m
as-master/p/network/20171002-RatPathways-EPFL/B-subgraphs/atof2.m
911
utf_8
a0aa9721ee4c6eda6667d14146264604
% Convert a string into a real number. % Also works for exponential representation. function val = atof2(s) % If s=NA then return NaN. if (strcmp(s,'NA')==1) val=NaN; else val=0; sgn=1; cnt=1; afterpoint=0; afterexp=0; expval=0; expsign=1; power=1.0; while (cnt<=length(s)) ch=s(cnt); if ((cnt==1)&(ch=='-')) sgn=...
github
numpde/as-master
find_conn_comps2.m
.m
as-master/p/network/20171002-RatPathways-EPFL/B-subgraphs/find_conn_comps2.m
1,813
utf_8
389f33c6086c7446c4d2627197f3666b
% Find all connected components of a graph. % Difference from find_conn_comps.m: do not incur recursive functions. function [nconncomps, conncomps] = find_conn_comps2(nnodes, G) % Label nodes in the graph until all nodes are labeled. labeled=zeros(1,nnodes); flag=1; % Label all the singletons. tmpG=G; tmpG=tmpG-diag...
github
numpde/as-master
getitemval4.m
.m
as-master/p/network/20171002-RatPathways-EPFL/B-subgraphs/getitemval4.m
703
utf_8
f54f8a064512756737e0a6eda7b4ae6d
% Get the selected item in a string. % Difference from getitemval3: fix the bug that the last entry contains \n. function item = getitemval4(s, ind, sepch) tabcnt=0; curind=1; while ((tabcnt<ind)&(curind<=length(s))) ch=s(curind); if (ch==sepch) tabcnt=tabcnt+1; elseif ((ch=='\n')&(tabcnt<ind)) tabcnt=ind+1; end curi...
github
numpde/as-master
evaluate_complex_homology.m
.m
as-master/p/network/20171002-RatPathways-EPFL/B-subgraphs/evaluate_complex_homology.m
1,821
utf_8
a603270bb0a52f38cb60830f5c7e75af
% Evaluate the Betti numbers of a simplicial complex. function bs = evaluate_complex_homology(nsimplices, simplices) nnodes=0; for n=1:nsimplices nnodes=max(nnodes,max(simplices{n})); end % Construct the boundary maps. % rho_{k}. maxdim=length(simplices{nsimplices})-1; clear bds rs; % Debug %for k=1:min(3,maxdim) ...
github
numpde/as-master
sample_discrete_rv.m
.m
as-master/p/network/20171002-RatPathways-EPFL/B-subgraphs/sample_discrete_rv.m
764
utf_8
a589464d25a383adb18d965b86a7c5b4
% Sample a value from a discrete distribution. % RA: discretize(rand(1, n) * sum(p), [0; cumsum(p)]) % https://www.mathworks.com/matlabcentral/fileexchange/21912-sampling-from-a-discrete-distribution function randval = sample_discrete_rv(vals, ps) nstates=length(vals); [Y,I]=sort(ps,'descend'); bds=zeros(1,nstates);...
github
numpde/as-master
find_conn_comps.m
.m
as-master/p/network/20171002-RatPathways-EPFL/B-subgraphs/find_conn_comps.m
1,685
utf_8
22ce1726dfe96d45a20696926c0702fd
% Find all connected components of a graph. function [nconncomps, conncomps] = find_conn_comps(nnodes, G) % Recursively label nodes in the graph until all nodes are labeled. labeled=zeros(1,nnodes); flag=1; % Label all the singletons. %k=0; %for i=1:nnodes %tmp=find(G(i,:)>0); %if (length(tmp)==0) %k=k+1; labeled(i)...
github
numpde/as-master
betti.m
.m
as-master/p/network/20171002-RatPathways-EPFL/D-topology/correctness/betti.m
5,084
utf_8
29d444ea4384c7afc49469c62236f239
function b = betti(file) G = getfield(load(file), 'G'); [nsimplices, simplices] = construct_clique_complex(G); b = evaluate_complex_homology(nsimplices,simplices); save(file, 'G', 'b'); end %%% CODE BY C-H YEANG %%% % Construct the clique complex from an undirected graph. % Apply only to small graph...
github
Lancelot899/ICRA2018-master
rukfUpdate.m
.m
ICRA2018-master/filters/rukfUpdate.m
1,788
utf_8
24325b68cd25a2d02a2b35e7dd34f88d
function [chi,omega_b,a_b,S] = rukfUpdate(chi,omega_b,a_b,... S,y,param,R,ParamFilter) param.Pi = ParamFilter.Pi; param.chiC = ParamFilter.chiC; k = length(y); q = length(S); N_aug = q+k; Rc = chol(kron(eye(k/2),R)); S_aug = blkdiag(S,Rc); % scaled unsented transform W0 = 1-N_aug/3; Wj = (1-W0)/(2*N_aug); gamma =...
github
Lancelot899/ICRA2018-master
EsimatePosAmers.m
.m
ICRA2018-master/filters/EsimatePosAmers.m
2,093
utf_8
98a1882400a96d76ab9789928887664e
function [points3d, errors] = EsimatePosAmers(pointTracks, ... camPoses, cameraParams) numTracks = numel(pointTracks); points3d = zeros(numTracks, 3); numCameras = size(camPoses, 2); cameraMatrices = containers.Map('KeyType', 'uint32', 'ValueType', 'any'); for i = 1:numCameras id = camPoses(i).ViewId; R =...
github
Lancelot899/ICRA2018-master
manageAmers.m
.m
ICRA2018-master/filters/manageAmers.m
5,456
utf_8
bf85aa3a6e9c58d710fe3434db202d1f
function [S,PosAmers,ParamFilter,trackerBis,myTracks,PosAmersNew,... IdxAmersNew,trackCov,pointsMain,validityMain] = manageAmers(S,... PosAmers,ParamFilter,ParamGlobal,trackerBis,trajFilter,I,... pointsMain,validityMain,IdxImage,myTracks,pointsBis) PosAmersNew = []; IdxAmersNew = []; trackCov = []; MaxAmer...
github
Lancelot899/ICRA2018-master
ukfRefUpdate.m
.m
ICRA2018-master/filters/ukfRefUpdate.m
2,508
utf_8
0ffab5e57239a98e26302370a16c3f8c
function [chi,v,PosAmers,omega_b,a_b,S,xidot] = ukfRefUpdate(chi,v,omega_b,a_b,... S,y,param,R,ParamFilter,PosAmers,xidot) param.Pi = ParamFilter.Pi; param.chiC = ParamFilter.chiC; k = length(y); q = length(S); N_aug = q+k; Rc = chol(kron(eye(k/2),R)); S_aug = blkdiag(S,Rc); % scaled unsented transform W0 = 1-N_a...
github
Lancelot899/ICRA2018-master
ukfUpdate.m
.m
ICRA2018-master/filters/ukfUpdate.m
1,933
utf_8
0c034d87cb979ce37c640d5fdf9a74b4
function [Rot,v,x,PosAmers,omega_b,a_b,S] = ukfUpdate(Rot,v,x,omega_b,a_b,... S,y,param,R,ParamFilter,PosAmers) param.Pi = ParamFilter.Pi; param.chiC = ParamFilter.chiC; k = length(y); q = length(S); N_aug = q+k; Rc = chol(kron(eye(k/2),R)); S_aug = blkdiag(S,Rc); % scaled unsented transform W0 = 1-N_aug/3; Wj = ...
github
Lancelot899/ICRA2018-master
lukfUpdate.m
.m
ICRA2018-master/filters/lukfUpdate.m
1,788
utf_8
9b390dc82185a8f43fa24167dcce1816
function [chi,omega_b,a_b,S] = lukfUpdate(chi,omega_b,a_b,... S,y,param,R,ParamFilter) param.Pi = ParamFilter.Pi; param.chiC = ParamFilter.chiC; k = length(y); q = length(S); N_aug = q+k; Rc = chol(kron(eye(k/2),R)); S_aug = blkdiag(S,Rc); % scaled unsented transform W0 = 1-N_aug/3; Wj = (1-W0)/(2*N_aug); gamma =...