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 | BrainStormCenter/Psychometric-master | myregress.m | .m | Psychometric-master/myregress.m | 2,565 | utf_8 | 93be5fda7f4d4faaeca5c51dcfe72fdd | % myregress.m
%
% purpose: regression statistics
% usage: [d] = myregress(x, y, m1,dispfit)
% x = column vector of independent variable
% y = column vector of dependent variable
% m1 = slope to check difference of
% m = slope of regression line
% b = y-intercept
% ... |
github | BrainStormCenter/Psychometric-master | JC_FCcalc.m | .m | Psychometric-master/JC_FCcalc.m | 4,861 | utf_8 | 67c70b06521404774c4756de9cd5cbc1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CREATED BY: JOCHEN WEBER
%
% CREATED ON: 2016-11-25
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% JC_FCcalc computes one map for each VOI-by-VTC combination, such that
% for each VOI in the VOI files list, a map is written out.
function JC_FCcalc(fcfiles, roifiles)
% JC_FCCALC Calculate ... |
github | BrainStormCenter/Psychometric-master | s02_preprocessing.m | .m | Psychometric-master/automated_processing/s02_preprocessing.m | 13,367 | utf_8 | ce0ca9eeba4a71fbc1137f1f9e1daa26 | %
% CREATED BY: JOCHEN WEBER
% CREATED ON: 11/22/16
%
% MODIFIED BY: JASON CRAGGS
% MODIFIED ON: 2019-05-09
%
% MODIFIED BY: JACOB GOTBERG
% MODIFIED ON: 2019-03-02
%
% PURPOSE: PREPROCESS FMRI SCANS FOR ANALYSIS
%
% USAGE: matlab -r "prog 2_preprocessing.m dirname"
%
%'/... |
github | CU-CommunityApps/choco-packages-master | ncorr_class_roi.m | .m | choco-packages-master/packages/matlab-coecis/tools/ncorr/ncorr_class_roi.m | 66,847 | utf_8 | b4e72c2e366297dd03223cfb0a283d2d | classdef ncorr_class_roi < handle
% This is the class definition for the region of interest.
% Properties ---------------------------------------------------------%
properties(SetAccess = private)
type; % string
mask; % logical array
region; %... |
github | CU-CommunityApps/choco-packages-master | ncorr.m | .m | choco-packages-master/packages/matlab-coecis/tools/ncorr/ncorr.m | 215,473 | utf_8 | 0869c73f18c3ca178d6efe7202e0fe69 | classdef ncorr < handle
%-------------------------------------------------------------------------%
%-------------------------------------------------------------------------%
%
% Version: 1.2.2
% Date: 6/13/2017
% Programmed by: Justin Blaber
% Principle Investigator: Antonia Antoniou
%
%------------------------------... |
github | CU-CommunityApps/choco-packages-master | ncorr_alg_convertseeds.m | .m | choco-packages-master/packages/matlab-coecis/tools/ncorr/ncorr_alg_convertseeds.m | 27,822 | utf_8 | 126e3f6e6db2afe68f675dff24040d5b | function [convertseedinfo,outstate] = ncorr_alg_convertseeds(plot_u_old,plot_v_old,plot_u_interp_old,plot_v_interp_old,roi_old,roi_new,seedwindow,spacing,border_interp)
% This function obtains the "convert" seeds. It will try to seed as many
% "new" regions as possible (one seed per region). It is possible that no
% se... |
github | CU-CommunityApps/choco-packages-master | ncorr_gui_viewplots.m | .m | choco-packages-master/packages/matlab-coecis/tools/ncorr/ncorr_gui_viewplots.m | 127,861 | utf_8 | b5e3358c4dae7e33660ab822d294b67c | function handles_gui = ncorr_gui_viewplots(reference,current,data_dic,type_plot,pos_parent,params_init)
% This is a GUI for viewing the displacement/strain plots.
%
% Inputs -----------------------------------------------------------------%
% reference - ncorr_class_img; used for displaying the background image.
% ... |
github | CU-CommunityApps/choco-packages-master | ncorr_util_formregionconstraint.m | .m | choco-packages-master/packages/matlab-coecis/tools/ncorr/ncorr_util_formregionconstraint.m | 6,122 | utf_8 | 458de04923bdcb004e97d0415e37da7e | function handle_constraintfcn = ncorr_util_formregionconstraint(region)
% This function returns handle_constraintfcn which, given a point, will
% return the closest point inside the region. This is mainly used for the
% constrainfcn for impoints which are restricted to be inside a region.
%
% Inputs ------------------... |
github | CU-CommunityApps/choco-packages-master | ncorr_class_roi.m | .m | choco-packages-master/packages/matlab-ciser/tools/ncorr/ncorr_class_roi.m | 66,847 | utf_8 | b4e72c2e366297dd03223cfb0a283d2d | classdef ncorr_class_roi < handle
% This is the class definition for the region of interest.
% Properties ---------------------------------------------------------%
properties(SetAccess = private)
type; % string
mask; % logical array
region; %... |
github | CU-CommunityApps/choco-packages-master | ncorr.m | .m | choco-packages-master/packages/matlab-ciser/tools/ncorr/ncorr.m | 215,473 | utf_8 | 0869c73f18c3ca178d6efe7202e0fe69 | classdef ncorr < handle
%-------------------------------------------------------------------------%
%-------------------------------------------------------------------------%
%
% Version: 1.2.2
% Date: 6/13/2017
% Programmed by: Justin Blaber
% Principle Investigator: Antonia Antoniou
%
%------------------------------... |
github | CU-CommunityApps/choco-packages-master | ncorr_alg_convertseeds.m | .m | choco-packages-master/packages/matlab-ciser/tools/ncorr/ncorr_alg_convertseeds.m | 27,822 | utf_8 | 126e3f6e6db2afe68f675dff24040d5b | function [convertseedinfo,outstate] = ncorr_alg_convertseeds(plot_u_old,plot_v_old,plot_u_interp_old,plot_v_interp_old,roi_old,roi_new,seedwindow,spacing,border_interp)
% This function obtains the "convert" seeds. It will try to seed as many
% "new" regions as possible (one seed per region). It is possible that no
% se... |
github | CU-CommunityApps/choco-packages-master | ncorr_gui_viewplots.m | .m | choco-packages-master/packages/matlab-ciser/tools/ncorr/ncorr_gui_viewplots.m | 127,861 | utf_8 | b5e3358c4dae7e33660ab822d294b67c | function handles_gui = ncorr_gui_viewplots(reference,current,data_dic,type_plot,pos_parent,params_init)
% This is a GUI for viewing the displacement/strain plots.
%
% Inputs -----------------------------------------------------------------%
% reference - ncorr_class_img; used for displaying the background image.
% ... |
github | CU-CommunityApps/choco-packages-master | ncorr_util_formregionconstraint.m | .m | choco-packages-master/packages/matlab-ciser/tools/ncorr/ncorr_util_formregionconstraint.m | 6,122 | utf_8 | 458de04923bdcb004e97d0415e37da7e | function handle_constraintfcn = ncorr_util_formregionconstraint(region)
% This function returns handle_constraintfcn which, given a point, will
% return the closest point inside the region. This is mainly used for the
% constrainfcn for impoints which are restricted to be inside a region.
%
% Inputs ------------------... |
github | ganlubbq/StatisticalSignalProcessing-master | spet_plo.m | .m | StatisticalSignalProcessing-master/spet_plo.m | 787 | utf_8 | 2c37b27f7a781ce1fa1f6c056b7a1520 | % funzione che plotta lo spettro in modulo e fase rappresentato dai valori
% della trasformata Z di un filtro con zeri e poli rappresentati dai
% polinomi da passare in ingresso Az(zeri) Bp(poli), calcolata sul cerchio
% unitario
function [Spettro,f]=spet_plo(Az,Bp,fc)
%Potrei a questo punto valutare la fdt per fr... |
github | ganlubbq/StatisticalSignalProcessing-master | zero.m | .m | StatisticalSignalProcessing-master/zero.m | 186 | utf_8 | 37d559f73a9a57ddf53cf7db273976ae | %funzione che genera la sequenza complessa pertinente ad una certa
%trasformata Z contenente solo zeri
function [A]=zero(z)
A=[1 -z(1)];
for i=2:length(z)
A=conv(A,[1 -z(i)]);
end |
github | ganlubbq/StatisticalSignalProcessing-master | dft.m | .m | StatisticalSignalProcessing-master/dft.m | 515 | utf_8 | 0ab8bf1fed495d9258e3dbb5ac8e4cd9 | %funzione che calcola la DFT in forma matriciale
% x= sequenza in ingresso
% m= numero di campioni dft da calcolare
function [X,fk]=dft(x,m,fc)
n=length(x);
%zero padding
if(n<m)
x=[x zeros(1,m-n)];
end
W=zeros(m); %matrice DFT
for k=1:m
for i=1:m
W(k,i)=exp(-j*((2*pi)/m)*k*i);
end
end
X=x*W.'... |
github | ganlubbq/StatisticalSignalProcessing-master | LMS.m | .m | StatisticalSignalProcessing-master/LMS.m | 1,262 | utf_8 | 26a64a5e3f9a20c4fb081974a0b4594a | %INPUT
%
%
% U= matrice di convoluzione per identificazione
% h_sti= stima iniziale del filtro
% y= osservazioni con rumore
% mu= passo di aggiornamento
% h=filtro vero
%
%
%OUTPUT:
%
%
% fstim=filtro stimato
% MSE=errore quadratico medio della stima ad ogni iterazione
function [fstim,MSE]=LMS(U,h_sti,y,mu,h)
P=len... |
github | ganlubbq/StatisticalSignalProcessing-master | trigiv.m | .m | StatisticalSignalProcessing-master/trigiv.m | 574 | utf_8 | 3cb4deef9841237812f4f32fd682b430 | %% Triangolarizzazione di una matrice via rotazioni di Givens
function [A_tri,Qtot1]=trigiv(A)
N=size(A,1);
M=size(A,2);
A_tri=A;
%rango (a meno di colonne o righe linearmente dipendenti)
rang=min(N,M);
k=1;
for j=1:1:(rang-1)
for i=rang:-1:(j+1)
Q=eye(rang);
the=atan(A_tri(i,j)/A_tri(j,j));
... |
github | ganlubbq/StatisticalSignalProcessing-master | fermat.m | .m | StatisticalSignalProcessing-master/fermat.m | 523 | utf_8 | e5ac674353476e8e222b16a22e73cca5 | %Funzione che calcola i percorsi intermedi BS-superficie e superficie-MS
%con raggio di Fermat --> l1 ed l2 rispettivamente
% d = distanza in piano BS-MS
% hBS =altezza BS in metri
% hMS = altezza MS in metri
function [l1,l2]=fermat(hBS,hMS,d)
df1=((-d*(hBS^2))+(hMS*hBS*d))/(hMS^2-hBS^2);
df2=((-d*(hBS^2))-... |
github | ganlubbq/StatisticalSignalProcessing-master | RLS.m | .m | StatisticalSignalProcessing-master/RLS.m | 735 | utf_8 | 333b21ebfc99340285205afb22f2cf1f | %Algoritmo RLS per la stima dei coefficienti del filtro
function [fil,MSE]=RLS(U,y,h)
P=length(h);
delta=0.3;
R_s= eye(P)*delta; %inizializzazione della matrice di covarianza
f_s=zeros(P,1); %inizializzazione della stima
Ri=(R_s)^-1;
i=1;
while(i<=P+20*P)
Ri=Ri - (Ri*U(i,:)'*U(i,:)*Ri)/(1+ U(i,:)*Ri... |
github | fernandoandreotti/cinc-challenge2017-master | multi_qrsdetect.m | .m | cinc-challenge2017-master/featurebased-approach/subfunctions/multi_qrsdetect.m | 9,442 | utf_8 | a96e2aff02717a96d3c94dcf4187a983 | function [qrs,feats]=multi_qrsdetect(signal,fs,fname)
% This function detects QRS peaks on ECG signals by taking the consensus of multiple algorithms, namely:
% - gqrs (WFDB Toolbox)
% - Pan-Tompkins (FECGSYN)
% - Maxima Search (OSET/FECGSYN)
% - matched filtering
%
% --
% ECG classification from single-lea... |
github | fernandoandreotti/cinc-challenge2017-master | residualfeats.m | .m | cinc-challenge2017-master/featurebased-approach/subfunctions/residualfeats.m | 4,225 | utf_8 | caec19d3a2f1a68388f57735d2d29752 | function feats = residualfeats(signal,fs,qrs)
% This function derives features out of QRS cancelled ECG signals, aiming at the atrial information.
%
% --
% ECG classification from single-lead segments using Deep Convolutional Neural
% Networks and Feature-Based Approaches - December 2017
%
% Released under the GNU Ge... |
github | fernandoandreotti/cinc-challenge2017-master | morphofeatures.m | .m | cinc-challenge2017-master/featurebased-approach/subfunctions/morphofeatures.m | 7,107 | utf_8 | cce0ae9aa3c7c26ee530c9260c8b53f2 | function feats = morphofeatures(signal,fs,qrs,recordName)
% This function obtains morphological features from raw ECG data.
%
% --
% ECG classification from single-lead segments using Deep Convolutional Neural
% Networks and Feature-Based Approaches - December 2017
%
% Released under the GNU General Public License
%... |
github | fernandoandreotti/cinc-challenge2017-master | OSET_MaxSearch.m | .m | cinc-challenge2017-master/featurebased-approach/subfunctions/lib/OSET/OSET_MaxSearch.m | 3,010 | utf_8 | ea7b0805ed40c38f18668f76d549e9ed | % peaks = OSET_MaxSearch(x,f,flag),
% R-peak detector based on max search
%
% inputs:
% signal: vector of input data
% ff: approximate signal beat-rate in Hertz, normalized by the sampling frequency
% flag: search for positive (flag=1) or negative (flag=0) peaks. By default
% the maximum absolute value of the signal, d... |
github | fernandoandreotti/cinc-challenge2017-master | DFA_main_a2.m | .m | cinc-challenge2017-master/featurebased-approach/subfunctions/lib/DFA/DFA_main_a2.m | 1,843 | utf_8 | c9154258387369bda985b073224c1447 |
function [D,Alpha1]=DFA_main_a2(DATA)
% DATA should be a time series of length(DATA) greater than 2000,and of column vector.
%A is the alpha in the paper
%D is the dimension of the time series
%n can be changed to your interest
%
%Copyright (c) 2009, Guan Wenye
%All rights reserved.
%
%Redistribution and us... |
github | fernandoandreotti/cinc-challenge2017-master | DFA_main_a1.m | .m | cinc-challenge2017-master/featurebased-approach/subfunctions/lib/DFA/DFA_main_a1.m | 1,846 | utf_8 | be6d67571fecfe7d895b457d320335ef |
function [D,Alpha1]=DFA_main_a1(DATA)
% DATA should be a time series of length(DATA) greater than 2000,and of column vector.
%A is the alpha in the paper
%D is the dimension of the time series
%n can be changed to your interest
%
%Copyright (c) 2009, Guan Wenye
%All rights reserved.
%
%Redistribution and us... |
github | fernandoandreotti/cinc-challenge2017-master | FECGx_kf_PhaseCalc.m | .m | cinc-challenge2017-master/featurebased-approach/subfunctions/lib/fernando/FECGx_kf_PhaseCalc.m | 2,758 | utf_8 | a283d62f38cf92cf9a06bd0fd09507a7 | %% Phase Calculation
% Generates the phase signal for Kalman Filtering
% Inputs
% peaks QRS peak locations
% length Length of data for phase generation
%
%
% Fetal Extraction Toolbox, version 1.0, February 2014
% Released under the GNU General Public License
%
% Copyright (C) 2014 Fernando And... |
github | fernandoandreotti/cinc-challenge2017-master | FECGSYN_ts_extraction.m | .m | cinc-challenge2017-master/featurebased-approach/subfunctions/lib/fernando/FECGSYN_ts_extraction.m | 9,690 | utf_8 | 4d553bba7d7da1625e755a67ee0948ce | function residual = FECGSYN_ts_extraction(peaks,ecg,method,debug,varargin)
% Template subtraction for MECG cancellation. Five template subtraction techniques
% are implemented, namely TS,TS-CERUTTI,TS-SUZANNA,TS-LP,TS-PCA. If a more adaptive
% technique is required then an the EKF technique as in (Sameni 2007) is rec... |
github | fernandoandreotti/cinc-challenge2017-master | binary_seq_to_string.m | .m | cinc-challenge2017-master/featurebased-approach/subfunctions/lib/Lempel Ziv/binary_seq_to_string.m | 2,118 | utf_8 | ea1f9bd7af2d67266212e36a905a2f71 | %BINARY_SEQ_TO_STRING String representation of a logical vector.
% This function takes a vector of logical values, and returns a string
% representation of the vector. e.g. [0 1 0 1 1] becomes '01011'.
%
% Usage: [s] = binary_seq_to_string(b)
%
% INPUTS:
%
% b:
% A vector of logical values represen... |
github | fernandoandreotti/cinc-challenge2017-master | calc_lz_complexity.m | .m | cinc-challenge2017-master/featurebased-approach/subfunctions/lib/Lempel Ziv/calc_lz_complexity.m | 15,770 | utf_8 | a02daa7bc1f2f004f72b0dd90a486379 | %CALC_LZ_COMPLEXITY Lempel-Ziv measure of binary sequence complexity.
% This function calculates the complexity of a finite binary sequence,
% according to the algorithm published by Abraham Lempel and Jacob Ziv in
% the paper "On the Complexity of Finite Sequences", published in
% "IEEE Transactions on Infor... |
github | fernandoandreotti/cinc-challenge2017-master | metrics.m | .m | cinc-challenge2017-master/featurebased-approach/subfunctions/lib/sample_entry/metrics.m | 5,892 | utf_8 | c0496681f837dba38f12fff9b12fd0d9 | % //This software is licensed under the BSD 3 Clause license: http://opensource.org/licenses/BSD-3-Clause
%
%
% //Copyright (c) 2013, University of Oxford
% //All rights reserved.
%
% //Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditi... |
github | fernandoandreotti/cinc-challenge2017-master | BPcount.m | .m | cinc-challenge2017-master/featurebased-approach/subfunctions/lib/sample_entry/BPcount.m | 2,459 | utf_8 | 587edb21d3cebe075fa99c07a8390363 | % //This software is licensed under the BSD 3 Clause license: http://opensource.org/licenses/BSD-3-Clause
%
%
% //Copyright (c) 2013, University of Oxford
% //All rights reserved.
%
% //Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditi... |
github | fernandoandreotti/cinc-challenge2017-master | comp_dRR.m | .m | cinc-challenge2017-master/featurebased-approach/subfunctions/lib/sample_entry/comp_dRR.m | 2,386 | utf_8 | f89ecc65ebc8d408b0e33413b7c15127 | % //This software is licensed under the BSD 3 Clause license: http://opensource.org/licenses/BSD-3-Clause
%
%
% //Copyright (c) 2013, University of Oxford
% //All rights reserved.
%
% //Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditi... |
github | fernandoandreotti/cinc-challenge2017-master | comput_AFEv.m | .m | cinc-challenge2017-master/featurebased-approach/subfunctions/lib/sample_entry/comput_AFEv.m | 2,289 | utf_8 | e58e29bd082b0fe4560dc416303541b7 | % //This software is licensed under the BSD 3 Clause license: http://opensource.org/licenses/BSD-3-Clause
%
%
% //Copyright (c) 2013, University of Oxford
% //All rights reserved.
%
% //Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditi... |
github | alex-delalande/numerical-tours-master | perform_publishing.m | .m | numerical-tours-master/matlab/m_files/perform_publishing.m | 8,391 | utf_8 | 778c9d6ab67fb9f48a7acba7dba2f3d0 | function perform_publishing(name, options)
% perform_publishing - publish a file to HTML format
%
% perform_publishing(name, options);
%
% If name is empty, process all the files (and also zip all toolboxes).
%
% options.rep set output directory (default '../../../numerical-tours-site/matlab/')
% options.repp... |
github | alex-delalande/numerical-tours-master | perform_scilab_conversion.m | .m | numerical-tours-master/matlab/m_files/perform_scilab_conversion.m | 2,210 | utf_8 | 530502896e21ccb55e21856289190c35 | function perform_scilab_conversion(name, outdir, toolbox_dir)
% perform_scilab_conversion - convert a matlab file to scilab
%
% perform_scilab_conversion(name);
%
% If name is empty, process all the files.
%
% Copyright (c) 2008 Gabriel Peyre
if nargin<2
outdir = '../scilab/';
end
if nargin<3
toolbox_di... |
github | alex-delalande/numerical-tours-master | dump_struct.m | .m | numerical-tours-master/matlab/m_files/toolbox_general/dump_struct.m | 1,389 | utf_8 | 746b6d65b8fc8c67e8cb806c235f5e6a | function fid = dump_struct(s,fid,header)
% dump_struct - dump the content of a struct to a file
%
% dump_struct(s,fid, header);
%
% Copyright (c) 2008 Gabriel Peyre
if nargin<3
header = '';
end
if isstr(fid)
fid = fopen(fid, 'a');
if fid<=0
error(['File ' fid ' does not exist.']);
end
en... |
github | alex-delalande/numerical-tours-master | poissrnd.m | .m | numerical-tours-master/matlab/m_files/toolbox_general/poissrnd.m | 10,053 | utf_8 | 64b00f80e484b0c01bfd50a87756f587 | function r = poissrnd(lambda,m,n)
%POISSRND Random matrices from Poisson distribution.
% R = POISSRND(LAMBDA) returns a matrix of random numbers chosen
% from the Poisson distribution with parameter LAMBDA.
%
% The size of R is the size of LAMBDA. Alternatively,
% R = POISSRND(LAMBDA,M,N) returns an M by N... |
github | alex-delalande/numerical-tours-master | perform_faces_reorientation.m | .m | numerical-tours-master/matlab/m_files/toolbox_general/perform_faces_reorientation.m | 2,816 | utf_8 | 2cf3d5c1ad6ea271b524352db5492c2c | function faces = perform_faces_reorientation(vertex,faces, options)
% perform_faces_reorientation - reorient the faces with respect to the center of the mesh
%
% faces = perform_faces_reorientation(vertex,faces, options);
%
% try to find a consistant reorientation for faces of a mesh.
%
% if options.method = 'fast... |
github | alex-delalande/numerical-tours-master | gamrnd.m | .m | numerical-tours-master/matlab/m_files/toolbox_general/gamrnd.m | 10,861 | utf_8 | 9b8a786919b4ddfbebdf74985b19ebb2 | function r = gamrnd(a,b,m,n);
%GAMRND Random matrices from gamma distribution.
% R = GAMRND(A,B) returns a matrix of random numbers chosen
% from the gamma distribution with parameters A and B.
% The size of R is the common size of A and B if both are matrices.
% If either parameter is a scalar, the size of ... |
github | alex-delalande/numerical-tours-master | binornd.m | .m | numerical-tours-master/matlab/m_files/toolbox_general/binornd.m | 9,362 | utf_8 | 0ca5d51eb461d57552c90487eab9946d | function r=binornd(n,p,mm,nn)
% BINORND Random matrices from a binomial distribution.
% R = BINORND(N,P,MM,NN) is an MM-by-NN matrix of random
% numbers chosen from a binomial distribution with parameters N and P.
%
% The size of R is the common size of N and P if both are matrices.
% If either parameter is a scalar, ... |
github | alex-delalande/numerical-tours-master | dump_struct.m | .m | numerical-tours-master/matlab/toolbox_general/dump_struct.m | 1,389 | utf_8 | 746b6d65b8fc8c67e8cb806c235f5e6a | function fid = dump_struct(s,fid,header)
% dump_struct - dump the content of a struct to a file
%
% dump_struct(s,fid, header);
%
% Copyright (c) 2008 Gabriel Peyre
if nargin<3
header = '';
end
if isstr(fid)
fid = fopen(fid, 'a');
if fid<=0
error(['File ' fid ' does not exist.']);
end
en... |
github | alex-delalande/numerical-tours-master | poissrnd.m | .m | numerical-tours-master/matlab/toolbox_general/poissrnd.m | 10,053 | utf_8 | 64b00f80e484b0c01bfd50a87756f587 | function r = poissrnd(lambda,m,n)
%POISSRND Random matrices from Poisson distribution.
% R = POISSRND(LAMBDA) returns a matrix of random numbers chosen
% from the Poisson distribution with parameter LAMBDA.
%
% The size of R is the size of LAMBDA. Alternatively,
% R = POISSRND(LAMBDA,M,N) returns an M by N... |
github | alex-delalande/numerical-tours-master | perform_faces_reorientation.m | .m | numerical-tours-master/matlab/toolbox_general/perform_faces_reorientation.m | 2,816 | utf_8 | 2cf3d5c1ad6ea271b524352db5492c2c | function faces = perform_faces_reorientation(vertex,faces, options)
% perform_faces_reorientation - reorient the faces with respect to the center of the mesh
%
% faces = perform_faces_reorientation(vertex,faces, options);
%
% try to find a consistant reorientation for faces of a mesh.
%
% if options.method = 'fast... |
github | alex-delalande/numerical-tours-master | gamrnd.m | .m | numerical-tours-master/matlab/toolbox_general/gamrnd.m | 10,861 | utf_8 | 9b8a786919b4ddfbebdf74985b19ebb2 | function r = gamrnd(a,b,m,n);
%GAMRND Random matrices from gamma distribution.
% R = GAMRND(A,B) returns a matrix of random numbers chosen
% from the gamma distribution with parameters A and B.
% The size of R is the common size of A and B if both are matrices.
% If either parameter is a scalar, the size of ... |
github | alex-delalande/numerical-tours-master | binornd.m | .m | numerical-tours-master/matlab/toolbox_general/binornd.m | 9,362 | utf_8 | 0ca5d51eb461d57552c90487eab9946d | function r=binornd(n,p,mm,nn)
% BINORND Random matrices from a binomial distribution.
% R = BINORND(N,P,MM,NN) is an MM-by-NN matrix of random
% numbers chosen from a binomial distribution with parameters N and P.
%
% The size of R is the common size of N and P if both are matrices.
% If either parameter is a scalar, ... |
github | alex-delalande/numerical-tours-master | iradon.m | .m | numerical-tours-master/matlab/toolbox_signal/iradon.m | 9,900 | utf_8 | 28cae50d959ca460cfc01acf31c2e700 | function [img,H] = iradon(varargin)
%IRADON Compute inverse Radon transform.
% I = iradon(R,THETA) reconstructs the image I from projection
% data in the 2-D array R. The columns of R are parallel beam
% projection data. IRADON assumes that the center of rotation
% is the center point of the projections, wh... |
github | alex-delalande/numerical-tours-master | load_signal.m | .m | numerical-tours-master/matlab/toolbox_signal/load_signal.m | 12,338 | utf_8 | b70e4cb57d6b467ae9c90d4b3310a81f | function y = load_signal(name, n, options)
% load_signal - load a 1D signal
%
% y = load_signal(name, n, options);
%
% name is a string that can be :
% 'regular' (options.alpha gives regularity)
% 'step', 'rand',
% 'gaussiannoise' (options.sigma gives width of filtering in pixels),
% [natural signa... |
github | alex-delalande/numerical-tours-master | load_hdr.m | .m | numerical-tours-master/matlab/toolbox_signal/load_hdr.m | 4,933 | utf_8 | 6e9f25ee3fd41a80fb31c4e53984631b | function [img, fileinfo] = load_hdr(filename)
% load_hdr - loading a radiance RBGE file.
%
% [img, fileinfo] = load_hdr(filename);
%
% Written by Lawrence A. Taplin (taplin@cis.rit.edu)
%
% Based loosely on the c-code RGBE implementation written by Bruce Walters
% http://www.graphics.cornell.edu/~bjw/rgbe.html
%
% f... |
github | alex-delalande/numerical-tours-master | perform_wavortho_transf.m | .m | numerical-tours-master/matlab/toolbox_signal/perform_wavortho_transf.m | 2,736 | utf_8 | 362bed43d951f6bdefb520003047e2ea | function f = perform_wavortho_transf(f,Jmin,dir,options)
% perform_wavortho_transf - compute orthogonal wavelet transform
%
% fw = perform_wavortho_transf(f,Jmin,dir,options);
%
% You can give the filter in options.h.
%
% Works in arbitrary dimension.
%
% Copyright (c) 2009 Gabriel Peyre
options.n... |
github | alex-delalande/numerical-tours-master | plot_curvelet.m | .m | numerical-tours-master/matlab/toolbox_signal/plot_curvelet.m | 2,421 | utf_8 | a1a1177c6c1d743518abcfacae1e9e03 | function J = plot_curvelet(MW, options)
% plot_curvelet - display curvelets coefficients
%
% J = plot_curvelet(MW);
%
% Based on curvelab.
%generate curvelet image (a complex array)
I = fdct_wrapping_dispcoef(MW);
% remove bckgd
U = (I==.5);
J = ones(size(I)+2);
JU = ones(size(I)+2);
J(2:end-1,2:end-1) = I;
JU... |
github | alex-delalande/numerical-tours-master | plot_tensor_field.m | .m | numerical-tours-master/matlab/toolbox_signal/plot_tensor_field.m | 5,736 | utf_8 | 8e241783316bc4c13529031d81db17d4 | function h = plot_tensor_field(H, M, options)
% plot_tensor_field - display a tensor field
%
% h = plot_tensor_field(H, M, options);
%
% options.sub controls sub-sampling
% options.color controls color
%
% Copyright (c) 2006 Gabriel Peyre
if nargin<3
options.null = 0;
end
if not( isstruct(op... |
github | alex-delalande/numerical-tours-master | perform_homotopy.m | .m | numerical-tours-master/matlab/toolbox_signal/perform_homotopy.m | 11,418 | utf_8 | dd245ff8cad26000a60436c3c2e2c418 | function [X,Lambda] = perform_homotopy(D,y)
% perform_homotopy - compute the L1 regularization path
%
% X = perform_homotopy(D,y);
%
% Copyright (c) 2012 Gabriel Peyre
[P,N] = size(D);
niter = 10*P;
X = []; Lambda = [];
% initialization
C = D'*y;
[lambda,I] = max(abs(C));
x = zeros(N,1);
X(:,end+1) = x; Lambda(e... |
github | alex-delalande/numerical-tours-master | load_image.m | .m | numerical-tours-master/matlab/toolbox_signal/load_image.m | 20,275 | utf_8 | c700b54853577ab37402e27e4ca061b8 | function M = load_image(type, n, options)
% load_image - load benchmark images.
%
% M = load_image(name, n, options);
%
% name can be:
% Synthetic images:
% 'chessboard1', 'chessboard', 'square', 'squareregular', 'disk', 'diskregular', 'quaterdisk', '3contours', 'line',
% 'line_vertical', 'l... |
github | alex-delalande/numerical-tours-master | perform_curvelet_transform.m | .m | numerical-tours-master/matlab/toolbox_signal/perform_curvelet_transform.m | 33,957 | utf_8 | 63811c4cedefc4b0a5ede5a2b3269c54 | function y = perform_curvelet_transform(x,options)
% perform_curvelet_transform - a wrapper to curvlab
%
% M = perform_curvelet_transform(MW,options);
%
% Forward and backward curvelet transform
% You must provide options.n (width of the image).
%
% Visit www.curvelab.org for the full code.
optio... |
github | alex-delalande/numerical-tours-master | perform_wavelet_transf.m | .m | numerical-tours-master/matlab/toolbox_signal/perform_wavelet_transf.m | 6,359 | utf_8 | e186b6bffa94179c6c7e4497ba32e904 | function x = perform_wavelet_transf(x, Jmin, dir, options)
% perform_wavelet_transf - peform fast lifting transform
%
% y = perform_wavelet_transf(x, Jmin, dir, options);
%
% Implement 1D and 2D symmetric wavelets with symmetric boundary treatements, using
% a lifting implementation.
%
% h = options.f... |
github | alex-delalande/numerical-tours-master | perform_thresholding.m | .m | numerical-tours-master/matlab/toolbox_signal/perform_thresholding.m | 6,251 | utf_8 | 47aba185bb0bd0505c7e8aa326bc40c1 | function y = perform_thresholding(x, t, type, options)
% perform_thresholding - perform hard or soft thresholding
%
% y = perform_thresholding(x, t, type, options);
%
% t is the threshold
% type is either 'hard' or 'soft' or 'semisoft' or 'strict' or 'block'.
%
% works also for complex data, and for cell array... |
github | alex-delalande/numerical-tours-master | perform_stft.m | .m | numerical-tours-master/matlab/toolbox_signal/perform_stft.m | 5,289 | utf_8 | b4057f12e297c275b4333d8483ce92dd | function y = perform_stft(x, w,q, options)
% perform_stft - compute a local Fourier transform
%
% Forward transform:
% MF = perform_stft(M,w,q, options);
% Backward transform:
% M = perform_stft(MF,w,q, options);
%
% w is the width of the window used to perform local computation.
% q is the spacing betwen eac... |
github | alex-delalande/numerical-tours-master | perform_solve_bp.m | .m | numerical-tours-master/matlab/toolbox_signal/perform_solve_bp.m | 72,049 | utf_8 | 527f7660ac12d11f05dda0f0f346b726 | function sol = p(A, y, N, maxIters, lambda, OptTol)
% SolveBP: Solves a Basis Pursuit problem
% Usage
% sol = SolveBP(A, y, N, maxIters, lambda, OptTol)
% Input
% A Either an explicit nxN matrix, with rank(A) = min(N,n)
% by assumption, or a string containing the name of a
% ... |
github | alex-delalande/numerical-tours-master | phantom.m | .m | numerical-tours-master/matlab/toolbox_signal/phantom.m | 6,447 | utf_8 | 5cac992f6a3cdfa201a0e3dc7206f4b3 | function [p,ellipse]=phantom(varargin)
%PHANTOM Generate a head phantom image.
% P = PHANTOM(DEF,N) generates an image of a head phantom that can
% be used to test the numerical accuracy of RADON and IRADON or other
% 2-D reconstruction algorithms. P is a grayscale intensity image that
% consists of ... |
github | alex-delalande/numerical-tours-master | perform_arith_coding.m | .m | numerical-tours-master/matlab/toolbox_signal/perform_arith_coding.m | 30,315 | utf_8 | b017b1e1fe107dfccde92738b628d194 | function [y,nbr_bits] = perform_arith_coding(xC, dir)
% perform_arithmetic_coding_slow - perform adaptive arithmetic coding
%
% [y,nbr_bits] = perform_arithmetic_coding_slow(x, dir);
%
% dir=1 for encoding, dir=-1 for decoding.
%
% Based on the code of (c) Karl Skretting
%
% Copyright (c) 2008 Gabriel Peyre
%
% ... |
github | alex-delalande/numerical-tours-master | perform_omp.m | .m | numerical-tours-master/matlab/toolbox_signal/perform_omp.m | 9,857 | utf_8 | 84fa05746f22e0ac58735d2c53b486f1 | function X = perform_omp(D,Y,options)
% perform_omp - perform orthogonal matching pursuit
%
% X = perform_omp(D,Y,options);
%
% D is the dictionary of size (n,p) of p atoms
% Y are the m vectors to decompose of size (n,m)
% X are the m coefficients of the decomposition of size (p,m).
%
% Orthogonal matching ... |
github | alex-delalande/numerical-tours-master | mad.m | .m | numerical-tours-master/matlab/toolbox_signal/mad.m | 7,921 | utf_8 | 6d4949e64f7802d97e068c87415b0460 | function y = mad(x,flag)
%MAD Mean/median absolute deviation.
% Y = MAD(X) returns the mean absolute deviation of the values in X. For
% vector input, Y is MEAN(ABS(X-MEAN(X)). For a matrix input, Y is a row
% vector containing the mean absolute deviation of each column of X. For
% N-D arrays, MAD oper... |
github | alex-delalande/numerical-tours-master | plot_hufftree.m | .m | numerical-tours-master/matlab/toolbox_signal/plot_hufftree.m | 792 | utf_8 | b3a28991b5dc6e37df21dad9f445068a | function plot_hufftree(T,p)
% plot_hufftree - plot a huffman tree
%
% plot_hufftree(T);
%
% Copyright (c) 2008 Gabriel Peyre
hold on;
plot_tree(T{1},[0,0],1);
hold off;
axis tight;
axis off;
%%
function plot_tree(T,x,j)
tw = 15;
lw = 1.5;
ms = 10;
if not(iscell(T))
de = [-.02 -.2];
... |
github | alex-delalande/numerical-tours-master | perform_haar_transf.m | .m | numerical-tours-master/matlab/toolbox_signal/perform_haar_transf.m | 3,170 | utf_8 | 14b7d7fd610eca05949ef196c55d7b83 | function f = perform_haar_transf(f, Jmin, dir, options)
% perform_haar_transf - peform fast Haar transform
%
% y = perform_haar_transf(x, Jmin, dir);
%
% Implement a Haar wavelets.
% Works in any dimension.
%
% Copyright (c) 2008 Gabriel Peyre
n = size(f,1);
Jmax = log2(n)-1;
if dir==1
%%% FORWARD %%%
... |
github | alex-delalande/numerical-tours-master | perform_huffcoding.m | .m | numerical-tours-master/matlab/toolbox_signal/perform_huffcoding.m | 1,491 | utf_8 | 41a9144e1a2da192d37cf10a40add3e2 | function y = perform_huffcoding(x,T,dir)
% perform_huffcoding - perform huffman coding
%
% y = perform_huffcoding(x,T,dir);
%
% dir=+1 for coding
% dir=-1 for decoding
%
% T is a Huffman tree, computed with compute_hufftree
%
% Copyright (c) 2008 Gabriel Peyre
if dir==1
%%% CODING %%%
... |
github | alex-delalande/numerical-tours-master | select3d.m | .m | numerical-tours-master/matlab/toolbox_graph/select3d.m | 10,864 | utf_8 | 64f6b58cf8db75c3508f68035be9892e | function [pout, vout, viout, facevout, faceiout] = select3d(obj)
%SELECT3D(H) Determines the selected point in 3-D data space.
% P = SELECT3D determines the point, P, in data space corresponding
% to the current selection position. P is a point on the first
% patch or surface face intersected along the selection ... |
github | alex-delalande/numerical-tours-master | compute_parameterization.m | .m | numerical-tours-master/matlab/toolbox_graph/compute_parameterization.m | 7,948 | utf_8 | ccbb3294b8723d824f8bfa35c4ea64dc | function vertex1 = compute_parameterization(vertex,face, options)
% compute_parameterization - compute a planar parameterization
%
% vertex1 = compute_parameterization(vertex,face, options);
%
% options.method can be:
% 'parameterization': solve classical parameterization, the boundary
% is... |
github | alex-delalande/numerical-tours-master | select3dtool.m | .m | numerical-tours-master/matlab/toolbox_graph/select3dtool.m | 2,713 | utf_8 | fdf7d572638e6ebd059c63f233d26704 | function select3dtool(arg)
%SELECT3DTOOL A simple tool for interactively obtaining 3-D coordinates
%
% SELECT3DTOOL(FIG) Specify figure handle
%
% Example:
% surf(peaks);
% select3dtool;
% % click on surface
if nargin<1
arg = gcf;
end
if ~ishandle(arg)
feval(arg);
return;
end
%% initialize gui %%
fig... |
github | alex-delalande/numerical-tours-master | compute_boundary.m | .m | numerical-tours-master/matlab/toolbox_graph/compute_boundary.m | 2,537 | utf_8 | 1722359a4efff29fd344fc6e14eddba5 | function boundary=compute_boundary(face, options)
% compute_boundary - compute the vertices on the boundary of a 3D mesh
%
% boundary=compute_boundary(face);
%
% Copyright (c) 2007 Gabriel Peyre
if size(face,1)<size(face,2)
face=face';
end
%% compute edges (i,j) that are adjacent to only 1 face
... |
github | alex-delalande/numerical-tours-master | compute_geometric_laplacian.m | .m | numerical-tours-master/matlab/toolbox_graph/compute_geometric_laplacian.m | 5,760 | utf_8 | b6c0f7f8acdbb0c203c5f1a297957760 | function L = compute_geometric_laplacian(vertex,face,type)
% compute_geometric_laplacian - return a laplacian
% of a given triangulation (can be combinatorial or geometric).
%
% L = compute_geometric_laplacian(vertex,face,type);
%
% Type is either :
% - 'combinatorial' : combinatorial laplacian, d... |
github | alex-delalande/numerical-tours-master | check_face_vertex.m | .m | numerical-tours-master/matlab/toolbox_graph/check_face_vertex.m | 671 | utf_8 | 21c65f119991c973909eedd356838dad | function [vertex,face] = check_face_vertex(vertex,face, options)
% check_face_vertex - check that vertices and faces have the correct size
%
% [vertex,face] = check_face_vertex(vertex,face);
%
% Copyright (c) 2007 Gabriel Peyre
vertex = check_size(vertex,2,4);
face = check_size(face,3,4);
%%%%%%%%%%%%%%%%%%%%%%%... |
github | alex-delalande/numerical-tours-master | compute_voronoi_triangulation.m | .m | numerical-tours-master/matlab/toolbox_graph/compute_voronoi_triangulation.m | 2,807 | utf_8 | f9daaae570bef29e30a0956f719d9c19 | function faces = compute_voronoi_triangulation(Q, vertex)
% compute_voronoi_triangulation - compute a triangulation
%
% face = compute_voronoi_triangulation(Q);
%
% Q is a Voronoi partition function, computed using
% perform_fast_marching.
% face(:,i) is the ith face.
%
% Works in 2D and in 3D.
%
% Cop... |
github | alex-delalande/numerical-tours-master | plot_graph.m | .m | numerical-tours-master/matlab/toolbox_graph/plot_graph.m | 2,140 | utf_8 | 337033b66fe405903639bcac59c2b34d | function h = plot_graph(A,xy, options)
% plot_graph - display a 2D or 3D graph.
%
% plot_graph(A,xy, options);
%
% options.col set the display (e.g. 'k.-')
%
% Copyright (c) 2006 Gabriel Peyre
if size(xy,1)>size(xy,2)
xy = xy';
end
if nargin<3
options.null = 0;
end
if not(isstruct(options))
col = op... |
github | alex-delalande/numerical-tours-master | vol3d.m | .m | numerical-tours-master/matlab/toolbox_graph/vol3d.m | 5,899 | utf_8 | 9ce5b72520d76d1225023aa3732b653d | function [model] = vol3d(varargin)
%H = VOL3D Volume render 3-D data.
% VOL3D uses the orthogonal plane 2-D texture mapping technique for
% volume rending 3-D data in OpenGL. Use the 'texture' option to fine
% tune the texture mapping technique. This function is best used with
% fast OpenGL hardware.
%
% H = ... |
github | alex-delalande/numerical-tours-master | perform_delaunay_flipping.m | .m | numerical-tours-master/matlab/toolbox_graph/perform_delaunay_flipping.m | 2,420 | utf_8 | 7c5e250e94e9e69d99c556c805b4d2fe | function [face, flips, flipsinv] = perform_delaunay_flipping(vertex,face,options)
% perform_delaunay_flipping - compute Dalaunay triangulation via flipping
%
% [face1, flips, flipsinv] = perform_delaunay_flipping(vertex,face,options);
%
% Set options.display_flips = 1 for graphical display.
%
% face is turned in... |
github | alex-delalande/numerical-tours-master | check_incircle_edge.m | .m | numerical-tours-master/matlab/toolbox_graph/check_incircle_edge.m | 1,633 | utf_8 | dca2fc799d9cf120df9156a15c47b5fa | function ic = check_incircle_edge(vertex, face, edge)
% check_incicle_edge - compute "empty circle" property for a set of edges
%
% ic = check_incicle_edge(vertex,face, edge);
%
% ic(i)==1 if edge(:,i) is delaunay valid (boundary or empty circles or non convex).
% It thus should be flipped if ic(i)==0.
%
% Cop... |
github | alex-delalande/numerical-tours-master | perform_faces_reorientation.m | .m | numerical-tours-master/matlab/toolbox_graph/perform_faces_reorientation.m | 2,865 | utf_8 | a575bdfcd3e6c86cde45febdeb343983 | function faces = perform_faces_reorientation(vertex,faces, options)
% perform_faces_reorientation - reorient the faces with respect to the center of the mesh
%
% faces = perform_faces_reorientation(vertex,faces, options);
%
% try to find a consistant reorientation for faces of a mesh.
%
% if options.method = 'fast... |
github | alex-delalande/numerical-tours-master | compute_geodesic_mesh.m | .m | numerical-tours-master/matlab/toolbox_graph/compute_geodesic_mesh.m | 4,234 | utf_8 | 39b158e6251c6dbe79e025b1c95061b2 | function [path,vlist,plist] = compute_geodesic_mesh(D, vertex, face, x, options)
% compute_geodesic_mesh - extract a discrete geodesic on a mesh
%
% [path,vlist,plist] = compute_geodesic_mesh(D, vertex, face, x, options);
%
% D is the set of geodesic distances.
%
% path is a 3D curve that is the shortest path st... |
github | alex-delalande/numerical-tours-master | compute_mesh_weight.m | .m | numerical-tours-master/matlab/toolbox_graph/compute_mesh_weight.m | 3,464 | utf_8 | 14ba480ba7ded730c631eceea16f8b05 | function W = compute_mesh_weight(vertex,face,type,options)
% compute_mesh_weight - compute a weight matrix
%
% W = compute_mesh_weight(vertex,face,type,options);
%
% W is sparse weight matrix and W(i,j)=0 is vertex i and vertex j are not
% connected in the mesh.
%
% type is either
% 'combinatorial': W(i... |
github | alex-delalande/numerical-tours-master | perform_publishing.m | .m | numerical-tours-master/matlab/toolbox_publishing/perform_publishing.m | 7,675 | utf_8 | fd2b999e87072411470e6fca15cdc9b1 | function perform_publishing(name, options)
% perform_publishing - publish a file to HTML format
%
% perform_publishing(name, options);
%
% If name is empty, process all the files (and also zip all toolboxes).
%
% options.rep set output directory (default 'html/')
% options.repprivate set output directory for ... |
github | alex-delalande/numerical-tours-master | perform_scilab_conversion.m | .m | numerical-tours-master/matlab/toolbox_publishing/perform_scilab_conversion.m | 2,210 | utf_8 | 530502896e21ccb55e21856289190c35 | function perform_scilab_conversion(name, outdir, toolbox_dir)
% perform_scilab_conversion - convert a matlab file to scilab
%
% perform_scilab_conversion(name);
%
% If name is empty, process all the files.
%
% Copyright (c) 2008 Gabriel Peyre
if nargin<2
outdir = '../scilab/';
end
if nargin<3
toolbox_di... |
github | alex-delalande/numerical-tours-master | compute_butterfly_neighbors.m | .m | numerical-tours-master/matlab/toolbox_wavelet_meshes/compute_butterfly_neighbors.m | 1,398 | utf_8 | 0a690efe10cc4cbba37565df43f15a2f | function [e,v,g] = compute_butterfly_neighbors(k, nj)
% compute_butterfly_neighbors - compute local neighbors of a vertex
%
% [e,v,g] = compute_butterfly_neighbors(k, nj);
%
% This is for internal use.
%
% e are the 2 direct edge neighbors
% v are the 2 indirect neighbors
% g are the fare neighbors
%
% You nee... |
github | alex-delalande/numerical-tours-master | load_spherical_function.m | .m | numerical-tours-master/matlab/toolbox_wavelet_meshes/load_spherical_function.m | 2,090 | utf_8 | fa00de26d8ccf7c2c8363fafa5f729dd | function f = load_spherical_function(name, pos, options)
% load_spherical_function - load a function on the sphere
%
% f = load_spherical_function(name, pos, options);
%
% Copyright (c) 2007 Gabriel Peyre
if iscell(pos)
pos = pos{end};
end
if size(pos,1)>size(pos,2)
pos = pos';
end
x = pos(1,:); x = x(:... |
github | alex-delalande/numerical-tours-master | perform_spherial_planar_sampling.m | .m | numerical-tours-master/matlab/toolbox_wavelet_meshes/perform_spherial_planar_sampling.m | 2,981 | utf_8 | 5bfd95a6221f7c73d61eab4013f13321 | function posw = perform_spherial_planar_sampling(pos_sphere, sampling_type, options)
% perform_spherial_planar_sampling - project sampling location from sphere to a square
%
% posw = perform_spherial_planar_sampling(pos_sphere, type)
%
% 'type' can be 'area' or 'gnomonic'.
%
% This is used to produced sphe... |
github | alex-delalande/numerical-tours-master | load_image.m | .m | numerical-tours-master/matlab/toolbox_wavelet_meshes/toolbox/load_image.m | 19,503 | utf_8 | 16a3a912ce98f3734882ac9fe80494c2 | function M = load_image(type, n, options)
% load_image - load benchmark images.
%
% M = load_image(name, n, options);
%
% name can be:
% Synthetic images:
% 'chessboard1', 'chessboard', 'square', 'squareregular', 'disk', 'diskregular', 'quaterdisk', '3contours', 'line',
% 'line_vertical', 'l... |
github | alex-delalande/numerical-tours-master | check_face_vertex.m | .m | numerical-tours-master/matlab/toolbox_wavelet_meshes/toolbox/check_face_vertex.m | 646 | utf_8 | fe3c5da3b1ca8f15eb7eed61acfc2259 | function [vertex,face] = check_face_vertex(vertex,face, options)
% check_face_vertex - check that vertices and faces have the correct size
%
% [vertex,face] = check_face_vertex(vertex,face);
%
% Copyright (c) 2007 Gabriel Peyre
vertex = check_size(vertex);
face = check_size(face);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
f... |
github | alex-delalande/numerical-tours-master | compute_mesh_weight.m | .m | numerical-tours-master/matlab/toolbox_wavelet_meshes/toolbox/compute_mesh_weight.m | 2,820 | utf_8 | c90377b7ee516f5f952ce8c31dcfd43b | function W = compute_mesh_weight(vertex,face,type,options)
% compute_mesh_weight - compute a weight matrix
%
% W = compute_mesh_weight(vertex,face,type,options);
%
% W is sparse weight matrix and W(i,j)=0 is vertex i and vertex j are not
% connected in the mesh.
%
% type is either
% 'combinatorial': W(i... |
github | ai-med/QuickNATv2-master | QuickNAT_Train.m | .m | QuickNATv2-master/QuickNAT_Networks/QuickNAT_Train.m | 18,894 | utf_8 | 1ee46a55261e93f102e78ae6ec3f1929 | function [net, info] = QuickNAT_Train(imdb, netF, inpt, varargin)
% some common options
trainer = @cnn_train_dag_seg;
opts.train.extractStatsFn = @extract_stats_segmentation_Mod;
opts.train.batchSize = 4;
opts.train.numEpochs = 15;
opts.train.continue = true ;
opts.train.gpus = [2] ;
opts.train.learningRate =... |
github | ai-med/QuickNATv2-master | freezeColors.m | .m | QuickNATv2-master/QuickNAT_Networks/freezeColors.m | 9,815 | utf_8 | 2068d7a4f7a74d251e2519c4c5c1c171 | function freezeColors(varargin)
% freezeColors Lock colors of plot, enabling multiple colormaps per figure. (v2.3)
%
% Problem: There is only one colormap per figure. This function provides
% an easy solution when plots using different colomaps are desired
% in the same figure.
%
% freezeColors freeze... |
github | ai-med/QuickNATv2-master | cnn_train_dag_seg.m | .m | QuickNATv2-master/QuickNAT_Networks/cnn_train_dag_seg.m | 9,984 | utf_8 | 19b10231e19b45b03a993325ecd97fba | function [net,stats] = cnn_train_dag_seg(net, imdb, getBatch, varargin)
%CNN_TRAIN_DAG Demonstrates training a CNN using the DagNN wrapper
% CNN_TRAIN_DAG() is similar to CNN_TRAIN(), but works with
% the DagNN wrapper instead of the SimpleNN wrapper.
% Copyright (C) 2014-15 Andrea Vedaldi.
% All rights reserved... |
github | ai-med/QuickNATv2-master | visualize_segmentation.m | .m | QuickNATv2-master/QuickNAT_Networks/visualize_segmentation.m | 5,328 | utf_8 | af65e066d1b43e32c0f7df354dda79ff | function visualize_segmentation(stats, imdb, net, opts)
epoch = stats.epoch;
plotErrors(opts, epoch, stats, false);
drawConfusionMatrix(opts, stats);
showImages(imdb, net, opts);
% print to disk
if(opts.savePlots)
print(opts.vis.hnd_loss, sprintf('%s/summary.pdf',opts.expDir), '-dpdf')... |
github | ai-med/QuickNATv2-master | visualize_classification.m | .m | QuickNATv2-master/QuickNAT_Networks/visualize_classification.m | 750 | utf_8 | ca5b11eb689c2b637f5a6c2d98baae44 | function visualize_classification(opts)
change_current_figure(opts.hand); clf;
stats = opts.stats;
epoch = opts.epoch;
plots = setdiff(cat(2, fieldnames(stats.train)', fieldnames(stats.val)'), {'num', 'time'}) ;
for p = plots
p = char(p) ;
values = zeros(0, epoch) ;
leg = {} ;
for f = {'train', 'val'}
... |
github | SMARTlab-Purdue/robotarium-rendezvous-RSSDOA-master | minboundcircle.m | .m | robotarium-rendezvous-RSSDOA-master/includes/minboundcircle.m | 7,297 | utf_8 | 280633840d9df9f6cdb804beceb0a493 | function [center,radius] = minboundcircle(x,y,hullflag)
% minboundcircle: Compute the minimum radius enclosing circle of a set of (x,y) pairs
% usage: [center,radius] = minboundcircle(x,y,hullflag)
% "A suite of minimal bounding objects" by John D'Errico (v1.2 23 May 2014) in Mathworks File Exchange.
%
% arguments: (in... |
github | cssjcai/hihca-master | getBatchFn.m | .m | hihca-master/codes/getBatchFn.m | 1,445 | utf_8 | 94781a69ec2a8881b4f3a081f5b0aa8c | function fn = getBatchFn(opts, meta)
% -------------------------------------------------------------------------
useGpu = numel(opts.gpus) > 0 ;
bopts.numThreads = opts.numFetchThreads ;
bopts.imageSize = meta.normalization.imageSize ;
bopts.border = meta.normalization.border ;
bopts.averageImage = meta.normalization.... |
github | cssjcai/hihca-master | hihca_model_hed.m | .m | hihca-master/codes/hihca_model_hed.m | 7,816 | utf_8 | 08e0aa399fe39c930e6d494350d27a0f | function net = hihca_model_hed(net, imdb, opts)
%% hed-based integration
% ------------------------------------------------------------------------------------
assert(numel(opts.hieLayerName)==numel(opts.rescaleLayerFactor),...
'You must assign scaling factors for all layers !');
hca_inputs = cell(1, numel(opts.h... |
github | cssjcai/hihca-master | hihca_visualization.m | .m | hihca-master/codes/hihca_visualization.m | 5,397 | utf_8 | 2c5b82be9ec5d683e10770eb002466c5 | function hihca_visualization(imdb, opts)
% using homogeneous kernel for better visualization of higher-order part
% with specific degree
epochIDX = ['net-epoch-',num2str(opts.netIDX),'.mat'];
snet = load(fullfile(opts.modelTrainDir, epochIDX), 'net', 'stats');
net = dagnn.DagNN.loadobj(snet.net);
net.removeLayer({'sqr... |
github | cssjcai/hihca-master | hihca_model.m | .m | hihca-master/codes/hihca_model.m | 1,791 | utf_8 | 4d470a0d2fff848c46c0c6ae11c9b843 | function pnet = hihca_model(imdb, opts)
%% load the pre-trained cnn model as base net
% ------------------------------------------------------------------------------------
bnet = load(opts.cnnModelDir);
tru_idx = simpleFindLayerIDXOfName(bnet, opts.hieLayerName{end});
bnet.layers = bnet.layers(1:tru_idx);
bnet = vl_... |
github | cssjcai/hihca-master | hihca_model_hc.m | .m | hihca-master/codes/hihca_model_hc.m | 6,966 | utf_8 | 6a83f6b1f0880743576304bac3950e00 | function net = hihca_model_hc(net, imdb, opts)
%% hypercolumn-based integration
% ------------------------------------------------------------------------------------
assert(numel(opts.hieLayerName)==numel(opts.rescaleLayerFactor),...
'You must assign scaling factors for all layers !');
% layer concatenation
if n... |
github | cssjcai/hihca-master | hihca_test.m | .m | hihca-master/codes/hihca_test.m | 3,105 | utf_8 | 4553a79130a1909b40ca694519b39f00 | function hihca_test(imdb, opts)
epochidx = ['net-epoch-',num2str(opts.netIDX),'.mat'];
snet = load(fullfile(opts.modelTrainDir, epochidx), 'net', 'stats');
net = dagnn.DagNN.loadobj(snet.net);
net.removeLayer({'classifier','loss','error','top5e'});
train = find(ismember(imdb.images.set, [1 2]));
if ~exist(opts.traine... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.