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 | ArashAkbarinia/ColourCategorisation-master | find_max_rad_allowed.m | .m | ColourCategorisation-master/matlab/src/experiments/colourfrontiers/find_max_rad_allowed.m | 820 | utf_8 | c20296e386595094a2c769b3ac787c41 | function radius = find_max_rad_allowed(crs, startangle, endangle, labplane)
White_CIE1931 = crsSpaceToSpace(crs.CS_RGB, [1, 1, 1], crs.CS_CIE1931, 0);
%ref = the brightest D65 that the monitor can achieve
ref = whitepoint('d65') ./ max(whitepoint('d65')) .* White_CIE1931(3);
radius1 = FindMaximumRadiusForAngl... |
github | ArashAkbarinia/ColourCategorisation-master | ColourFrontiersExperimentLum.m | .m | ColourCategorisation-master/matlab/src/experiments/colourfrontiers/ColourFrontiersExperimentLum.m | 7,637 | utf_8 | e47a55cb425975bbbcb74c678a17bd72 | function [] = ColourFrontiersExperimentLum()
%ColourFrontiersExperimentLum Summary of this function goes here
% Detailed explanation goes here
%% initialisation
% cleaning the workspace
clearvars;
close all;
clc;
% creating the luminance frontiers
FrontierTable = LuminanceFrontiers();
% bringing the luminance from... |
github | ArashAkbarinia/ColourCategorisation-master | ColourFrontiersExperimentArch.m | .m | ColourCategorisation-master/matlab/src/experiments/colourfrontiers/ColourFrontiersExperimentArch.m | 12,203 | utf_8 | 23d7fa222ecda8bc13b4cd167e1dbe80 | function [] = ColourFrontiersExperimentArch()
%% initialisation
% cleaning the workspace
clearvars;
close all;
clc;
% getting the start time
StartTime = tic;
% creating the colour frontiers
FrontierTable = ColourFrontiers();
% invoque the list of nameable colours from the literature
[~, PolarFocals... |
github | ArashAkbarinia/ColourCategorisation-master | ColourFrontiersExperimentCentre.m | .m | ColourCategorisation-master/matlab/src/experiments/colourfrontiers/ColourFrontiersExperimentCentre.m | 10,624 | utf_8 | 5646ca0355431ca5795c225ad256e2fa | function [] = ColourFrontiersExperimentCentre()
%% initialisation
% cleaning the workspace
clearvars;
close all;
clc;
% getting the start time
StartTime = tic;
% creating the colour frontiers
FrontierTable = GreyFrontiers();
% invoque the list of nameable colours from the literature
[CartFocals, Po... |
github | ArashAkbarinia/ColourCategorisation-master | GenerateMondrianSquares.m | .m | ColourCategorisation-master/matlab/src/experiments/colourfrontiers/mondrian/GenerateMondrianSquares.m | 2,270 | utf_8 | 056bb13b645415416ced3bb2ab4b6964 | function listofsquares = GenerateMondrianSquares(Image_Parameters, Mondrian_Parameters)
% Given one image and one set of features return a list of
% squares, specificating location and half size lenght for each axe.
%
% INPUT: Argument description:
% Image_Parameters: Structure with fields: width,height,c... |
github | ArashAkbarinia/ColourCategorisation-master | readcolours.m | .m | ColourCategorisation-master/matlab/src/experiments/colourfrontiers/mondrian/readcolours.m | 9,166 | utf_8 | 702a3a378fc274bf1b09d4f6e7e68e4b | function [Nameable_Colours, No_Nameable_Colours] = readcolours(CRS, list_id, nameable, no_nameable, ExperimentParameters, Illum_Shift)
% In this function we don't choose random colours from a list, we only
% load a colours list. After all, the way we construct the squares
% mondrians is condidion enought to sa... |
github | ArashAkbarinia/ColourCategorisation-master | get_simple_mondrian.m | .m | ColourCategorisation-master/matlab/src/experiments/colourfrontiers/mondrian/get_simple_mondrian.m | 13,069 | UNKNOWN | daf6f4b48d1c49b1c878c3c98f8e9bd4 | function [RGB_image, Colour_assignment, rgb_colors, mask] = get_simple_mondrian(MondrianParameters, CRS)
% PARAMETERS MODIFICATION:
Colours = 0;
order = 0;
mondrian_index = 1;
IlluminantShift = 0;
% TODO: get the size authomatically from the monitor
ImageParameters.Height = 600;
ImageParameters.Width = 80... |
github | RabadanLab/melamed_comorbidity-master | mygpred.m | .m | melamed_comorbidity-master/code/mygpred.m | 5,872 | utf_8 | ef6e542cd318dbeff520a75f5f883770 | %function [to_write, ind_order] = mygpred(altdat, rr, sel, add_con, ml, rem_blank, fname)
function [to_write, ind_order] = mygpred(altdat, rr, sel, add_con, pred_struct, rem_blank, fname)
netfind = {'NC'};%,'SP'};%,'SP_SS'}; %,'dgidb_NC','dgidb_SP'};
%coexpr = ;
mysets = [{'gene_intersection','gene_enriched','pathway_... |
github | zlmzju/caffe-master | classification_demo.m | .m | caffe-master/matlab/demo/classification_demo.m | 5,466 | utf_8 | 45745fb7cfe37ef723c307dfa06f1b97 | function [scores, maxlabel] = classification_demo(im, use_gpu)
% [scores, maxlabel] = classification_demo(im, use_gpu)
%
% Image classification demo using BVLC CaffeNet.
%
% IMPORTANT: before you run this demo, you should download BVLC CaffeNet
% from Model Zoo (http://caffe.berkeleyvision.org/model_zoo.html)
%
% *****... |
github | xumi1993/SplitRFLab-master | SL_SeismoViewer.m | .m | SplitRFLab-master/SplitLab1.0.5/SL_SeismoViewer.m | 13,253 | utf_8 | 0e1c1bb93ca2672cab4464c880db24ae | function seis=SL_SeismoViewer(idx)
% plot seismograms and provide user interaction
if nargin<1||isempty(idx)
idx=1;
end
global config eq thiseq
if isempty(eq)
beep
errordlg('Sorry no SplitLab-Project is loaded!','No project')
return
end
config.db_index = idx;
if isfield(thiseq,'Sp... |
github | xumi1993/SplitRFLab-master | splitlab.m | .m | SplitRFLab-master/SplitLab1.0.5/splitlab.m | 10,980 | utf_8 | 9fc82072a160b471863e5ef39a4e1321 |
function splitlab
% Main window of the SplitLab toolbox, configure the parameters and projects
% creating the configuration figure of Splitlab
global config eq
SL_checkversion
config.version='SplitRFLab2.3.0';
matver = version;
R2014b = 'R2014b';
nowver = regexp(matver, '[()]', 'split');
ver = char(no... |
github | xumi1993/SplitRFLab-master | SL_databaseViewer4old.m | .m | SplitRFLab-master/SplitLab1.0.5/SL_databaseViewer4old.m | 10,764 | utf_8 | d708e89eb096b29c36050a4b475bd908 | function SL_databaseViewer4old
% navigate within the SplitLab database
global eq config rf
if isempty(eq)
errordlg('No Earthquakes in database!')
return
end
%the next lines indicate the order in which coloums are sorted when
%specific button was pressed.
sortorder = [3 2 1 4 %date: day month ye... |
github | xumi1993/SplitRFLab-master | SL_SeismoViewer4old.m | .m | SplitRFLab-master/SplitLab1.0.5/SL_SeismoViewer4old.m | 13,083 | utf_8 | 6351fb89d432d3b01f9f1a489283c255 | function seis=SL_SeismoViewer4old(idx)
% plot seismograms and provide user interaction
if nargin<1|isempty(idx)
idx=1;
end
global config eq thiseq
if isempty(eq)
beep
errordlg('Sorry no SplitLab-Project is loaded!','No project')
return
end
config.db_index = idx;
if isfield(thiseq,... |
github | xumi1993/SplitRFLab-master | SL_databaseViewer.m | .m | SplitRFLab-master/SplitLab1.0.5/SL_databaseViewer.m | 10,896 | utf_8 | eeb0af2941185de64e00d5c2e31260ae | function SL_databaseViewer
% navigate within the SplitLab database
global eq config rf
if isempty(eq)
errordlg('No Earthquakes in database!')
return
end
%the next lines indicate the order in which coloums are sorted when
%specific button was pressed.
sortorder = [3 2 1 4 %date: day month year
... |
github | xumi1993/SplitRFLab-master | cutandsaveasSAC.m | .m | SplitRFLab-master/SplitLab1.0.5/Tools/cutandsaveasSAC.m | 6,205 | utf_8 | 0d52f2ca885fde1f58eb93f5f30110e4 | function cutandsaveasSAC
%Cut multiple SAC files at common start and end times
global eq config thiseq
if config.netw =='??'
errordlg('"??" is not a valid network name!')
return
end
C = cellfun('isempty', [eq.seisfiles]);
if all(C(:))
errordlg('Please associate first the SAC files to the database!'... |
github | xumi1993/SplitRFLab-master | SL_ttcurves.m | .m | SplitRFLab-master/SplitLab1.0.5/Tools/SL_ttcurves.m | 2,113 | utf_8 | 33122654bb35317c0178d366d3c2da76 | function SL_ttcurves(earthmodel, phases, depth, dis, win)
% Plot Travel time curves and travel paths
if isempty(earthmodel)||isempty(phases)
return
end
if nargin==0
earthmodel = 'prem';
phases = 'P,S,PcP,ScS,SKS,SKKS';
depth = 0;
dis = 40;
win = [90 130]... |
github | xumi1993/SplitRFLab-master | rffigbuttons.m | .m | SplitRFLab-master/SplitLab1.0.5/Tools/rffigbuttons.m | 1,957 | utf_8 | bace0fcff905220f089f43329202d72d | function rffigbuttons(fig)
%create buttons for seismogram plot SL_SeismoViewer and assings callbacks
global thisrf
if nargin<1
fig =gcf;
end
ht = uitoolbar(fig);
load('icon.mat');
uipushtool(ht,'CData',icon.back,...
'TooltipString','previous receiver function',...
'ClickedCallback', 'idx = thisrf.index-1... |
github | xumi1993/SplitRFLab-master | setSplitOptions.m | .m | SplitRFLab-master/SplitLab1.0.5/Tools/setSplitOptions.m | 5,444 | utf_8 | d8d9f3c36ab665ff455e36049ddc19e3 | function setSplitOptions
%set the option for calculation the best split estimate
global config
S = get(0,'PointerLocation');
pos = [S(1)-50 S(2)-290 270 330];
figure( 'NumberTitle','off',...
'name','Options',...
'MenuBar','None',...
'Position', pos,...
'WindowStyle... |
github | xumi1993/SplitRFLab-master | matrdseed.m | .m | SplitRFLab-master/SplitLab1.0.5/Tools/matrdseed.m | 3,406 | utf_8 | f35eac6645f01efae13a2c0b5e330fee | function matrdseed
% Matlab GUI for rdseed tool, uses java version "jrdseed"
%locate the JAVA executable file:
p = mfilename('fullpath');
jarpath = fileparts(p);
jarfile = dir(fullfile(jarpath,'Jrdseed*.jar'));
if isempty(jarfile)
disp(' ')
disp(' ')
disp('Jrdseed can be downloaded fro... |
github | xumi1993/SplitRFLab-master | SL_neic2mat.m | .m | SplitRFLab-master/SplitLab1.0.5/Tools/SL_neic2mat.m | 5,787 | utf_8 | 74710b15b2fbcf3278a0b9c802117985 | function varargout=neic2mat(catalogue)
%Save NEIC earthquake catalogue data to read with Splitlab
%
%Select the "SPREAD SHEET FORMAT" (comma separated list) as obtained from NEIC (neic.usgs.gov)
%
%This file must have one header line and comma separated column containing:
%Year,Month,Day,Time(hhmmss.mm)UTC,Lat,Lo... |
github | xumi1993/SplitRFLab-master | taupPath.m | .m | SplitRFLab-master/SplitLab1.0.5/Tools/matTaup/matTaup/taupPath.m | 5,389 | utf_8 | 308eb115c1346450dec19ff27334d798 | function tt_path=taupPath(model,depth,phase,varargin)
% TAUPPATH calculate ray path using TauP toolkit
%
% tt_path=taupPath(model,depth,phase,'option',value,...)
%
% Input arguments:
% The first three arguments are fixed:
% Model: Global velocity model. Default is "iasp91".
% Depth: Event depth ... |
github | xumi1993/SplitRFLab-master | lh.m | .m | SplitRFLab-master/SplitLab1.0.5/Saclab/lh.m | 12,832 | utf_8 | c6c74e2e9b8ee566febb1d9c4d121fac | %LH list SAC header
%
% Read or set matlab variables to SAC header variables from
% SAC files read in to matlab with rsac.m
%
% Examples:
%
% To list all defined header variables in the file KATH:
% lh(KATH)
%
% To assign the SAC variable DELTA from station KATH to
% the matlab variable dt... |
github | xumi1993/SplitRFLab-master | bsac.m | .m | SplitRFLab-master/SplitLab1.0.5/Saclab/bsac.m | 2,546 | utf_8 | 9111cdfb6bb13e3020ba7cc7b876d483 | %BSAC Be SAC
% BSAC(xarray,yarray) take an array of x-values and y-values
% and format the arrays in a way that is compatible with
% the SAC-like routines such as wsac, lh, or ch.
%
% Examples:
%
% To create a square root function in matlab in the arrays
% xarray and yarray, and then convert the a... |
github | xumi1993/SplitRFLab-master | ch.m | .m | SplitRFLab-master/SplitLab1.0.5/Saclab/ch.m | 11,166 | utf_8 | 9f6b4dc8431abb2df98bfbe350e6f76c | %CH change SAC header
%
% Change SAC header variables for
% SAC files read in to matlab with rsac.m
%
% Examples:
%
% To change the SAC variable DELTA from station KATH to
% the matlab variable dt:
%
% KATH=ch(KATH,'DELTA',dt);
%
% To change the SAC variables STLA and STLO from station KATH... |
github | xumi1993/SplitRFLab-master | rsac.m | .m | SplitRFLab-master/SplitLab1.0.5/Saclab/rsac.m | 3,585 | utf_8 | 203026cab0b0c5ecbafaba202fda0c3c | %RSAC Read SAC binary files.
% RSAC('sacfile') reads in a SAC (seismic analysis code) binary
% format file into a 3-column vector.
% Column 1 contains time values.
% Column 2 contains amplitude values.
% Column 3 contains all SAC header information.
% Default byte order is big-endian. M-file can b... |
github | xumi1993/SplitRFLab-master | seisfigbuttons.m | .m | SplitRFLab-master/SplitLab1.0.5/private/seisfigbuttons.m | 15,833 | utf_8 | c9337bc41f508b6c6993787f2327cb6f | function seisfigbuttons(fig,seismo)
%create buttons for seismogram plot SL_SeismoViewer and assings callbacks
global thiseq
if nargin<1
fig =gcf;
end
ht = uitoolbar(fig);
load('icon.mat');
%%
uipushtool(ht,'CData',icon.sac,...
'TooltipString','Export current seismograms to SAC format',...
'Cl... |
github | xumi1993/SplitRFLab-master | taupPath.m | .m | SplitRFLab-master/SplitLab1.0.5/private/matTaup/matTaup/taupPath.m | 5,389 | utf_8 | 308eb115c1346450dec19ff27334d798 | function tt_path=taupPath(model,depth,phase,varargin)
% TAUPPATH calculate ray path using TauP toolkit
%
% tt_path=taupPath(model,depth,phase,'option',value,...)
%
% Input arguments:
% The first three arguments are fixed:
% Model: Global velocity model. Default is "iasp91".
% Depth: Event depth ... |
github | xumi1993/SplitRFLab-master | lh.m | .m | SplitRFLab-master/SplitLab1.0.5/private/Saclab/lh.m | 12,832 | utf_8 | c6c74e2e9b8ee566febb1d9c4d121fac | %LH list SAC header
%
% Read or set matlab variables to SAC header variables from
% SAC files read in to matlab with rsac.m
%
% Examples:
%
% To list all defined header variables in the file KATH:
% lh(KATH)
%
% To assign the SAC variable DELTA from station KATH to
% the matlab variable dt... |
github | xumi1993/SplitRFLab-master | bsac.m | .m | SplitRFLab-master/SplitLab1.0.5/private/Saclab/bsac.m | 2,546 | utf_8 | 9111cdfb6bb13e3020ba7cc7b876d483 | %BSAC Be SAC
% BSAC(xarray,yarray) take an array of x-values and y-values
% and format the arrays in a way that is compatible with
% the SAC-like routines such as wsac, lh, or ch.
%
% Examples:
%
% To create a square root function in matlab in the arrays
% xarray and yarray, and then convert the a... |
github | xumi1993/SplitRFLab-master | ch.m | .m | SplitRFLab-master/SplitLab1.0.5/private/Saclab/ch.m | 11,166 | utf_8 | 9f6b4dc8431abb2df98bfbe350e6f76c | %CH change SAC header
%
% Change SAC header variables for
% SAC files read in to matlab with rsac.m
%
% Examples:
%
% To change the SAC variable DELTA from station KATH to
% the matlab variable dt:
%
% KATH=ch(KATH,'DELTA',dt);
%
% To change the SAC variables STLA and STLO from station KATH... |
github | xumi1993/SplitRFLab-master | rsac.m | .m | SplitRFLab-master/SplitLab1.0.5/private/Saclab/rsac.m | 3,577 | utf_8 | 7eba88ba7d5461426e9c19e76013c6cb | %RSAC Read SAC binary files.
% RSAC('sacfile') reads in a SAC (seismic analysis code) binary
% format file into a 3-column vector.
% Column 1 contains time values.
% Column 2 contains amplitude values.
% Column 3 contains all SAC header information.
% Default byte order is big-endian. M-file can b... |
github | xumi1993/SplitRFLab-master | geterrorbarsRC.m | .m | SplitRFLab-master/SplitLab1.0.5/ShearWaveSplitting/geterrorbarsRC.m | 4,426 | utf_8 | 07b1d6a453dfdce953fbd505dc820b1a | function [errbar_phi,errbar_t,Ccrit] = geterrorbars(Tcomp, Cmatrix, Cresult)
% estimate Degrees-of-Freedom and calculate 95% confidence interval
ndf = getndf(Tcomp,length(Tcomp),length(Tcomp));
HatNDF = ndf/length(Tcomp);%In the absense of correlation, this number should approach 1.0 (HATNDF << 1.0 is bad)
K ... |
github | xumi1993/SplitRFLab-master | splitdiagnosticLayout.m | .m | SplitRFLab-master/SplitLab1.0.5/ShearWaveSplitting/splitdiagnosticLayout.m | 4,438 | utf_8 | 1908dc3f8bc61b2cd12757e4149b6061 | function [axH, axRC, axSC axSeis] = splitdiagnosticLayout(Synfig)
m1 = uimenu(Synfig,'Label', 'Quality');
q(1) = uimenu(m1,'Label', 'good ', 'Callback',@q_callback);
q(2) = uimenu(m1,'Label', 'fair ', 'Callback',@q_callback);
q(3) = uimenu(m1,'Label', 'poor ', 'Callback',@q_callback);
% q(4) = uimenu(m... |
github | xumi1993/SplitRFLab-master | drawTheoreticLines.m | .m | SplitRFLab-master/SplitLab1.0.5/ShearWaveSplitting/drawTheoreticLines.m | 967 | utf_8 | 0a2a7910ec83f46598e19d11bcef4e4c | %% XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
function drawTheoreticLines
handles = guidata(gcbf);
if ~get(handles.show, 'Value');
return
end
if ~isfield(handles, 'theoLines')||~all(ishandle(handles.theoLines(:))),;
return
end
phi1 = get(handles.Layer1Phi, 'Value');
phi... |
github | xumi1993/SplitRFLab-master | geterrorbars.m | .m | SplitRFLab-master/SplitLab1.0.5/ShearWaveSplitting/geterrorbars.m | 4,292 | utf_8 | 79163fc3310ac7e17c9e284f3215b1ac | function [errbar_phi,errbar_t,Ecrit] = geterrorbars(Tcomp, Ematrix, Eresult)
% estimate Degrees-of-Freedom and calculate 95% confidence interval
ndf = getndf(Tcomp,length(Tcomp),length(Tcomp));
HatNDF = ndf/length(Tcomp);%In the absense of correlation, this number should approach 1.0 (HATNDF << 1.0 is bad)
K ... |
github | xumi1993/SplitRFLab-master | splitdiagnosticLayout4old.m | .m | SplitRFLab-master/SplitLab1.0.5/ShearWaveSplitting/splitdiagnosticLayout4old.m | 4,212 | utf_8 | 9b9b4f672a1cad2eec000859a08b33ed | function [axH, axRC, axSC axSeis] = splitdiagnosticLayout(Synfig)
m1 = uimenu(Synfig,'Label', 'Quality');
q(1) = uimenu(m1,'Label', 'good ', 'Callback',@q_callback);
q(2) = uimenu(m1,'Label', 'fair ', 'Callback',@q_callback);
q(3) = uimenu(m1,'Label', 'poor ', 'Callback',@q_callback);
% q(4) = uimenu(m... |
github | xumi1993/SplitRFLab-master | SL_Results.m | .m | SplitRFLab-master/SplitLab1.0.5/ShearWaveSplitting/SL_Results.m | 12,333 | utf_8 | a053c845dbf2fb119b5bf0ac10b3c319 | function SL_Results
%Related functions: SL_Results_makeplots.m SL_Results_getvalues.m twolayermodel.m stereoplot.m
global config eq
if isempty(eq)
errordlg('Project appears to be empty...! Sorry', 'No database')
return
end
for i = 1 : length(eq)
x(i)=~isempty(eq(i).results);
end
res =... |
github | xumi1993/SplitRFLab-master | sacsun2mat.m | .m | SplitRFLab-master/processRFmatlab/inout/sacsun2mat.m | 13,285 | utf_8 | ab14fc0cc16c0f3a13fd604d0841c109 | function [SeisData, SAChdr,sacfiles]=sacsun2mat(varargin)
% Read big endian sac files
%
% [SeisData, SAChdr,filenames] = SACSUNMAT('file1','file2',..., 'filen' )
%
% reads n SAC files file1, file2, filen (SAC files are assumed to have
% SUN byte order) and converts them to matlab
% format. The filenames can contain glo... |
github | xumi1993/SplitRFLab-master | combineHeaders.m | .m | SplitRFLab-master/processRFmatlab/inout/combineHeaders.m | 3,570 | utf_8 | 61e9450ad8eb7034511ff46e2caf2b99 | function [hdr,t, seis1,seis2,seis3] = combineHeaders(hdr1,seis1,hdr2,seis2,hdr3,seis3,...
isPlot,isVb)
% Combine the sac headers from 3 components of the same record into one header
%
% [hdr, seis1, seis2, seis3] = combineHeaders(hdr1, seis1, hdr2, seis2, hdr3, seis3, isPlot )
%
% From 3 headers with sac files... |
github | xumi1993/SplitRFLab-master | processENZseis.m | .m | SplitRFLab-master/processRFmatlab/signalprocessing/processENZseis.m | 5,754 | utf_8 | b726d3577c10e088506df86c25d10c8e | function [zseis, rseis, tseis, hdr] = processENZseis(eseis,nseis,zseis,hdr,opt,isVb,isPlot)
% From ENZ components and header info, chop around arrival, resample, band-pass and rotate
%
% [zseis, rseis, tseis, hdr] = processENZseis(eseis,nseis,zseis,hdr,opt,isVb,isPlot)
%
% IN:
% eseis,nseis,zseis = seis amplitudes ... |
github | xumi1993/SplitRFLab-master | plot2Rfn.m | .m | SplitRFLab-master/processRFmatlab/plotting/plot2Rfn.m | 1,211 | utf_8 | 2a4ee5dd5b11a3520882459b43fa8ea8 | % -- plot2Rfn.m ---
function plot2Rfn( TIME, SEIS1, SEIS2 , LABEL1, LABEL2, LTYPE1, LTYPE2 )
% plot2Rfn(
% plot2Rfn(
%
% Plot two receiver functions for the same time axis overlaying
% each other. Designed to compare the Z and the T receiver functions
%
% IN:
% TIME = time of samples
% SEIS1 = amplitudes 1st of sei... |
github | xumi1993/SplitRFLab-master | viewComponents.m | .m | SplitRFLab-master/processRFmatlab/plotting/viewComponents.m | 1,814 | utf_8 | b61dc429c46c03a1a0de4edd7faf7533 | function viewComponents(zfname)
% Given the sac filename for the z component, find the other
% components (assuming same directory and BHZ, BHE, BHN suffixes),
% then plot all
%
format compact;
% add programs used to your path
addpath ~/seismology/programs/processRFmatlab/ioFunctions/
addpath ~/seismology/programs/... |
github | xumi1993/SplitRFLab-master | plot3seis.m | .m | SplitRFLab-master/processRFmatlab/plotting/plot3seis.m | 4,314 | utf_8 | eb7a05373045ebc108f13c1f3d1663ff | function lims = plot3seis( t1, a1, t2, a2, t3, a3, varargin )
% plot3seis( t1, a1, t2, a2, t3, a3, [struct(...)])
%
% Plot three components using same scale for time and amplitude on
% currently active figure
%
% IN :
% t1,t2,t3 = times of 1st, 2nd, 3rd component
% a1, a2, a3 = amplitudes of 1st, 2nd, 3rd comonent
%
% ... |
github | xumi1993/SplitRFLab-master | plotSlowBaz.m | .m | SplitRFLab-master/processRFmatlab/plotting/plotSlowBaz.m | 2,836 | utf_8 | 295444747ace57cfa50f5f2a58c2da4c | function [rayp, backaz] = plotSlowBaz( rflist , stnm, isRad , ptype)
% plotSlowBaz : plot slowness and back azimuth of rfn list
%
% [rayp, backaz] = plotSlowBaz( rflist , stnm, isRad , ptype)
%
% IN:
% rflist = list of rfn structures
% stnm = station name
% isRad = flag to signal slowness is in radians
% ptype = point... |
github | xumi1993/SplitRFLab-master | makeRFitdecon.m | .m | SplitRFLab-master/processRFmatlab/deconvolution/makeRFitdecon.m | 8,681 | utf_8 | bb64e003c4565864b4c231c7dc9a684d | function [RFI,RMS] = makeRFitdecon(UIN,WIN,DT,...
MINLAG,MAXLAG,TSHIFT,F0,...
ITMAX,MINDERR,ISVB)
% Iterative time domain deconvolution
%
% [RFI,RMS]=makeRFitdecon(UIN,WIN,DT,MINLAG,MAXLAG,F0,ITMAX,MINDERR,ISVB)
%
% Iterative time-domain deconvolution using Ligorria and Ammon's 1999
% BSSA method, modifi... |
github | xumi1993/SplitRFLab-master | makeRFitdecon_la_SP.m | .m | SplitRFLab-master/processRFmatlab/deconvolution/makeRFitdecon_la_SP.m | 4,273 | utf_8 | 77ddfde47fafb0bf647ef5fd223febc9 | function [RFI,RMS,it] = makeRFitdecon_la_SP(UIN,WIN,DT,NT,TSHIFT,F0,ITMAX,MINDERR)
% Iterative t-domain deconv using Ligorria and Ammon's 1999 BSSA method
%
% [RFI,RMS]=makeRFitdecon(UIN,WIN,DT,NT,TSHIFT,F0,ITMAX,MINDERR)
%
% In:
% UIN = numerator (radial for PdS)
% WIN = denominator (vertical component for PdS)
% DT =... |
github | xumi1993/SplitRFLab-master | makeRFitdecon_la.m | .m | SplitRFLab-master/processRFmatlab/deconvolution/makeRFitdecon_la.m | 4,261 | utf_8 | 880140347aa5c2b9136b02bf3bd54e90 | function [RFI,RMS,it] = makeRFitdecon_la(UIN,WIN,DT,NT,TSHIFT,F0,ITMAX,MINDERR)
% Iterative t-domain deconv using Ligorria and Ammon's 1999 BSSA method
%
% [RFI,RMS]=makeRFitdecon(UIN,WIN,DT,NT,TSHIFT,F0,ITMAX,MINDERR)
%
% In:
% UIN = numerator (radial for PdS)
% WIN = denominator (vertical component for PdS)
% DT = sa... |
github | xumi1993/SplitRFLab-master | hkstack_iwb.m | .m | SplitRFLab-master/processRFmatlab/depthmapping/hkstack_iwb.m | 5,199 | utf_8 | afd0d50d94d90bc8f97b6a41f0e13eac | function [stack, stackvar, allstack, allstackvar] = hkstack_iwb(SEIS,T0,DT,P,H,KAPPA,VP,W)
%[stack, stackvar] = hkstack_iwb(SEIS,T0,DT,P,H,KAPPA,VP)
%
% Stack the amplitudes of a set of receiver functions at predicted
% times of a Ps conversion and the first two multiples for different
% crustal thickness and Vp/Vs rat... |
github | xumi1993/SplitRFLab-master | hkstack_iwb_phases.m | .m | SplitRFLab-master/processRFmatlab/depthmapping/hkstack_iwb_phases.m | 5,173 | utf_8 | b1c4a6c5242d8d119a899e4fb83ce5c1 | function [allstack] = hkstack_iwb_phases(SEIS,T0,DT,P,H,KAPPA,VP,W)
%[stack, stackvar] = hkstack_iwb(SEIS,T0,DT,P,H,KAPPA,VP)
%
% Stack the amplitudes of a set of receiver functions at predicted
% times of a Ps conversion and the first two multiples for different
% crustal thickness and Vp/Vs ratios, kind of following ... |
github | xumi1993/SplitRFLab-master | getBestHK.m | .m | SplitRFLab-master/processRFmatlab/depthmapping/getBestHK.m | 1,723 | utf_8 | d0d597742d51f5b52a06ae91dc35d581 | function [besth, bestk, allstack] = getBestHK( rflist , vp, w, h, k )
% [besth, bestk, allstack] = getBestHK( rflist , vp, w, h, k )
% Use stacking to get estimate of best crustal thickness and Vs
if( nargin < 2 ), vp = 6.30; end; % default Vp
if( nargin < 3 ), w = [ 1, 1, 1 ]; end % default weighting of multiples
if... |
github | xumi1993/SplitRFLab-master | hkstack.m | .m | SplitRFLab-master/processRFmatlab/depthmapping/hkstack.m | 7,798 | utf_8 | 7cedb54d660e0f347b1fc9ac8afe5dc0 | function [stack,varstack, besth, bestk] = hkstack(SEIS,T0,DT,P,H,KAPPA,VP,W,ISMTH,ISADD)
%
% Stack the amplitudes of a set of receiver functions at predicted
% times of a Ps conversion and the first two multiples for different
% crustal thickness and Vp/Vs ratios, following the method of Zhu and
% Kanamori (2000), JGR.... |
github | xumi1993/SplitRFLab-master | snr.m | .m | SplitRFLab-master/processRFmatlab/Tinycodes/snr.m | 10,000 | utf_8 | 338172b228b3cd5641bd68974b730496 | function [r, noisePow] = snr(varargin)
%SNR Signal to Noise Ratio
% R = SNR(X, Y) computes the signal to noise ratio (SNR) in dB, by
% computing the ratio of the summed squared magnitude of the signal, X,
% to the summed squared magnitude of the noise, Y, where Y has the same
% dimensions as X. Use this for... |
github | xumi1993/SplitRFLab-master | makeColorMap.m | .m | SplitRFLab-master/processRFmatlab/Tinycodes/makeColorMap.m | 2,587 | utf_8 | 2899f530b739e101ab7ddd0895a46956 | function cMap = makeColorMap(varargin)
%% MAKECOLORMAP makes smoothly varying colormaps
% a = makeColorMap(beginColor, middleColor, endColor, numSteps);
% a = makeColorMap(beginColor, endColor, numSteps);
% a = makeColorMap(beginColor, middleColor, endColor);
% a = makeColorMap(beginColor, endColor);
%
% all col... |
github | xumi1993/SplitRFLab-master | mmpolar.m | .m | SplitRFLab-master/processRFmatlab/Tinycodes/mmpolar.m | 54,651 | utf_8 | 5326ea8f2c2afcdb70792fe55124b7a1 | function out=mmpolar(varargin)
%MMPOLAR Polar Plot with Settable Properties. (MM)
% MMPOLAR(Theta,Rho) creates a polar coordinate plot using the angle Theta
% in RADIANS and radius in Rho. Rho can contain negative values.
% MMPOLAR(Theta,Rho,S) creates the plot using the line spec given by S. See
% the function PL... |
github | bezout/LMA-master | levenberg.m | .m | LMA-master/src/libv/lma/matlab/Rosenbrock/levenberg.m | 3,084 | utf_8 | f0e506b78b6cc42a009ee97306d913cf | function [loop,X1,Y1,Z1] = levenberg(auto, Xinit, Yinit)
% Algorithm constants
loop = 0;
maxloop = 100;
eps = 10^-8;
lambda = 10^-5;
% Rosenbrock function calculations
x = -1.5:0.01:1.5;
y = -1.5:0.01:1.5;
z = zeros(length(y),length(x));
for i=1:length(x)
for j=1... |
github | bezout/LMA-master | newton.m | .m | LMA-master/src/libv/lma/matlab/Rosenbrock/newton.m | 2,515 | utf_8 | f130402cd5c107e4e8e4eff89656db69 | function [loop,Z1,X1,Y1] = newton(auto, Xinit, Yinit)
% Algorithm constants
loop = 0;
maxloop = 10000;
eps = 10^-8;
% Rosenbrock function calculations
x = -1.5:0.01:1.5;
y = -1.5:0.01:1.5;
z = zeros(length(y),length(x));
for i=1:length(x)
for j=1:length(y)
... |
github | csdms-contrib/slepian_bravo-master | xyz2slep.m | .m | slepian_bravo-master/xyz2slep.m | 14,043 | utf_8 | ce3b163097d64a4c92c222ac99d1050c | function varargout=...
xyz2slep(fthph,theta,phi,TH,L,phi0,theta0,omega,J,sord,Glma,V,N,EL,EM)
% [falpha,N,V,Glma,EL,EM,lmcosi]=...
% XYZ2SLEP(fthph,theta,phi,TH,L,phi0,theta0,omega,J,sord,Glma,V,N,EL,EM)
%
% Slepian expansion of irregularly sampled but closely collocated points
% with respect to a Slepian basis ... |
github | csdms-contrib/slepian_bravo-master | sdcmb3.m | .m | slepian_bravo-master/sdcmb3.m | 2,792 | utf_8 | c2997055ecbfb4919f277452f9209fea | function sdcmb3
% SDCMB3
%
% Simons & Dahlen (2005)
% First four of the belt functions for a variety of orders
%
% Last modified by fjsimons-at-alum.mit.edu, 04/13/2007
TH=30;
L=18;
nth=32;
nlon=2*nth-1;
% The orders to display
m=[0 1 2];
% The number of functions for each order
numf=4;
% Collect positions for later... |
github | csdms-contrib/slepian_bravo-master | sdsumk.m | .m | slepian_bravo-master/sdsumk.m | 6,811 | utf_8 | cd46a0647fb98057aa5f4158aaa6aa7a | function [err,F,G,N,NA,th]=sdsumk(ZTH,ZL,nth,cb,xver)
% [err,F,G,N,NA,th]=SDSUMK(TH,L,nth,cb,xver)
%
% Sums eigenvalue-weighted squared eigenfunctions on the
% DOUBLE-POLAR CAP or the complementary LATITUDINAL BELT.
% Sums Shannon number terms as well as all of the terms.
% Also compares the full unweighted sum to N/A.... |
github | csdms-contrib/slepian_bravo-master | sdfried.m | .m | slepian_bravo-master/sdfried.m | 2,126 | utf_8 | ef4f9074bbff38ebc7d7206c407ff0c4 | function sdfried
% SDFRIED
%
% Makes fried-egg plots for +- angular orders of the DOUBLE spherical
% polar cap.
%
% Second time round the color axis is OK.; I forgot why.
%
% Last modified by fjsimons-at-alum.mit.edu, 25.05.2005
TH=40;
L=18;
[lrnk,mrnk,lval]=sdelm(TH,L);
% Nearly double the amount of requested taper... |
github | csdms-contrib/slepian_bravo-master | sdcmb4.m | .m | slepian_bravo-master/sdcmb4.m | 2,663 | utf_8 | 3854a0423c24200b13ee666455788ed9 | function sdcmb4
% SDCMB4
%
% Simons & Dahlen (2005)
% Last four of the belt functions for a variety of orders
%
% Last modified by fjsimons-at-alum.mit.edu, 04/13/2007
TH=30;
L=18;
nth=32;
nlon=2*nth-1;
% The orders to display
m=[0 1 2];
% The number of functions for each order
numf=4;
% Collect positions for later ... |
github | csdms-contrib/slepian_bravo-master | sddiagram.m | .m | slepian_bravo-master/sddiagram.m | 9,477 | utf_8 | e422da4eaf9931a4728b72011430effb | function sddiagram
% SDDIAGRAM
%
% Makes a diagram of the spherical set-up of the problem.
% Simons & Dahlen, Figure 1.
%
% Last modified by fjsimons-at-alum.mit.edu, 29.07.2005
% Which vector to plot
ang=40;
% Down to this z level for the projection
lz=-0.2;
% Rotation of the geodesic
rotg=-30;
% Rotation of the X-ax... |
github | wdxa/ILNumerics-master | TEST_ILMath_fftNAmn.m | .m | ILNumerics-master/ILNumericsTest/Tests/FFT/TEST_ILMath_fftNAmn.m | 3,417 | utf_8 | 5a21f774e073b4e004c8402080208b1d | function create()
filepath = 'TEST_ILMath.fftNAmn.cs';
% test array specification by size
dims = cell(1);
dims{1} = [1 1]; dims{2} = [3 1]; dims{3} = [1 3]; dims{4} = [2 3];
dims{5} = [3 2]; dims{6} = [2 2]; dims{7} = [4 5 2]; dims{8} = [3 1 3];
dims{9} = [1 3 4]; dims{10} = [1 4 3]; dims{11} = [3 4 1]; dims{1... |
github | wdxa/ILNumerics-master | TEST_ILMath_fft2Amn.m | .m | ILNumerics-master/ILNumericsTest/Tests/FFT/TEST_ILMath_fft2Amn.m | 3,177 | utf_8 | 6745ff5eb43c61ed6340dcc221d03484 | function create()
filepath = 'TEST_ILMath.fft2Amn.cs';
% test array specification by size
dims = cell(1);
dims{1} = [1 1]; dims{2} = [3 1]; dims{3} = [1 3]; dims{4} = [2 3];
dims{5} = [3 2]; dims{6} = [2 2]; dims{7} = [4 5 2]; dims{8} = [3 1 3];
dims{9} = [1 3 4]; dims{10} = [1 4 3]; dims{11} = [3 4 1]; dims{1... |
github | wdxa/ILNumerics-master | TEST_ILMath_fftA.m | .m | ILNumerics-master/ILNumericsTest/Tests/FFT/TEST_ILMath_fftA.m | 2,347 | utf_8 | 703611f66c89d470e2ab97dc1225fa1c | function create()
filepath = 'TEST_ILMath.fftA.cs';
% test array specification by size
dims = cell(1);
dims{1} = [1 1]; dims{2} = [5 1]; dims{3} = [1 5]; dims{4} = [4 5];
dims{5} = [5 4]; dims{6} = [5 5]; dims{7} = [5 10 5]; dims{8} = [5 1 5];
dims{9} = [1 5 10]; dims{10} = [1 10 5]; dims{11} = [5 10 1]; dims{... |
github | wdxa/ILNumerics-master | TEST_ILMath_fft2A.m | .m | ILNumerics-master/ILNumericsTest/Tests/FFT/TEST_ILMath_fft2A.m | 2,360 | utf_8 | f444f9c35a9ff5d0183f6303976f721b | function TEST_ILMath_ft2A()
filepath = 'TEST_ILMath.fft2A.cs';
% test array specification by size
dims = cell(1);
dims{1} = [1 1]; dims{2} = [5 1]; dims{3} = [1 5]; dims{4} = [4 5];
dims{5} = [5 4]; dims{6} = [5 5]; dims{7} = [5 10 5]; dims{8} = [5 1 5];
dims{9} = [1 5 10]; dims{10} = [1 10 5]; dims{11} = [5 1... |
github | wdxa/ILNumerics-master | TEST_ILMath_fftADim.m | .m | ILNumerics-master/ILNumericsTest/Tests/FFT/TEST_ILMath_fftADim.m | 2,370 | utf_8 | d54d8b162c715ae1630b017951ae2cbf | function create()
filepath = 'TEST_ILMath.fftADim.cs';
% test array specification by size
dims = cell(1);
dims{1} = [1 1]; dims{2} = [5 1]; dims{3} = [1 5]; dims{4} = [4 5];
dims{5} = [5 4]; dims{6} = [5 5]; dims{7} = [5 10 5]; dims{8} = [5 1 5];
dims{9} = [1 5 10]; dims{10} = [1 10 5]; dims{11} = [5 10 1]; di... |
github | wdxa/ILNumerics-master | TEST_IILFFT_float.m | .m | ILNumerics-master/ILNumericsTest/Tests/FFT/TEST_IILFFT_float.m | 6,293 | utf_8 | 760d41841785e2f1b261049ca9578688 | function create()
filepath = 'TEST_IILFFT_float_fcomplex.cs';
sInType = 'float';
sOutType = 'fcomplex';
% test array specification by size
dims = cell(1);
dims{1} = [1 1]; dims{2} = [5 1]; dims{3} = [1 5]; dims{4} = [4 5];
dims{5} = [5 4]; dims{6} = [5 5]; dims{7} = [5 10 5]; dims{8} = [5 1 5];
dims{9} = [... |
github | wdxa/ILNumerics-master | TEST_IILFFT_double.m | .m | ILNumerics-master/ILNumericsTest/Tests/FFT/TEST_IILFFT_double.m | 6,296 | utf_8 | 7a427d0626024ea659f533894762181a | function create()
filepath = 'TEST_IILFFT_double_complex.cs';
sInType = 'double';
sOutType = 'complex';
% test array specification by size
dims = cell(1);
dims{1} = [1 1]; dims{2} = [5 1]; dims{3} = [1 5]; dims{4} = [4 5];
dims{5} = [5 4]; dims{6} = [5 5]; dims{7} = [5 10 5]; dims{8} = [5 1 5];
dims{9} = [... |
github | wdxa/ILNumerics-master | TEST_IILFFT_fcomplex.m | .m | ILNumerics-master/ILNumericsTest/Tests/FFT/TEST_IILFFT_fcomplex.m | 6,065 | utf_8 | d0788ddb6bb39f50cb66aeb93b0f995c | function create()
filepath = 'TEST_IILFFT_fcomplex_fcomplex.cs';
sInType = 'fcomplex';
sPrecType = 'float';
sOutType = 'fcomplex';
% test array specification by size
dims = cell(1);
dims{1} = [1 1]; dims{2} = [5 1]; dims{3} = [1 5]; dims{4} = [4 5];
dims{5} = [5 4]; dims{6} = [5 5]; dims{7} = [5 10 5]; dims... |
github | wdxa/ILNumerics-master | TEST_IILFFT_complex.m | .m | ILNumerics-master/ILNumericsTest/Tests/FFT/TEST_IILFFT_complex.m | 6,081 | utf_8 | 7f89ecfcac86f57aa131de83c2973033 | function create()
filepath = 'TEST_IILFFT_complex_complex.cs';
sInType = 'complex';
sPrecType = 'double';
sOutType = 'complex';
% test array specification by size
dims = cell(1);
dims{1} = [1 1]; dims{2} = [5 1]; dims{3} = [1 5]; dims{4} = [4 5];
dims{5} = [5 4]; dims{6} = [5 5]; dims{7} = [5 10 5]; dims{8}... |
github | kpctoolboxteam/kpc-toolbox-master | kpcfit_ph_search.m | .m | kpc-toolbox-master/kpcfit/kpcfit_ph_search.m | 6,148 | utf_8 | 9980fe7eef683637191faa2934db481e | function [KPC_PH,score,x] = kpcfit_ph_search(E,J,options,x0,max_aph_order)
% Not for direct call, auxiliary function. Optimization-based search.
%% initialization
warning off
%optimoptions = optimset('Algorithm','active-set', ...
%optimoptions = optimset('Algorithm','trust-region-reflective', ...
optimoptions = o... |
github | kpctoolboxteam/kpc-toolbox-master | kpcfit_ph_manual.m | .m | kpc-toolbox-master/kpcfit/kpcfit_ph_manual.m | 4,605 | utf_8 | e8d85d76f6f5e20e39bbfc1d7d71366b | function PH = kpcfit_ph_manual(E,varargin)
% ** beta version **
%
% PH = kpcfit_ph_manual(E,'option1','val1','option2','val2',...)
%
% DESCRIPTION
% Fit phase-type (PH) process using Kronecker Product Composition (KPC)
% method
%
% INPUT
%
% E - vector of moments of consecutive order to be fitte... |
github | kpctoolboxteam/kpc-toolbox-master | det_sample.m | .m | kpc-toolbox-master/smp/det/det_sample.m | 1,981 | utf_8 | 4c52efc236f2653d762fb6ca53165406 | function [SAMPLES,LAST,FIRST]=det_sample(DET,nSamples,initState,seed)
if nargin<3
% pi=map_piq(DET); % time stationary initialization
pi=map_pie(DET); % interval stationary initialization
x=cumsum(pi);
r=rand();
initState=min(find(r<=x));
elseif length(initState)>1
pi=initState;
x=cumsum(pi)... |
github | kpctoolboxteam/kpc-toolbox-master | ctmc_transient.m | .m | kpc-toolbox-master/mc/ctmc_transient.m | 1,039 | utf_8 | 32bb7340ad2ebdbc0c067d24f982b58b | function [pi,t]=ctmc_transient(Q,pi0,t0,t1,useStiff,reltol)
if ~exist('useStiff','var')
useStiff = false;
end
if ~exist('reltol','var')
reltol = 1e-3;
end
if nargin==2
t1=pi0;
t0=0;
pi0=ones(1,length(Q));pi0=pi0/sum(pi0);
end
if nargin==3
t1=t0;
t0=0;
end
odeoptions = ode... |
github | kpctoolboxteam/kpc-toolbox-master | map_anfit.m | .m | kpc-toolbox-master/map/map_anfit.m | 5,931 | utf_8 | 458e5eb4361fa03266bff4dfc6738db0 | function MAP=map_anfit(ls,rho,H,n,ds,SA,SAlags, iter_max, iter_tol)
% MAP_ANFIT - Andersen and Nielsen MAP Fitting Algorithm
% From A.T.Andersen and B.F.Nielsen, "A Markovian Approach for Modeling Packet Traffic with Long-Range Dependence", IEEE JSAC 16(5), 1998.
% ls - mean arrival rate
% rho - lag-1 autocorrelation o... |
github | kpctoolboxteam/kpc-toolbox-master | map_sample.m | .m | kpc-toolbox-master/map/map_sample.m | 3,146 | utf_8 | 44fedd6f066ee6b95fc4295db58adbc2 | function [SAMPLES,LAST,FIRST]=map_sample(MAP,nSamples,pi,seed)
% [SAMPLES,LAST]=map_sample(MAP,NUM,S0, SEED) - Generate a random sample
% of inter-arrival times
%
% Input:
% MAP: a MAP in the form of {D0,D1}
% NUM: number of samples to be generated
% S0: phase where the MAP starts for generating the first s... |
github | kpctoolboxteam/kpc-toolbox-master | map_isfeasible.m | .m | kpc-toolbox-master/map/map_isfeasible.m | 2,425 | utf_8 | a43b62573a0c9b884ab0717219fd258d | function ISFEAS=map_isfeasible(MAP, TOL)
% ISFEAS=map_isfeasible(MAP) - Evaluate feasibility of a MAP process
%
% Input:
% MAP: a MAP in the form of {D0,D1}
%
% Output:
% ISFEAS: boolean 1=feasible, 0=infeasible. Numerical tolerance is based
% on the standard toolbox value in map_feastol.m
%
% Examples:... |
github | kpctoolboxteam/kpc-toolbox-master | map_pntiter.m | .m | kpc-toolbox-master/map/map_pntiter.m | 1,454 | utf_8 | 582c58c5088f5ff32e0599d2c24fd643 | function Pnt=map_pntiter(MAP,na,t,M)
% Pnt=map_pntiter(MAP,n,t) - probability of having n arrivals within an interval of length t
% Neuts and Li, MAM1
if ~exist('M','var')
M=ceil(log2(t*100/map_mean(MAP)));
end
if M<0
[Pnt,P]=map_pntbisect(MAP,na,t);
else
[Pnt,P]=map_pntbisect(MAP,na,t/2^M);
f... |
github | particleincell/PICCBlog-master | interpolate2d.m | .m | PICCBlog-master/interpolate2d.m | 3,885 | utf_8 | 5f93cc25a4afa4df69bfb2894140cb00 | % interpolate2d.m
%
% illustrates scatter / gather operation using a polygonal element
% See http://www.particleincell.com/2012/quad-interpolation for additional information
% (c) 2012 Lubos Brieda, lubos.brieda@particleincell.com
%
% -- tested with Octave 3.2.4 on Windows
%main function
function []=interpolate2d()
... |
github | particleincell/PICCBlog-master | erosion.m | .m | PICCBlog-master/erosion.m | 4,988 | utf_8 | 749f0aa68927b124efd8a3ebe09ab113 | function [max_erosion_mag max_erosion_deg points] = erosion(time, numpoints, plotting)
%EROSION.m
%Author: Alex Barrie
%This code performs an erosion calculation on a circle. There is no element splittting
%or merging, so don't erode for too long! A simple cosine model is used for
%angular dependence.
% INPUTS:
% ... |
github | particleincell/PICCBlog-master | eval_2dpot_GS.m | .m | PICCBlog-master/eval_2dpot_GS.m | 1,822 | utf_8 | 6a8e69bd5783f546289908ac192707e0 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Potential solver for a particle-in-cell example program
% Based on the Gauss-Seidel method
%
% For more, visit http://www.particleincell.com/2010/es-pic-method/
% and http://www.particleincell.com/2011/particle-in-cell-example/
%%%%%%%%%%%%%%%%%%%%%%... |
github | particleincell/PICCBlog-master | charge1d.m | .m | PICCBlog-master/charge1d.m | 5,607 | utf_8 | afb4ac2c3ad9884d56e3812e3f6ae678 | % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% charge1d.m - 1d charging calculation of static dissipative or dielectric materials
%
% AUTHOR: Alexander C Barrie
%
% LICENSING: This file is intended for educational use. It is licensed
% under GPL (GNU Public License)
%
% This code calculates the charging of a semiconduc... |
github | rordenlab/spmScripts-master | nii_merge_dki.m | .m | spmScripts-master/nii_merge_dki.m | 3,279 | utf_8 | f7fb5c9b13726c7601231a6aac37c807 | function nii_merge_dki (V, isGui, isRev)
%merge a series of DTI/DKI images for analysis
% V: image(s) to merge
% isRev: (optional)
% Examples
% nii_merge_dki({'dti.nii', 'dti2.nii'}));
minVol = 3; %1 to merge all images, 3 to merge images with at least 3 volumes
if nargin <1 %no files
V = spm_select(inf,'^.*\.(g... |
github | rordenlab/spmScripts-master | bmp_mexicanhat.m | .m | spmScripts-master/bmp_mexicanhat.m | 4,526 | utf_8 | bfb69abc1f8f2bf06e61bfe127fa0182 | function bmp_mexicanhat(Filename, ShowFigures)
%Blurs image, uses difference between blur and orignal for edges, creates image with enhanced edges
% Filename: name of bitmap [optional]
% ShowFigures: if FALSE results saved to disk, else displayed
%Example
% bmp_unsharpmask('photo.png');
% bmp_unsharpmask('cat.jpg',... |
github | rordenlab/spmScripts-master | nii_fslflirt.m | .m | spmScripts-master/nii_fslflirt.m | 4,556 | utf_8 | ab8c1d0568e7a4d799515543675574ff | function nii_fslflirt (Src, Ref, Shadow, OutDir, Prefix, IsInputMask,IsLinearInterp, InvRefWeight)
%Normalize P->Ref using FLIRT
% Src: image to normalize
% Ref: [optional] target of normalization
% Shadow: image[s] to be resliced using Src->Ref transform
% OutDir: [optional] output folder, defaults to Src's dire... |
github | rordenlab/spmScripts-master | nii_combine_mask.m | .m | spmScripts-master/nii_combine_mask.m | 1,956 | utf_8 | 1b7218c3da8987969b630ec0ed01c820 | function nii_combine_mask(fnms, filt, isAndMask)
%Input: multiple images combined using AND or OR logical functions
% fnms: filenames of input images
% filt: if zero all non-zero voxels, if -1 then negative voxels, if +1 then all positive voxels
% isAndMask : if 1 AND mask (voxel must survive ALL), else OR mask (vo... |
github | rordenlab/spmScripts-master | nii_atlas2nii.m | .m | spmScripts-master/nii_atlas2nii.m | 1,489 | utf_8 | 18d9c3fa53e0706933cd3dcc833f44d5 | function nii_atlas2nii (atlasfnm)
%Convert NIfTI indexed atlas to series of NIfTI images, one per region
% atlasfnm = (optional) filenames to convert, e.g. 'aal.nii.gz'
%Examples
% nii_atlas2nii; %use GUI
% nii_atlas2nii('aal.nii.gz');
if ~exist('atlasfnm','var') %no files specified
atlasfnm = spm_select(1,'^.*\.(gz|... |
github | rordenlab/spmScripts-master | cleanup.m | .m | spmScripts-master/cleanup.m | 3,234 | utf_8 | 357ed70af6e34bfe0fab8287e67ff4e8 | function img = cleanup(fname, erodeCycles)
%cleanup binary 3D image to remove noise
% fname : nifti image to clean
% erodeCycles : number of pixels eroded, surviving features larger than this
%Examples
% cleanup; %use GUI
% cleanup('test.nii'); %save to disk
% cleanup('test.nii', 2); %remove features less than 2 voxels... |
github | rordenlab/spmScripts-master | bmp_unsharpmask.m | .m | spmScripts-master/bmp_unsharpmask.m | 6,319 | utf_8 | e4d6129326936c55dfe5b997fd8f844b | function bmp_unsharpmask(Filename, lambda, ShowFigures);
%Blurs image, uses difference between blur and orignal for edges, creates image with enhanced edges
% Filename: name of bitmap [optional]
% BlurPixels: images will be smoothed with based on this FWHM
% ShowFigures: if FALSE results saved to disk, else display... |
github | rordenlab/spmScripts-master | nii_dilate_vox.m | .m | spmScripts-master/nii_dilate_vox.m | 3,909 | utf_8 | 87ce07480979d35120b569ce34636f71 | function img = nii_dilate_vox(fnms, dilatevox)
%dilate binary volume
% dilatevox: Number of voxels to grow or shrink object
% if dilatevox = 0: no change to object
% if dilatevox = 2: output will be dilated 2 voxels larger than input
%By default, images are saved to disk
% However, if img is used as an output no d... |
github | rordenlab/spmScripts-master | nii_dti_clean.m | .m | spmScripts-master/nii_dti_clean.m | 3,429 | utf_8 | aea6223a53b8e229f9d18114a5f218f1 | function fnm = nii_dti_clean(fnm, thresh);
%Detect and remove DTI volumes with substantial movement artifacts
%Warning: only for DTI: for fMRI we need to impute missing timepoints
% fnm : name of file to check and decimate if required
%Alternative
% fsl's eddy with outlier replacement (--repol)
%Examples
% nii_dti_clea... |
github | rordenlab/spmScripts-master | bmp_contrast.m | .m | spmScripts-master/bmp_contrast.m | 10,683 | utf_8 | 5fd611e6b44cd7f3ff30b888cdc42972 | function bmp_contrast(Filename, Gain, Bias, Smooth, Linear, Prefix, ShowFigures)
%Adjusts contrast of image, saving output as bitmap with prefix
% Filename: name of bitmap [optional]
% Gain: intensity amplifaction 0..1: 0.1 = low contrast, 0.5= unchanged, 0.9 high contrast
% Bias: intensity offset 0..1: 0.1 = darke... |
github | rordenlab/spmScripts-master | nii_sqr_matrix.m | .m | spmScripts-master/nii_sqr_matrix.m | 2,141 | utf_8 | b491e6e5b9f20320cb99ae71b7bc0f4b | function [hd,im] = nii_sqr_matrix(fnm)
%convert an image to have a square matrix in plane, e.g. 80x128 saved as 128x128
% fnm : NIfTI image with rectangular matrix (number of columns ~= number of rows)
%Examples
% nii_sqr_matrix('DTI_dir42_AP_M2029_POLAR1012_Session3.nii');
% nii_sqr_matrix; %
if ~exist('fnm','var') |... |
github | rordenlab/spmScripts-master | nii_nii2stl.m | .m | spmScripts-master/nii_nii2stl.m | 14,428 | utf_8 | d47bb9ef6e3ed6bb8f7abacf15ce7efa | function nii_nii2stl (fnm, sthresh)
%input: T1 file in NIfTI format, output: mesh image
% fnm : input image
% sthresh : threshold for deciding if tissue is brain or air
%Similar
% http://bartferguson.nl/blog/?p=5
% http://hackaday.com/2015/08/25/you-own-your-mri-brainscan-do-something-interesting-with-it/
% http://www.... |
github | rordenlab/spmScripts-master | nii_remove_haze.m | .m | spmScripts-master/nii_remove_haze.m | 7,133 | utf_8 | 30b6fe8b49740109390628542bc738c1 | function fnm = nii_remove_haze(fnm)
%Remove speckles in air surrounding object
% fnm : name of nifti image to process
%Examples
% nii_remove_haze %use GUI
% nii_remove_haze('T1.nii')
if ~exist('fnm','var')
fnm = spm_select(1,'image','Select image[s] for haze removal');
end;
hdr = spm_vol(fnm);
img = spm_read_vols(... |
github | rordenlab/spmScripts-master | nii_fixnames.m | .m | spmScripts-master/nii_fixnames.m | 2,362 | utf_8 | 6ca816f96ec7a482c4e235bbc2a609c3 | function nii_fixnames(dir)
%MUSC uses non-standard names for sequences, fix them!
% dir: folder with NIfTI images to rename
dir = pwd;
modalityKeysOld = {'CRH_ASL', 'mb_diff_PA_','mb_diff_', 'RESTING_STATE_PA_', 'RESTING_STATE_'};
modalityKeysNew = {'ASL', 'DTIrev','DTI_', 'RestRev_', 'Rest_'};
nameFiles=subImgSub(di... |
github | rordenlab/spmScripts-master | nii_loadhdrimg.m | .m | spmScripts-master/nii_loadhdrimg.m | 7,681 | utf_8 | ef09dd41fe1e95e5214c32135c1efd01 | function [hdr, img] = nii_loadhdrimg(filename)
%load NIfTI (.nii, .nii.gz, .hdr/.img) image and header
% filename: image to open
%To do:
% endian: rare, currently detected and reported but not handled
%Examples
% hdr = nii_loadhdrimg('myimg.nii');
% [hdr, img] = nii_loadhdrimg('myimg.nii');
%Similar to following SPM ... |
github | rordenlab/spmScripts-master | nii_merge_dki2k.m | .m | spmScripts-master/nii_merge_dki2k.m | 818 | utf_8 | c806bdf409fb7a592b2da3e3fa493cbf | function nii_merge_dki2k(pth)
%concatenate ["DTI2K_"+"DTI_"] and ["DTI2Krev_"+"DTIrev_"]
% pth : folder with images
%Examples
% nii_merge_dti2k %gui
% nii_merge_dti2k(pwd)
if ~exist('pth','var')
pth = uigetdir(pwd);
end;
DTI = findSub(pth, 'DTI_*.nii');
DTI2K = findSub(pth, 'DTI2K_*.nii');
DTIrev = findSub(pth, '... |
github | rordenlab/spmScripts-master | nii_enat_norm.m | .m | spmScripts-master/nii_enat_norm.m | 20,545 | utf_8 | c1d6e4b7b2807984b8317d655d8947cc | function nii_enat_norm(T1,lesion,T2, UseXTemplate, vox, bb, DeleteIntermediateImages, ssthresh, autoOrigin)
%Perform enantiomorphic normalization using SPM12
% see Nachev et al. (2008) http://www.ncbi.nlm.nih.gov/pubmed/18023365
% T1: filename of T1 image
% Lesion: filename of lesion map
% T2: (optional) filename of... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.