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 | cultpenguin/sippi-master | LoadTraceM.m | .m | sippi-master/toolboxes/gpr_fd/LoadTraceM.m | 9,894 | utf_8 | 8eb8cbd8ff6efa4faa5f72696f815bfe | %==========================================================================
%The function [TRC,CFG] = LOADTRACEM(FIELD,TRC_REDUCTION,SRC_NR,
% TOOLTYPE)
%loads traces from trace-files, created with the FDTD algorithm fwi.
%
%FIELD = field that should be loaded ('-1'=all -> re... |
github | cultpenguin/sippi-master | eps0_to_velocity.m | .m | sippi-master/toolboxes/gpr_fd/eps0_to_velocity.m | 318 | utf_8 | b80f216a6b6237782e19b028d7a5f7e4 |
function eps0_to_velocity(input)
c0=2.99792458*10^8;
velo=sqrt(c0.^2/input); % input=EPS0
disp([])
if velo*10^-9<0.3
disp(sprintf('%2.3f eps/eps0 ~ %2.3f m/ns',input,velo*10^-9))
end
disp([])
EPS0=c0^2/(input*10^9)^2; %input=velo
if EPS0>1
disp(sprintf('%2.3f m/ns ~ %2.3f eps/eps0',input,EPS0))
end |
github | cultpenguin/sippi-master | velocity_to_eps.m | .m | sippi-master/toolboxes/gpr_fd/velocity_to_eps.m | 890 | utf_8 | 35f9d5aca443c4f56b0c68f26905304d | % velocity_to_eps
%
% eps_r is the relative dieletric permittivity
% v is the velocity of the phase (m/ns)
%
% sig is the eletrical conductivity measured in mS/m
% f is the frequency. If f is set to 0 a high frequency approxiamtion is
% applied
%
% (C) Knud Cordua, 2016, Thomas Mejer Hansen, 2016
%
functio... |
github | cultpenguin/sippi-master | disc_freq.m | .m | sippi-master/toolboxes/gpr_fd/disc_freq.m | 820 | utf_8 | ce89f4e37f7f65eea8ce30ae315120d9 |
function f=disc_freq(N,dt)
% Discrete frequencies:
% Call: f=disc_freq(N,dt);
% N is the number of elements contained in the signal
% dt is the temporal or spatial sampling interval
%
% Knud S. Cordua, 2010
%
% Verification by symetri:
%
% dt=0.01;
% N=2^nextpow2(1000)+1;
% Tp=1;
% w=gausswavelet(Tp,N... |
github | cultpenguin/sippi-master | fwi_execute.m | .m | sippi-master/toolboxes/gpr_fd/fwi_execute.m | 16,064 | utf_8 | 8bdd81029c1ed381488fa6db1c055815 | function [dt nt error addpar]=fwi_execute(Ncores_applied,ant_pos,sim_mode,addpar)
error=0;
tic
Positions=ant_pos;
Ncores=addpar.cores;
% Logicals which indicate if other then default values are applied in the
% simulation. Snapshot is always different from the default of the
% executable.
fr=0;
sn=1;
co=0; % 0=Defaul... |
github | cultpenguin/sippi-master | sippi_forward_gpr_fd.m | .m | sippi-master/toolboxes/gpr_fd/sippi_forward_gpr_fd.m | 6,140 | utf_8 | 290399fa0154de366e9f5d7139ad298f | % sippi_forward_gpr_fd: full waveform gpr forward
%
% Call :
% [d,forward,prior,data]=sippi_forward_gpr_fd(m,forward,prior,data,id,im)
%
% the prior must be such that m{1} relfect the eps field, and (optionally)
% m{2} reflect the sig field (if not set it is trated as constant).
%
% % Mandatory
% forward.sources a... |
github | cultpenguin/sippi-master | load_wavelet.m | .m | sippi-master/toolboxes/gpr_fd/load_wavelet.m | 464 | utf_8 | 31f8a6bb1fc8e79b360db40ab5a8ccf1 | % load_wavelet: load wavelet for FDTD_fwi
%
% Call: [data,dt]=load_wavelet(fname);
%
% Input:
% - fname [def='source.E']: name (and optionally full path) of the binary file
% Output
% - data : 1-D data stored in the file.
% - dt : sample interval
function [data,dt]=load_wavelet(fname)
if nargin==0
fnam... |
github | cultpenguin/sippi-master | iseven.m | .m | sippi-master/toolboxes/gpr_fd/iseven.m | 354 | utf_8 | 01f9a5228480802f3e2effc891a04f03 |
function eo=iseven(input_array)
% Call: eo=iseven(input_array);
% This function outputs 1 if the length of the input array is an even
% number. If on the other hand the length of the input array is odd the
% function outputs 0.
% Knud S. Cordua, 2010
if 2*floor(length(input_array)/2)==2*length(input_array)/... |
github | cultpenguin/sippi-master | image_snapshots.m | .m | sippi-master/toolboxes/gpr_fd/image_snapshots.m | 2,677 | utf_8 | f4135f6b10661afa91ef88de63e888a2 |
function [data time_vector]=image_snapshots(sample_rate,Nplot,Ntrn,Nrow,gain,dx,dt,field)
%-------------------- Make plot of snapshots ------------------------------
%
% Call: data=image_snapshots(sample_rate,Nplot,Ntrn,Nrow,gain,dx,dt,field);
%
% * sample_rate: The rate of time-steps at which snapshots are written t... |
github | cultpenguin/sippi-master | setup_input_parameters.m | .m | sippi-master/toolboxes/gpr_fd/setup_input_parameters.m | 7,467 | utf_8 | 4ec9ef540bf2a25967c1b09ec20acfff |
function [addpar error]=setup_input_parameters(ant_pos,Sig,Eps,addpar)
error=0;
try
%=============== Parameters used in the forward modelling ================%
% Name of forward controler #1:
try
isempty(addpar.forwardexe1);
catch
addpar.forwardexe1='FDTD_forward1.exe';
end
... |
github | cultpenguin/sippi-master | bandpass_filter.m | .m | sippi-master/toolboxes/gpr_fd/bandpass_filter.m | 1,358 | utf_8 | d5cf9fd038be229165a48015f96bfab3 |
function data_out=bandpass_filter(data,F_stop1,F_pass1,F_pass2,F_stop2,Fs,mode)
% Call: data_out=bandpass_filter(data,F_stop1,F_pass1,F_pass2,F_stop2,Fs,mode);
% * mode: (1): Bandpass, (2): Highpass, (3): Lowpass
% * Fs = 1 / delta_time
[a b]=size(data);
if a>b
data=data';
end
A_stop1 = 100; % A... |
github | cultpenguin/sippi-master | sippi_forward_dcfd2_5D.m | .m | sippi-master/toolboxes/dcfw2_5D/sippi_forward_dcfd2_5D.m | 1,936 | utf_8 | 0155c0dd607641a67fc199482fb6ee23 | % sippi_forward_dcfd2_5D
%
% Call :
% [d,forward,prior,data]=sippi_forward_dcfd2_5D(m,forward,prior,data)
%
%
function [d,forward,prior,data]=sippi_forward_dcfd2_5D(m,forward,prior,data,id,im)
if nargin<2
forward.null=[];
end
if nargin<4; data{1}.null='';end
if nargin<5; id=1;end
if nargin<6... |
github | cultpenguin/sippi-master | sippi_forward_fdem1d.m | .m | sippi-master/toolboxes/fdem1d/sippi_forward_fdem1d.m | 4,570 | utf_8 | db9388ac8a5db44e69057ee4b6b27eab | % sippi_forward_fdem1d: 1D fdem1d forward solver
%
%
% [d,forward,prior,data]=sippi_forward_fdem1d(m,forward,prior,data);
%
% forward.ds=0; % DOWNSAMPLING [1]:yes, [0]:no
% forward.S; % SYSTEM DESCRIPTION, see fdem1d
% forward.htx; % Height of TX below surface (negative above surface)
%
% forward.force_one_thr... |
github | cultpenguin/sippi-master | calcrTEsens.m | .m | sippi-master/toolboxes/fdem1d/fdem1d/calcrTEsens.m | 3,991 | utf_8 | 08cd3a1b4b6f777e9a51fd58d08368d9 | % Modified by Akbar
% Function that changed were too numerous to keep in
function [varargout] = calcrTEsens(S,M,lam,flg)
%% calculate reflection coefficient according to Ward and Hohmann, EM theory for geophysical applications
% B. Minsley, June 2010
% constants
eps0 = 1/(35950207149.4727056*pi);%8.8541878176e-12;
mu0... |
github | cultpenguin/sippi-master | exp10.m | .m | sippi-master/toolboxes/fdem1d/fdem1d/exp10.m | 138 | utf_8 | e0f5af6ddced8f9fe7af0fdd91bd60b6 | % exp10
%
% See also log10
%
% provides:
% epx10(log10(x))=x
%
% See also log10
%
function y=exp10(x);
y=exp(log(10)*x);
|
github | cultpenguin/sippi-master | calcHxx.m | .m | sippi-master/toolboxes/fdem1d/fdem1d/calcHxx.m | 1,594 | utf_8 | 6702bc95bb55592ef1770de398676af9 | % Modified by Akbar
function [Hxx,H0xx] = calcHxx(ix,S,z,rTE,u0,lambda);
%%VCX
% B. Minsley, March 2010
%f(r) = int(K(lam)*Ji(lam*r)dlam
%r*f(r) = sum(K(lam)*W)
% decompose
w.j0 = lambda.j0.w(:);
flen.j0 = lambda.j0.flen;
lam.j0 = lambda.j0.lam(ix,:);
w.j1 = lambda.j1.w(:);
flen.j1 = lambda.j1.flen;
lam.j1 = lambda.... |
github | cultpenguin/sippi-master | calcHzz.m | .m | sippi-master/toolboxes/fdem1d/fdem1d/calcHzz.m | 877 | utf_8 | ef73ef1cf6d5085f6c8204f1a5417594 | % Modified by Akbar
function [Hzz,Hzz0] = calcHzz(ix,S,z,rTE,u0,lambda);
%TZ-RZ
% B. Minsley, March 2010
%f(r) = int(K(lam)*Ji(lam*r)dlam
%r*f(r) = sum(K(lam)*W)
% decompose
w = lambda.w(:);
flen = lambda.flen;
lam = lambda.lam(ix,:);
% z is positive downwards
h = -(z + S.tzoff(ix)); % transmitter height
rz = z + ... |
github | cultpenguin/sippi-master | eikonal_raylength.m | .m | sippi-master/toolboxes/traveltime/eikonal_raylength.m | 1,357 | utf_8 | b918da9a44751d4a0306efb8e5657691 | % eikonal_raylength : Computes the raylength from S to R using the eikonal equaiton
%
% Call:
% raylength=eikonal_raylength(x,y,v,S,R,tS,doPlot)
%
function [raylength]=eikonal_raylength(x,y,v,S,R,tS,doPlot)
if nargin<7
doPlot=0;
end
% FIND DX
try dx=x(2)-x(1);catch;dx=x(1);end
try dy=y(2)-y(1);catch;dy=y(1);end... |
github | cultpenguin/sippi-master | sippi_plot_traveltime_kernel.m | .m | sippi-master/toolboxes/traveltime/sippi_plot_traveltime_kernel.m | 1,689 | utf_8 | 240f2258779449643bcce5c2fe29a1ca | % sippi_plot_traveltime_kernel: plot the forward kernel (if it exists) on
% top of a realization of the prior
%
% Call:
% sippi_plot_traveltime_kernel(forward,prior);
% sippi_plot_traveltime_kernel(forward,prior,m);
function sippi_plot_traveltime_kernel(forward,prior,m,pl_kernel,i_use);
if nargin<2
... |
github | cultpenguin/sippi-master | kernel_fresnel_2d.m | .m | sippi-master/toolboxes/traveltime/kernel_fresnel_2d.m | 4,525 | utf_8 | 04ab97087724c87b7708d76d87bd55f3 | % kernel_fresnel_2d Sensitivity kernel for amplitude and first arrival
%
% Call:
% [kernel_t,kernel_a,P_omega,omega]=kernel_fresnel_2d(v,x,y,S,R,omega,P_omega);
%
%
% Based on Liu, Dong, Wang, Zhu and Ma, 2009, Sensitivity kernels for
% seismic Fresenl volume Tomography, Geophysics, 75(5), U35-U46
%
% See al... |
github | cultpenguin/sippi-master | eikonal_traveltime.m | .m | sippi-master/toolboxes/traveltime/eikonal_traveltime.m | 2,134 | utf_8 | 9893044b58a0e8d921e9bb4466ac63bf | % eikonal_traveltime Computes traveltime between sources and receivers by solving the eikonal equation
%
% t=eikonal_traveltime(x,y,z,V,Sources,Receivers,iuse,type);
%
% x,y,z : arrays defining the x, y, and z axis
% V: velocity field, with size (length(y),length(x),length(z));
% Sources [ndata,ndim] : Source ... |
github | cultpenguin/sippi-master | munk_fresnel_3d.m | .m | sippi-master/toolboxes/traveltime/munk_fresnel_3d.m | 809 | utf_8 | 0530806d86bb45db01bbce8c96633610 | % 3D frechet kernel, First Fresnel Zone
%
% See Jensen, Jacobsen, Christensen-Dalsgaard (2000) Solar Physics 192.
%
% Call :
% S=munk_fresnel_3d(T,dt,alpha,As,Ar,K);
% T : dominant period
% dt :
% alpha : degree of cancellation
% As : Amplitude fo the wavefield propagating from the source
% Ar : Amplitude fo the wa... |
github | cultpenguin/sippi-master | sippi_forward_traveltime.m | .m | sippi-master/toolboxes/traveltime/sippi_forward_traveltime.m | 11,965 | utf_8 | fb7f9ba288203b153ef3b54b2af0e213 | % sippi_forward_traveltime Traveltime computation in SIPPI
%
% Call :
% [d,forward,prior,data]=sippi_forward_traveltime(m,forward,prior,data)
%
% forward.type determines the method used to compute travel times
% forward.type='ray_2d'; % raytracing 2D linear forward
% forward.type='ray'; % ray (o... |
github | cultpenguin/sippi-master | eikonal.m | .m | sippi-master/toolboxes/traveltime/eikonal.m | 2,365 | utf_8 | db975fc2006349dc3da6b9380f660b3d | % eikonal Traveltime computation by solving the eikonal equation
%
% tmap=eikonal(x,y,z,V,Sources,type);
%
% x,y,z : arrays defining the x, y, and z axis
% V: velocity field, with size (length(y),length(x),length(z));
% Sources [ndata,ndim] : Source positions
% type (optional): type of eikonal solver: [1]:F... |
github | cultpenguin/sippi-master | kernel_multiple.m | .m | sippi-master/toolboxes/traveltime/kernel_multiple.m | 5,301 | utf_8 | f5b5b5efd4dfe5106f8c4ff01dad28ff | % kernel_multiple Computes the sensitivity kernel for a wave traveling
% from S to R.
%
% CALL :
% [K,RAY,Gk,Gray,timeS,timeR,raypath]=kernel_multiple(Vel,x,y,z,S,R,T,alpha,Knorm);
%
% IN :
% Vel [ny,nx] : Velocity field
% x [1:nx] :
% y [1:ny] :
% z [1:nz] :
% S [1,3] : Location of Source
% R [1... |
github | cultpenguin/sippi-master | kernel_fresnel_monochrome_2d.m | .m | sippi-master/toolboxes/traveltime/kernel_fresnel_monochrome_2d.m | 1,810 | utf_8 | 1da50210a40448c182fd5c519abc717a | % kernel_fresnel_monochrome_2d 2D monchrome kernel for amplitude and first arrival
%
% Call:
% [kernel_t,kernel_a]=kernel_fresnel_monochrome_2d(v,x,y,S,R,omega);
% or
% [kernel_t,kernel_a]=kernel_fresnel_monochrome_2d(v,x,y,S,R,omega,L,L1,L2);
%
% Based on Liu, Dong, Wang, Zhu and Ma, 2009, Sensitivity kerne... |
github | cultpenguin/sippi-master | sippi_forward_traveltime_unc.m | .m | sippi-master/toolboxes/traveltime/sippi_forward_traveltime_unc.m | 1,860 | utf_8 | 6e3f7a54bde5114cde900f9733f3a94b | % sippi_forward_traveltime_unc: as sippi_forward_traveltime while updateing uncertainty in data
%
% Performs exactly as '' expect that the uncorrelated uncertainty
% on data is allowed to changed
%
% To set the noise accroding to 1D prior distritbution, define a prior
% structrue with name 'd_std'.
% Then the s... |
github | cultpenguin/sippi-master | plot_traveltime_sr.m | .m | sippi-master/toolboxes/traveltime/plot_traveltime_sr.m | 925 | utf_8 | 88b3f71993d65a78ad124c54a60c23ab | % plot_traveltime_sr
%
% Call
% plot_traveltime(S,R)
% S: [n,2] : source locattion
% R: [n,2] : reveiver locattion
% or (3d)
% S: [n,3] : source locattion
% R: [n,3] : reveiver locattion
%
%
% EX:
% % 2D
% D=load('AM13_data.mat');
% plot_traveltime_sr(D.S,D.R);
% or
% ant_pos=[D.... |
github | cultpenguin/sippi-master | munk_fresnel_2d.m | .m | sippi-master/toolboxes/traveltime/munk_fresnel_2d.m | 808 | utf_8 | 74fc3aad05442da4f7eceb3caa80a610 | % 2D frechet kernel, First Fresnel Zone
%
% See Jensen, Jacobsen, Christensen-Dalsgaard (2000) Solar Physics 192.
%
% Call :
% S=munk_fresnel_2d(T,dt,alpha,As,Ar,K);
%
% T : dominant period
% dt :
% alpha : degree of cancellation
% As : Amplitude fo the wavefield propagating from the source
% Ar : Amplitude fo the w... |
github | cultpenguin/sippi-master | mspectrum.m | .m | sippi-master/toolboxes/traveltime/mspectrum.m | 763 | utf_8 | 7382fd4e82b46a8283189466ad965ae1 | % mspectrum : Amplitude and Power spectrum
% Call :
% function [A,P,smoothP,kx]=mspectrum(x,dx)
%
% 1D (A)mplitude and (P)owerspectrum of x-series with spacing dx
%
function [A,P,smoothP,kx]=mspectrum(x,dx)
min_size=min(size(x));
if min_size>1
% TREAT EACH COLUMN AS A DATA SERIES
%if size(x,... |
github | cultpenguin/sippi-master | kernel_finite_2d.m | .m | sippi-master/toolboxes/traveltime/kernel_finite_2d.m | 10,309 | utf_8 | 9c4599f3cb668e3c78359445cf57ffbe | % kernel_finite_2d 2D sensitivity kernels
%
% Call:
% [Knorm,K,dt,options]=kernel_finite_2d(v_ref,x,y,S,R,freq,options);
function [Knorm,K,dt,options,tS,tR]=kernel_finite_2d(v_ref,x,y,S,R,freq,options);
if nargin<4, S=[x(4) y(4)];end
if nargin<5, R=[x(length(x)-4) y(4)];end
if nargin<6, freq=5;end
if na... |
github | cultpenguin/sippi-master | kernel_buursink_2d.m | .m | sippi-master/toolboxes/traveltime/kernel_buursink_2d.m | 5,617 | utf_8 | 36223cd164dc483dfe3051eb014089a2 | % kernel_buursink_2k Computes 2D Sensitivity kernel based on 1st order EM scattering theory
%
% See
% Buursink et al. 2008. Crosshole radar velocity tomography
% with finite-frequency Fresnel. Geophys J. Int.
% (172) 117;
%
% CALL :
% % specify a source... |
github | cultpenguin/sippi-master | kernel_slowness_to_velocity.m | .m | sippi-master/toolboxes/traveltime/kernel_slowness_to_velocity.m | 1,057 | utf_8 | 0627c5fdf8c399971813017352317077 | % kernel_slowness_to_velocity Converts from slowness to velocity parameterizations
%
% G : kernel [1,nkernels]
% V : Velocity field (
%
%
% CALL:
% G_vel=kernel_slowness_to_velocity(G,V);
% or
% [G_vel,v_obs]=kernel_slowness_to_velocity(G,V,t);
% or
% [G_vel,v_obs,Cd_v]=kernel_slowness_to_velocity(G,V... |
github | cultpenguin/sippi-master | tomography_kernel.m | .m | sippi-master/toolboxes/traveltime/tomography_kernel.m | 7,179 | utf_8 | 6ddfc9d81bd0c4d6461cca80c816b839 | % tomography_kernel Computes the sensitivity kernel for a wave traveling from S to R.
%
% CALL :
% [K,RAY,Gk,Gray,timeS,timeR,raypath]=tomography_kernel(Vel,x,y,z,S,R,T,alpha,Knorm);
%
% IN :
% Vel [ny,nx] : Velocity field
% x [1:nx] :
% y [1:ny] :
% z [1:nz] :
% S [1,3] : Location of Source
% R [1... |
github | cultpenguin/sippi-master | pick_first_arrival.m | .m | sippi-master/toolboxes/traveltime/pick_first_arrival.m | 3,424 | utf_8 | dc2ce6effdb1e6e193d07dfa70dd9f43 | % pick_first_arrival : pick first arrival travel time data using simple
% correlation
%
% Call
% [tt_pick]=pick_first_arrival(wf_data,ref_trace,ref_t0,doPlot,wf_time);
%
function [tt_pick,time_pick,c]=pick_first_arrival(wf_data,ref_trace,ref_t0,doPlot,wf_time,use_method);
if nargin<6, ... |
github | cultpenguin/sippi-master | skeleton.m | .m | sippi-master/toolboxes/fast_marching_kroon/skeleton.m | 6,068 | utf_8 | bc89aea0d0615547c269a6f02eb57787 | function S=skeleton(I,verbose)
% This function Skeleton will calculate an accurate skeleton (centerlines)
% of an object represented by an binary image / volume using the fastmarching
% distance transform.
%
% S=skeleton(I,verbose)
%
% inputs,
% I : A 2D or 3D binary image
% verbose : Boolean, set to true (d... |
github | cultpenguin/sippi-master | msfm.m | .m | sippi-master/toolboxes/fast_marching_kroon/msfm.m | 5,119 | utf_8 | 1aaecd3447dad2de3a1df1568df502aa | function [T,Y]=msfm(F, SourcePoints, UseSecond, UseCross)
% This function MSFM calculates the shortest distance from a list of
% points to all other pixels in an image volume, using the
% Multistencil Fast Marching Method (MSFM). This method gives more accurate
% distances by using second order derivatives and c... |
github | cultpenguin/sippi-master | msfm2d.m | .m | sippi-master/toolboxes/fast_marching_kroon/functions/msfm2d.m | 11,106 | utf_8 | ff0233a53fd264eaec9d117d4ddd342e | function [T,Y]=msfm2d(F, SourcePoints, usesecond, usecross)
% This function MSFM2D calculates the shortest distance from a list of
% points to all other pixels in an image, using the
% Multistencil Fast Marching Method (MSFM). This method gives more accurate
% distances by using second order derivatives and cros... |
github | cultpenguin/sippi-master | msfm2d_org.m | .m | sippi-master/toolboxes/fast_marching_kroon/functions/msfm2d_org.m | 11,010 | utf_8 | f96cf4a042008f8a5e6c2c2f847e3a67 | function [T,Y]=msfm2d(F, SourcePoints, usesecond, usecross)
% This function MSFM2D calculates the shortest distance from a list of
% points to all other pixels in an image, using the
% Multistencil Fast Marching Method (MSFM). This method gives more accurate
% distances by using second order derivatives and cros... |
github | cultpenguin/sippi-master | msfm2d_new.m | .m | sippi-master/toolboxes/fast_marching_kroon/functions/msfm2d_new.m | 13,262 | utf_8 | b45db239557671661f62639279e7553b | function [T,Y]=msfm2d(F, SourcePoints, usesecond, usecross)
% This function MSFM2D calculates the shortest distance from a list of
% points to all other pixels in an image, using the
% Multistencil Fast Marching Method (MSFM). This method gives more accurate
% distances by using second order derivatives and cros... |
github | cultpenguin/sippi-master | msfm2d.m | .m | sippi-master/toolboxes/fast_marching_kroon/functions/org/msfm2d.m | 11,010 | utf_8 | f96cf4a042008f8a5e6c2c2f847e3a67 | function [T,Y]=msfm2d(F, SourcePoints, usesecond, usecross)
% This function MSFM2D calculates the shortest distance from a list of
% points to all other pixels in an image, using the
% Multistencil Fast Marching Method (MSFM). This method gives more accurate
% distances by using second order derivatives and cros... |
github | cultpenguin/sippi-master | multinomial.m | .m | sippi-master/toolboxes/frequency_matching/multinomial.m | 1,982 | utf_8 | cd609c6339bc6b386dbdeebde7bfa7d6 | % multinomial: Compare two distributions using the multinomial function
%
% Call:
% [loglik,lik] = multinomial(H,Hti,Hprior,type)
% H: [nH,1]
% Hti: [nH,1]
% Hprior: [nH,1]
%
% prior: [1]: Fast log-probability (default)
% [2]: slower log-probability
% [3]: slow probability
%
%
%... |
github | cultpenguin/sippi-master | sippi_forward_fmm.m | .m | sippi-master/toolboxes/frequency_matching/sippi_forward_fmm.m | 1,235 | utf_8 | 61de2a0731f3f8d59f25ac32f8ad3c16 | % sippi_forward_fmm: return frequency distribution from a 1D/2D model
%
% Call :
% [d,forward,prior,data]=sippi_forward_fmm(m,forward,prior,data,id,im)
%
% See also frequency_matching
%
% ip=1;
% prior{ip}.type='mps';
% prior{ip}.method='mps_snesim';
% prior{ip}.x=1:1:80;
% prior{ip}.y=1:1:80;
% p... |
github | cultpenguin/sippi-master | sippi_likelihood_fmm.m | .m | sippi-master/toolboxes/frequency_matching/sippi_likelihood_fmm.m | 1,531 | utf_8 | 10438291c01e6ee1898a2f7b7c782b5c | % sippi_likelihood_multinomial: Compute likelihood using the multinomial function
%
% Call:
% [logL,L,data]=sippi_likelihood_fmm(d,data);
%
% Input parameter:
% d{id}; Frequency distribution to be evaluated.
% data{id}.d_obs; Observed frequency distribution.
% data{id}.nprior; Prior frequency distri... |
github | nimral/spver-master | sound2windows.m | .m | spver-master/sound2windows.m | 633 | utf_8 | 9064a4e257919731076e5451bb81ecde | % converts sound vector to vector of overlaping time windows
% x -- sound vector
% wintime -- duration of the window in ms
% steptime -- time difference between consecutive windows starts, in ms
% samplerate -- samplerate of the sound
function y = sound2windows(x, wintime, steptime, samplerate)
winsize = (wintime ... |
github | nimral/spver-master | mel2hz.m | .m | spver-master/mel2hz.m | 135 | utf_8 | 54f772dcca45858a845e39b1d195439b | % converts pitch in mels to frequency in hertzs
function y = mel2hz(x)
c = log(1 + 10/7) / 1000;
y = 700 * (e**(x*c) - 1);
end
|
github | nimral/spver-master | hz2mel.m | .m | spver-master/hz2mel.m | 213 | utf_8 | aecad6077a7cc839213ad7064b269a41 | % converts frequency in hertzs to pitch in mels (which has some
% relation to human perception of sound)
function y = hz2mel(x)
%y = 1000/log10(2)*log10(1+x/1000);
y = (1000/log(1+10/7))*log(1+x/700);
end
|
github | nimral/spver-master | min_inner_distances.m | .m | spver-master/min_inner_distances.m | 319 | utf_8 | 98ae37d24c619997474f87f19c34e628 | % returns a vector of minimal DTW distances between elements of cell array a
function ds = min_inner_distances(a)
ds = zeros(length(a), 1) + Inf;
for i = 1:length(a)
for j = 1:length(a)
if i ~= j
ds(i) = min(dtw(a{i}, a{j}), ds(i));
end
end
end
end
|
github | nimral/spver-master | distance.m | .m | spver-master/distance.m | 107 | utf_8 | 5d49db2c60c38c803a56344a2482b7df | % Euclidean distance of two vectors a, b
function y = distance(a, b)
y = sum((a-b) .^ 2) ^ (1/2);
end
|
github | nimral/spver-master | verify_person.m | .m | spver-master/verify_person.m | 3,066 | utf_8 | 888eb39bfdc7c95824284853386e5610 | % Scenario: We have already collected recordings of a group
% of people who form our group of interest and we want to
% allow these people access to the system. The collected data
% are stored in database.m.
% Each person in the group is uniquely identified by an id.
% Function takes two optional arguments for automa... |
github | nimral/spver-master | threshold.m | .m | spver-master/threshold.m | 1,429 | utf_8 | 1c23b8abb11210dbe9a0625d93a2b905 | % function for computing threshold for speaker+digit verification
%
% users -- matrix of distances between user's uterances of the same digit
%
% intruders -- matrix of distances between user recordings and intruder
% recordings
%
% fpr -- maximal allowed false positives rate
%
% returns threshold and false negatives r... |
github | nimral/spver-master | create_database.m | .m | spver-master/create_database.m | 2,248 | utf_8 | d59bca3188949c7ed3c1a3817557e501 | % computes MFCC for recordings in the database and saves it to database.mat
function database = create_database()
names = {'adam', 'jonatan', 'matej'};
database = {};
for n = 1:length(names)
for dig = 0:9
digit = dig;
if dig == 0
digit = 10;
end
... |
github | nimral/spver-master | RecordVoice.m | .m | spver-master/RecordVoice.m | 1,304 | utf_8 | 83fdcd8a1febfbe4c084de76aa1c259b |
% This function records 3 seconds of a person speaking.
% input is person who speaks and what digit he/she says
% returns vector of samples
function f = RecordVoice(person, digit,number, notsave)
delay_constant=.4;
% USING MARIO SOUNDS FOR BEGIN/END RECORD (need 2 mario files)
% start_signal=audioread('mari... |
github | nimral/spver-master | mfcc.m | .m | spver-master/mfcc.m | 3,322 | utf_8 | 0f8fed6691792060b5dfff73eb210f43 | % compute log mel-frequncy bands for whole wav file
function y = mfcc(filename, sound_signal)
%filename = '3_cuave09_019.wav';
if nargin == 1
snd = audioread(filename);
else
snd = sound_signal;
end
% remove starting and trailing silence
snd = chop_voice(snd);
% Pre-emphasis is done i... |
github | nimral/spver-master | dtw_in.m | .m | spver-master/dtw_in.m | 295 | utf_8 | 906522095d45f2cd743c0dc79663396e | % auxiliary function for DTW
% test whether position (a, b) is in the adjustment window
% lA, lB are lenghts of the sequences A, B
function y = dtw_in(a, b, lA, lB)
%tolerance
tol = 0.2;
y = (a > 0) && (b > 0) && (b < (a * (lB / lA) + lB*tol)) && (b > (a * (lB / lA) - lB*tol));
end
|
github | nimral/spver-master | min_distance.m | .m | spver-master/min_distance.m | 196 | utf_8 | 41992091dd99c11382ff271266e912fa | % The shortest distance from a to some digit in digits
function y = min_distance(a, digits)
m = Inf;
for i = 1:length(digits)
m = min(m, dtw(a, digits{i}));
end
y = m;
end
|
github | nimral/spver-master | min_distances.m | .m | spver-master/min_distances.m | 238 | utf_8 | b0abdab193a7287d23ef424d7381274d | % returns a vector of minimum distances from samples in cell array a to samples
% in cell array b
function ds = min_distances(a, b)
ds = zeros(length(a), 1);
for i = 1:length(a)
ds(i) = min_distance(a{i}, b);
end
end
|
github | nimral/spver-master | inner_distances.m | .m | spver-master/inner_distances.m | 237 | utf_8 | f349eacd74b1e31353a3e3627fbd9f36 | % returns a vector of DTW distances between elements of cell array a
function ds = inner_distances(a)
ds = [];
for i = 1:length(a)
for j = (i+1):length(a)
ds(end+1) = dtw(a{i}, a{j});
end
end
end
|
github | nimral/spver-master | filterweight.m | .m | spver-master/filterweight.m | 685 | utf_8 | f4cab79c61ddf995e84537c363777744 | % returns the weight of triangular filter with width 2*d at position x
% centre -- of the filter
% d -- half the width of the triangle
% x -- position
function weight = filterweight(centre, d, x)
% filter weight is 1 at centre, 0 at centre +- d, triangular
% shape
% what is the weight of the filter at posit... |
github | nimral/spver-master | dtw.m | .m | spver-master/dtw.m | 1,953 | utf_8 | 1c2a96df2ae617467be5d438d29438de | % function computing Dynamic time warping distance between two matrices A, B
% representing sequences of rows, distance of rows is computed by Euclidean
% metric
function [y, path] = dtw(A, B)
lA = size(A, 1);
lB = size(B, 1);
% table for dynamic programming
tab = zeros(lA, lB) + Inf;
tab(1,1) = ... |
github | nimral/spver-master | preemphasis.m | .m | spver-master/preemphasis.m | 250 | utf_8 | 7f3924ff55bd21b02a748aba4ac6f451 | % Pre-emphasize the sound signal:
% sound_new(n) = sound_old(n) - c*sound_old(n-1),
% where c is some constant which can be tuned
% and sound_old(0) = 0.
function y = preemphasis(x)
c = 0.4;
b = [1, -c];
a = 1;
y = filter(b,a,x);
end
|
github | nimral/spver-master | distances.m | .m | spver-master/distances.m | 258 | utf_8 | 8a4f47a8e7d36b02a614825551c9e7e2 | % returns a matrix of DTW distances between elements of cell arrays a, b
function ds = distances(a, b)
ds = zeros(length(a), length(b));
for i = 1:length(a)
for j = 1:length(b)
ds(i, j) = dtw(a{i}, b{j});
end
end
end
|
github | nimral/spver-master | modify_database.m | .m | spver-master/modify_database.m | 717 | utf_8 | ce961736ea76a1f1f7c0f0d1e05598ca | % Takes a database with three speakers and returns a new one split into halves
function y = modify_database(database)
names = {'adam', 'jonatan', 'matej'};
new = {};
for n = 1:length(names)
for dig = 0:9
digit = dig;
if dig == 0
digit = 10;
end
test_index = 1;
... |
github | adamlukomski/iva-master | dyn_show.m | .m | iva-master/dyn_show.m | 800 | utf_8 | ea0f2207eee9a1151733b2820770a7f3 | %
%
%% don't use for analysis - not really working, matlab supplies more time points in here
%% yeah, sometime t = [0.05 0.06 0.07] and so on
%
% only print preview
%
%
function status = dyn_show( t,x,flag )
t
global passthrough
global plotter1
global eva
switch flag
case 'init'
case 'done'
;
case []
... |
github | adamlukomski/iva-master | write_full.m | .m | iva-master/+tools/write_full.m | 3,233 | utf_8 | 87a8f82789564278f904b40e4766e3ea | % dump a symbolic math variable containing an equation to a file
% a little bit faster than matlabFunction, but brute-force
%
% original write_fcn by B. Morris and E. Westervelt, 2007
% slightly modified by A. Lukomski 2012
function write_full( fcn_name, arguments, replace_list, list)
% Write a cell array o... |
github | ChunyuanLI/spectral_descriptors-master | demo_spectral_descriptor.m | .m | spectral_descriptors-master/demo_spectral_descriptor.m | 800 | utf_8 | 769d5f808ba11a8357a0b4dc32c12135 | function demo_spectral_descriptor
%
% Chunyuan Li
% May 13, 2014
% settings
DescriptorType = 'SGWS'; % GPS HKS WKS SIHKS HMS SGWS
DATASET = 'PARAMETERS_test'; % dataset to process. 'PARAMETERS_test.m' 'SHREC2011_Nonrigid'
% set path for auxilary code
addpath(genpath(fullfile('sgwt_toolbox'))); % ... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_cheby_square.m | .m | spectral_descriptors-master/sgwt_toolbox/sgwt_cheby_square.m | 1,940 | utf_8 | 5dd1536abce104317a8094bb4c7fcc51 | % sgwt_cheby_square : Chebyshev coefficients for square of polynomial
%
% function d=sgwt_cheby_square(c)
%
% Inputs :
% c - Chebyshev coefficients for p(x) = sum c(1+k) T_k(x) ; 0<=K<=M
%
% Outputs :
% d - Chebyshev coefficients for p(x)^2 = sum d(1+k) T_k(x) ;
% 0<=k<=2*M
% This file is part of the SGWT toolbox ... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_kernel_abspline3.m | .m | spectral_descriptors-master/sgwt_toolbox/sgwt_kernel_abspline3.m | 1,879 | utf_8 | 2cb063d47b5ee454c07302c6428e7dc5 | % sgwt_kernel_abspline3 : Monic polynomial / cubic spline / power law decay kernel
%
% function r = sgwt_kernel_abspline3(x,alpha,beta,t1,t2)
%
% defines function g(x) with g(x) = c1*x^alpha for 0<x<x1
% g(x) = c3/x^beta for x>t2
% cubic spline for t1<x<t2,
% Satisfying g(t1)=g(t2)=1
%
% Inputs :
% x : array of indepen... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_kernel_abspline5.m | .m | spectral_descriptors-master/sgwt_toolbox/sgwt_kernel_abspline5.m | 2,174 | utf_8 | f6125a68524de3c1b9d68a60c20b04b9 | % sgwt_kernel_abspline5 : Monic polynomial / quintic spline / power law decay kernel
%
% function r = sgwt_kernel_abspline5(x,alpha,beta,t1,t2)
%
% Defines function g(x) with g(x) = c1*x^alpha for 0<x<x1
% g(x) = c3/x^beta for x>t2
% quintic spline for t1<x<t2,
% Satisfying g(t1)=g(t2)=1
% g'(t1)=g'(t2)
% g''(t1)=g''(t... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_adjoint.m | .m | spectral_descriptors-master/sgwt_toolbox/sgwt_adjoint.m | 1,328 | utf_8 | a1b915af5342360927ac1e544a9e812c | % sgwt_adjoint : Compute adjoint of sgw transform
%
% function adj=sgwt_inverse(y,L,c,arange)
%
% Inputs:
% y - sgwt coefficients
% L - laplacian
% c - cell array of Chebyshev coefficients defining transform
% arange - spectral approximation range
%
% Outputs:
% adj - computed sgwt adjoint applied to y
% This file is ... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_cheby_coeff.m | .m | spectral_descriptors-master/sgwt_toolbox/sgwt_cheby_coeff.m | 1,549 | utf_8 | ad191dcf67c999f64347ed8affa40062 | % sgwt_cheby_coeff : Compute Chebyshev coefficients of given function
%
% function c=sgwt_cheby_coeff(g,m,N,arange)
%
% Inputs:
% g - function handle, should define function on arange
% m - maximum order Chebyshev coefficient to compute
% N - grid order used to compute quadrature (default is m+1)
% arange - interval of... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_meshmat.m | .m | spectral_descriptors-master/sgwt_toolbox/sgwt_meshmat.m | 2,230 | utf_8 | 8be6b355e7542c5588dd4ccf2006a51c | % sgwt_meshmat : Adjacency matrix for regular 2d mesh
%
% function A=meshmat_p(dim,varargin)
%
% Inputs:
% dim - size of 2d mesh
% Selectable control parameters:
% boundary - 'rectangle' or 'torus'
%
% Outputs:
% A - adjacency matrix
% This file is part of the SGWT toolbox (Spectral Graph Wavelet Transform toolbox)
... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_irregular_meshmat.m | .m | spectral_descriptors-master/sgwt_toolbox/sgwt_irregular_meshmat.m | 2,155 | utf_8 | d04f2a817116506446dea051cf5100f7 | % sgwt_irregular_meshmat : Adjacency matrix from irregular domain mask
%
% function A = sgwt_irregular_meshmat(mask)
%
% Computes the adjaceny matrix of graph for given 2-d irregular
% domain. Vertices of graph correspond to nonzero elements of
% mask. Edges in graph connect to (up to) 4 nearest neighbors.
%
% Inputs... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_view_design.m | .m | spectral_descriptors-master/sgwt_toolbox/sgwt_view_design.m | 2,044 | utf_8 | 247bd54a5a76a94390e1b9c63c10f32b | % sgwt_view_design : display filter design in spectral domain
%
% function sgwt_view_design(g,t,arange)
%
% This function graphs the input scaling function and wavelet
% kernels, indicates the wavelet scales by legend, and also shows
% the sum of squares G and corresponding frame bounds for the transform.
%
% Inputs :
... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_randmat.m | .m | spectral_descriptors-master/sgwt_toolbox/sgwt_randmat.m | 1,167 | utf_8 | 11ba319fb1710fe43c0b282b8f4fbd31 | % sgwt_randmat : Compute random (Erdos-Renyi model) graph
%
% function A=sgwt_randmat(N,thresh)
%
% Inputs :
% N - number of vertices
% thresh - probability of connection of each edge
%
% Outputs :
% A - adjacency matrix
% This file is part of the SGWT toolbox (Spectral Graph Wavelet Transform toolbox)
% Copyright (... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_rough_lmax.m | .m | spectral_descriptors-master/sgwt_toolbox/sgwt_rough_lmax.m | 1,675 | utf_8 | e86284557ee6b70d9b5bc8538c8677d6 | % sgwt_rough_lmax : Rough upper bound on maximum eigenvalue of L
%
% function lmax=sgwt_rough_lmax(L)
%
% Runs Arnoldi algorithm with a large tolerance, then increases
% calculated maximum eigenvalue by 1 percent. For much of the SGWT
% machinery, we need to approximate the wavelet kernels on an
% interval that conta... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_kernel_meyer.m | .m | spectral_descriptors-master/sgwt_toolbox/sgwt_kernel_meyer.m | 1,224 | utf_8 | 5537c2610259b92be34a5fea5be86ac8 | % sgwt_kernel_meyer : evaluates meyer wavelet kernel and scaling function
% function r=sgwt_kernel_meyer(x,kerneltype)
%
% Inputs
% x : array of independent variable values
% kerneltype : string, either 'sf' or 'wavelet'
%
% Ouputs
% r : array of function values, same size as x.
%
% meyer wavelet kernel : supported on... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_cheby_eval.m | .m | spectral_descriptors-master/sgwt_toolbox/sgwt_cheby_eval.m | 1,740 | utf_8 | 351350401b5c3068e214d45848ee0f76 | % sgwt_cheby_eval : Evaluate shifted Chebyshev polynomial on given domain
%
% function r=sgwt_cheby_eval(x,c,arange)
%
% Compute Chebyshev polynomial of laplacian applied to input.
% This is primarily for visualization
%
% Inputs:
% x - input values to evaluate polynomial on
% c - Chebyshev coefficients (c(1+j) is jth ... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_cheby_op.m | .m | spectral_descriptors-master/sgwt_toolbox/sgwt_cheby_op.m | 2,505 | utf_8 | 5183cc2390cb62eeed472b015abc0fd2 | % sgwt_cheby_op : Chebyshev polynomial of Laplacian applied to vector
%
% function r=sgwt_cheby_op(f,L,c,arange)
%
% Compute (possibly multiple) polynomials of laplacian (in Chebyshev
% basis) applied to input.
%
% Coefficients for multiple polynomials may be passed as a cell array. This is
% equivalent to setting
% r{... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_inverse.m | .m | spectral_descriptors-master/sgwt_toolbox/sgwt_inverse.m | 1,944 | utf_8 | f162cbfdf8957b52d971032bbf6d8e5c | % sgwt_inverse : Compute inverse sgw transform, via conjugate gradients
%
% function r=sgwt_inverse(y,L,c,arange)
%
% Inputs:
% y - sgwt coefficients
% L - laplacian
% c - cell array of Chebyshev coefficients defining transform
% arange - spectral approximation range
%
% Selectable Control Parameters
% tol - tolerance ... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_kernel_simple_tf.m | .m | spectral_descriptors-master/sgwt_toolbox/sgwt_kernel_simple_tf.m | 941 | utf_8 | b1e5ddf012d9da6e0f1dc36cb52e473c | % sgwt_kernel_simple_tf : evaluates "simple" tight-frame kernel
%
% this is similar to meyer kernel, but simpler
%
% function is essentially sin^2(x) in ascending part,
% essentially cos^2 in descending part.
%
% function r= sgwt_kernel_simple_tf(x,kerneltype)
%
% Inputs
% x : array of independent variable values
% ker... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_check_connected.m | .m | spectral_descriptors-master/sgwt_toolbox/sgwt_check_connected.m | 1,099 | utf_8 | f1f8b67da83442e06b1d3e495595fb2c | % sgwt_check_connected : Check connectedness of graph
%
% function r=sgwt_check_connected(A)
%
% returns 1 if graph is connected, 0 otherwise
% Uses boost graph library breadth first search
%
% Inputs :
% A - adjacency matrix
%
% Outputs :
% r - result
%
% This file is part of the SGWT toolbox (Spectral Graph Wavele... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_framebounds.m | .m | spectral_descriptors-master/sgwt_toolbox/sgwt_framebounds.m | 1,434 | utf_8 | 9d7475831d87b18cd390d84dd8e5317e | % sgwt_framebounds : Compute approximate frame bounds for given sgw transform
%
% function [A,B,sg2,x]=sgwt_framebounds(g,lmin,lmax)
%
% Inputs :
% g - function handles computing sgwt scaling function and wavelet
% kernels
% lmin,lmax - minimum nonzero, maximum eigenvalue
%
% Outputs :
% A , B - frame bounds
% sg2 - a... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_delta.m | .m | spectral_descriptors-master/sgwt_toolbox/sgwt_delta.m | 1,086 | utf_8 | 35b91034385c7a5ad54d4c636df108d8 | % sgwt_delta : Return vector with one nonzero entry equal to 1.
%
% function r=sgwt_delta(N,j)
%
% Returns length N vector with r(j)=1, all others zero
%
% Inputs :
% N - length of vector
% j - position of "delta" impulse
%
% Outputs:
% r - returned vector
% This file is part of the SGWT toolbox (Spectral Graph Wavele... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_laplacian.m | .m | spectral_descriptors-master/sgwt_toolbox/sgwt_laplacian.m | 2,419 | utf_8 | c69f646e26bdc6127f0acea3a9ea5778 | % sgwt_laplacian : Compute graph laplacian from connectivity matrix
%
% function L = sgwt_laplacian(A,varargin)
%
% Connectivity matrix A must be symmetric. A may have arbitrary
% non-negative values, in which case the graph is a weighted
% graph. The weighted graph laplacian follows the definition in
% "Spectral Gra... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_filter_design.m | .m | spectral_descriptors-master/sgwt_toolbox/sgwt_filter_design.m | 3,973 | utf_8 | c6a928975c95e98bd6a0c8e0fa66bcc0 | % sgwt_filter_design : Return list of scaled wavelet kernels and derivatives
%
% g{1} is scaling function kernel,
% g{2} ... g{Nscales+1} are wavelet kernels
%
% function [g,t]=sgwt_filter_design(lmax,Nscales,varargin)
%
% Inputs :
% lmax - upper bound on spectrum
% Nscales - number of wavelet scales
%
% selectable par... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_setscales.m | .m | spectral_descriptors-master/sgwt_toolbox/sgwt_setscales.m | 1,879 | utf_8 | f3a9d5e3ffe5388b2b3f13f7e9ed799f | % sgwt_setscales : Compute a set of wavelet scales adapted to spectrum bounds
%
% function s=sgwt_setscales(lmin,lmax,Nscales)
%
% returns a (possibly good) set of wavelet scales given minimum nonzero and
% maximum eigenvalues of laplacian
%
% returns scales logarithmicaly spaced between minimum and maximum
% "effec... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_ftsd.m | .m | spectral_descriptors-master/sgwt_toolbox/sgwt_ftsd.m | 1,488 | utf_8 | c93b3db59098b389b8e86258845f0900 | % sgwt_ftsd : Compute forward transform in spectral domain
%
% function r=sgwt_ftsd(f,g,t,L)
%
% Compute forward transform by explicitly computing eigenvectors and
% eigenvalues of graph laplacian
%
% Uses persistent variables to store eigenvectors, so decomposition
% will be computed only on first call
%
% Inputs:
%... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_demo3.m | .m | spectral_descriptors-master/sgwt_toolbox/demo/sgwt_demo3.m | 4,023 | utf_8 | 3f899558598af974c2f1e267d9347db2 | % sgwt_demo3 : Image decomposition with SGWT wavelets based on local adjacency.
%
% This demo builds the SGWT transform on a graph representing
% adjacency on a pixel mesh with 4-nearest neighbor connectivity.
% This demonstrates inverse on problem with large dimension.
%
% The demo loads an image file and decomposes ... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_demo2.m | .m | spectral_descriptors-master/sgwt_toolbox/demo/sgwt_demo2.m | 6,384 | utf_8 | 7bab07e6514e903305e5afaf1ba24716 | % sgwt_demo2 : Allows exploring wavelet scale and approximation accuracy
%
% This demo builds the SGWT for the minnesota traffic graph, a graph
% representing the connectivity of the minnesota highway system. One center
% vertex is chosen, and then the exact (naive forward transform) and the
% approximate (via chebyshe... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_demo1.m | .m | spectral_descriptors-master/sgwt_toolbox/demo/sgwt_demo1.m | 4,519 | utf_8 | 85e067385030d0f0a768f8ac4d3ad8d6 | % sgwt_demo1 : SGWT for swiss roll data set
%
% This demo builds the SGWT for the swiss roll synthetic data set. It
% computes a set of scales adapted to the computed upper bound on the
% spectrum of the graph Laplacian, and displays the scaling function and
% the scaled wavlet kernels, as well as the corresponding fra... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_soft_threshold.m | .m | spectral_descriptors-master/sgwt_toolbox/utils/sgwt_soft_threshold.m | 1,117 | utf_8 | 2c60d2416dbd759097345f610f622d03 | % sgwt_soft_threshold : Soft thresholding operator
%
% x_t = bpdq_soft_threshold(x,tgamma)
%
% Applies soft thresholding to each component of x
%
% Inputs:
% x - input signal
% tgamma - threshold
%
% Outputs:
% x_t - soft thresholded result
% This file is part of the SGWT toolbox (Spectral Graph Wavelet Transform too... |
github | ChunyuanLI/spectral_descriptors-master | argselectCheck.m | .m | spectral_descriptors-master/sgwt_toolbox/utils/argselectCheck.m | 2,050 | utf_8 | 13096e9ec4f9fc475fb154c322cc7352 | % argselectCheck : Check if control parameters are valid
%
% function argselectCheck(control_params,varargin_in)
%
% Inputs:
% control_params and varargin_in are both cell arrays
% that are lists of pairs 'name1',value1,'name2',value2,...
%
% This function checks that every name in varargin_in is one of the name... |
github | ChunyuanLI/spectral_descriptors-master | argselectAssign.m | .m | spectral_descriptors-master/sgwt_toolbox/utils/argselectAssign.m | 1,706 | utf_8 | a225f6b476ca9762053f486bc6a2f8b9 | % argselectAssign : Assign variables in calling workspace
%
% function argselectAssign(variable_value_pairs)
%
% Inputs :
% variable_value_pairs is a cell list of form
% 'variable1',value1,'variable2',value2,...
% This function assigns variable1=value1 ... etc in the *callers* workspace
%
% This is used at beg... |
github | ChunyuanLI/spectral_descriptors-master | vec.m | .m | spectral_descriptors-master/sgwt_toolbox/utils/vec.m | 857 | utf_8 | b795ffb5f2186f33aaa81ef7daa3cac5 | % vec : vectorize input
%
% r=vec(x)
%
% returns r=x(:);
% This file is part of the SGWT toolbox (Spectral Graph Wavelet Transform toolbox)
% Copyright (C) 2010, David K. Hammond.
%
% The SGWT toolbox is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as pub... |
github | ChunyuanLI/spectral_descriptors-master | sgwt_show_im.m | .m | spectral_descriptors-master/sgwt_toolbox/utils/sgwt_show_im.m | 1,806 | utf_8 | f0aa589e604cc94d1e07c64a3eb27723 | % sgwt_show_im : Display image, with correct pixel zoom
%
% sgwt_show_im(im,range,zoom)
%
% Inputs :
% im - 2-d image
% range - 2 element vector giving display color map range,
% range(1) maps to black, range(2) maps to white
% If range not given, or empty matrix given for range, then
% the default is to set it to th... |
github | zhaENS/Project-master | refinepositions.m | .m | Project-master/Code/3rdParty/chromSDE/program/refinepositions.m | 5,307 | utf_8 | 308beac219de4a6ee0eb5b40502607de | %%******************************************************
%% refinedistances
%%
%% L, U must be upper-triangular distance matrices.
%%
%% Aest = refinedistances()
%%******************************************************
function [Aest,info] = refinepositions_new(Aorg,D,beta_param,maxIter,tolerance)
if ~exist('maxIter'... |
github | zhaENS/Project-master | RKESDPdata.m | .m | Project-master/Code/3rdParty/chromSDE/program/RKESDPdata.m | 2,354 | utf_8 | adce001ea51a7a28451a45802fbd4d89 | %%*************************************************************************
%% generate SDP data corresponding to
%%
%% min_{X psd} sum_{ij} w(i,j)(<Aij,X> - dij)^2 + lam*Tr(X)
%%
%% input: DD = (npts)x(npts) dis-similar matrix
%%*************************************************************************
function [bl... |
github | zhaENS/Project-master | randdata.m | .m | Project-master/Code/3rdParty/chromSDE/program/randdata.m | 676 | utf_8 | 76b0d6b46e34cbcf000ba69aa55b1825 | function [binAnno FreqMat XX]=randdata(n,noiserate)
rand('twister',1234);
XX=rand(3,n);
addpath('./helperfunctions');
plot3(XX(1,:),XX(2,:),XX(3,:));
hold on
plot3(XX(1,:),XX(2,:),XX(3,:),'r.');
hold off
drawnow
FreqMat=points2FreqMat(XX,noiserate);
binAnno=[ones(size(FreqMat,1),1),(1:size(FreqMat,1))'];
end
function... |
github | zhaENS/Project-master | randwalkdata.m | .m | Project-master/Code/3rdParty/chromSDE/program/randwalkdata.m | 779 | utf_8 | 5411036c65069390ac76bcf4174767a8 |
function [binAnno FreqMat XX]=randwalkdata(n,noiserate)
rand('twister',1234);
addpath('./helperfunctions');
XX=randwalk(n);
plot3(XX(1,:),XX(2,:),XX(3,:));
hold on
plot3(XX(1,:),XX(2,:),XX(3,:),'r.');
hold off
drawnow
FreqMat=points2FreqMat(XX,noiserate);
binAnno=[ones(size(FreqMat,1),1),(1:size(FreqMat,1))'];
end
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.