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 | alchemyst/ternplot-master | ternplot_pro.m | .m | ternplot-master/ternplot_pro.m | 5,273 | utf_8 | 8f790bc0dde216929cf8cdbc768bca95 | % TERNPLOT_PRO plot ternary phase diagram, where the facecolors of the
% triangular cells (in grey scale) represent density of points with respect
% to overall counts of data.
% b
% / \
% / \
% c --- a
% HFINAL = TERNPLOT_PRO(dataA, dataB, dataC, NUM_AXES_STEPS, NUM_COLOR_CLASSES)
% plots ternar... |
github | alchemyst/ternplot-master | ternsurf.m | .m | ternplot-master/ternsurf.m | 2,511 | utf_8 | 8213bfa416ed09c3955fdd7b99794593 | % TERNSURF plot surface diagram for ternary phase diagram
% TERNSURF(A, B, Z) plots surface fitted over Z on ternary phase diagram for three components. C is calculated
% as 1 - A - B. Number of steps in axes will be enter by user as MAJORS
%
% TERNSURF(A, B, C, Z) plots surface of Z on ternary phase data... |
github | alchemyst/ternplot-master | fractions.m | .m | ternplot-master/fractions.m | 214 | utf_8 | 84fb8748d21239039ef1ec201b99e577 | % FRACTIONS normalise ternary data
% [fA, fB, fC] = FRACTIONS(A, B, C) calculates fractional values for
function [fA, fB, fC] = fractions(A, B, C)
Total = (A+B+C);
fA = A./Total;
fB = B./Total;
fC = 1-(fA+fB);
|
github | alchemyst/ternplot-master | vertexlabel.m | .m | ternplot-master/vertexlabel.m | 1,011 | utf_8 | 73817054db98d476d7b65e0a55468672 | % VERTEXLABEL label ternary phase diagram at vertices
% VERTEXLABEL('ALABEL', 'BLABEL', 'CLABEL') puts labels at vertices of ternary phase diagrams created using TERNPLOT
%
% VERTEXLABEL('ALABEL','BLABEL','CLABEL',OFFSET) sets the labels OFFSET units away from the vertices.
% H = VERTEXLABEL('ALABEL', 'BLA... |
github | alchemyst/ternplot-master | ternaxes.m | .m | ternplot-master/ternaxes.m | 3,658 | utf_8 | e5fcd003632c95f514928c857a0ba68d | % TERNAXES create ternary axis
% HOLD_STATE = TERNAXES(MAJORS) creates a ternary axis system using the system
% defaults and with MAJORS major tickmarks.
% Author: Carl Sandrock 20050211
% To Do
% Modifications
% 20160405 (SA) Added lines to change the order/direction of axes (i.e.
% clockwise or c... |
github | alchemyst/ternplot-master | ternpcolor.m | .m | ternplot-master/ternpcolor.m | 900 | utf_8 | f4fb7a2dd86cd01832d332c967286c11 | % TERNPCOLOR plot pseudo color diagram on ternary axes
% TERNPCOLOR(A, B, Z) plots surface fitted over Z on ternary phase diagram for three components. C is calculated
% as 1 - A - B.
%
% TERNPCOLOR(A, B, C, Z) plots surface of Z on ternary phase data for three components A B and C. If the values
% a... |
github | alchemyst/ternplot-master | terncontour.m | .m | ternplot-master/terncontour.m | 2,093 | utf_8 | a46a2d91568ea296af78b4c04bdba23e | % TERNCONTOUR plot contours on ternary phase diagram
% TERNCONTOUR(A, B, Z) plots contours of Z on ternary phase diagram for three components. C is calculated
% as 1 - A - B.
%
% TERNCONTOUR(A, B, C, Z) plots contours of Z on ternary phase data for three components A B and C. If the values
% are... |
github | alchemyst/ternplot-master | ternlabel.m | .m | ternplot-master/ternlabel.m | 732 | utf_8 | d1200ef53e360f72d972e0fc26c60e18 | % TERNLABEL label ternary phase diagram
% TERNLABEL('ALABEL', 'BLABEL', 'CLABEL') labels a ternary phase diagram created using TERNPLOT
%
% H = TERNLABEL('ALABEL', 'BLABEL', 'CLABEL') returns handles to the text objects created.
% with the labels provided. TeX escape codes are accepted.
%
% See also T... |
github | vrama91/cider-matlab-master | func_cider.m | .m | cider-matlab-master/CIDEr/func_cider.m | 1,189 | utf_8 | c94a41fde41d791e7f74323743da9a3a | % caculate the cider score
function cider_score = func_cider(candtf, reftf, idf, d)
parameters;
ngrams = params.ngrams;
sigma = params.sigma;
% (1-4)(1-4)(1-4)..
candtf_all = candtf(:);
cider_score = zeros(length(ngrams), size(candtf,2), size(reftf,2));
for it = 1:length(candtf_all)
[n, cand_id] = ind2sub(size(cand... |
github | vrama91/cider-matlab-master | df2idf.m | .m | cider-matlab-master/CIDEr/df2idf.m | 367 | utf_8 | d05da5b2c5d248e5d477da5e1363b030 | % function to convert document frequency to idf
function idf = df2idf(docFR, num_docs)
num_ref_docs = num_docs;
for it = 1:length(docFR)
docF = docFR{it};
if(~isempty(docF))
doc_val = cell2mat(values(docF));
doc_key = keys(docF);
inv_doc = log(num_ref_docs./doc_val);
idf{it} = containers.Map(doc_key,... |
github | vrama91/cider-matlab-master | compute_cider.m | .m | cider-matlab-master/CIDEr/compute_cider.m | 877 | utf_8 | 34863ce1ac1a289650f31d7471ff98e5 | % function that computes CIDEr metric
function [ci_scr] = compute_cider(docF, num_docs, cands, refs)
refs_image = {refs.image};
% index images for against which candidates are to be scored
for i = 1:length(cands)
cands_image = find(ismember(refs_image, cands(i).image)==1);
cands(i).image_id = cands_image;
assert(l... |
github | vrama91/cider-matlab-master | load_cands_refs.m | .m | cider-matlab-master/common/load_cands_refs.m | 818 | utf_8 | badc884242a3a0997732b30ef99fc6d7 | % Filename: load_cands_refs.m
%
% Description: Load ngrams for a particular candidate and a reference from file
%
% Usage: load_cands_refs(cands, i)
%
% Author: Ramakrishna Vedantam
%
% Creation Date: 01/31/15
function [candFC, refFC] = load_cands_refs(cands, i)
parameters;
cands_folder = 'cache/cands';
refs_folder =... |
github | vrama91/cider-matlab-master | extract_n_grams_cands.m | .m | cider-matlab-master/common/extract_n_grams_cands.m | 3,519 | utf_8 | 2ae1fd2b280676f881b42bc45c64224c | % Filename
% -----------
% extract_n_grams_cands.m
% Parameters
% -----------
% cands : Reference Setnences for images in the testing dataset
% MATLAB struct with fields (image, sent)
% docF : n-gram dictionaries extracted from reference sentences
% cell ... |
github | vrama91/cider-matlab-master | extract_n_grams.m | .m | cider-matlab-master/common/extract_n_grams.m | 5,220 | utf_8 | 46f99a7d9d74bb3cc5bb698ac9026f0d | % Filename: extract_n_grams.m
%
% Parameters:
% refs : Reference Setnences for images in the testing dataset
% MATLAB struct with fields (image, sent)
% Returns:
% docF : n-gram dictionaries extracted from reference sentences
% cell array of containers.Map storing {... |
github | vrama91/cider-matlab-master | porterStemmer.m | .m | cider-matlab-master/common/porterStemmer.m | 9,980 | utf_8 | 3afc83cebbbef76f836a7de7ffb6da8b | function stem = porterStemmer(inString)
% Applies the Porter Stemming algorithm as presented in the following
% paper:
% Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14,
% no. 3, pp 130-137
% Original code modeled after the C version provided at:
% http://www.tartarus.org/~martin/PorterStemmer/c.tx... |
github | vrama91/cider-matlab-master | project_dict_fast.m | .m | cider-matlab-master/common/project_dict_fast.m | 498 | utf_8 | 821426a256b2f9557bd99bab040a68a7 | % Filename: project_dict_fast.m
%
% Author: Ramakrishna Vedantam
%
% Description: Find the representation for text (cell array) in a vector space
% indexed by dictionary
%
% Usage: project_dict_fast(text, dictionary)
function vector = project_dict_fast(text, dictionary)
[occurrence] = ismember(dictionary, text);... |
github | vrama91/cider-matlab-master | load_data.m | .m | cider-matlab-master/common/load_data.m | 300 | utf_8 | fa21308ee10bc283e0e79241ce466162 | % Filename: load_data.mat
%
% Description: Load the data candidate and reference data stored in mat files
%
% Author: Ramakrishna Vedantam
%
% Date Created: 01/27/15
function [refs, cands] = load_data(path_to_candidates, path_to_references)
load(path_to_candidates);
load(path_to_references);
end |
github | vrama91/cider-matlab-master | tokenize.m | .m | cider-matlab-master/common/tokenize.m | 225 | utf_8 | 643455809692900b01cbffedfced9b40 | % tokenize sentence
function [tokens, untoken] = tokenize(sentence)
% might want to make untoken as just strjoin of tokens
untoken = lower(sentence);
tokens = regexp(lower(sentence), '[\w]+[^./ ; )(,"\''t \-!:?]*','match');
|
github | jiweil/Sequence-Models-on-Stanford-Treebank-master | BiLSTM.m | .m | Sequence-Models-on-Stanford-Treebank-master/Bi_LSTM/BiLSTM.m | 8,568 | utf_8 | ef961346f1599411f7c3aa5284487a73 | function[]=BiLSTM()
clear;
%matlabpool open 16
n= gpuDeviceCount;
parameter.isGPU = 0;
gpuDevice(3);
addpath('../misc');
parameter.dimension=300;
parameter.alpha=0.01;
filename='dr0'
parameter.hidden=parameter.dimension;
parameter.lstm_out_tanh=0;
parameter.layer_num=1;
parameter.Initial=0.1;
parameter.class=5;
para... |
github | jiweil/Sequence-Models-on-Stanford-Treebank-master | Backward.m | .m | Sequence-Models-on-Stanford-Treebank-master/Bi_LSTM/Backward.m | 5,204 | utf_8 | 1097fc85625b79f228bff624e21fc670 | function[grad]=Backward(batch,grad,parameter,lstms,all_c_t,lstms_r,all_c_t_r)
N=size(batch.Word,1);
T=batch.MaxLen;
zeroState=zeroMatrix([parameter.hidden,N]);
dh = cell(parameter.layer_num, 1);
dc = cell(parameter.layer_num, 1);
for ll=1:parameter.layer_num
grad.W{ll}=zeroMatrix(siz... |
github | jiweil/Sequence-Models-on-Stanford-Treebank-master | HierLSTM.m | .m | Sequence-Models-on-Stanford-Treebank-master/Hier_Bi_LSTM/HierLSTM.m | 10,751 | utf_8 | 439f5ceda1207519dbd2f73c7aef4d3b | function[]=HierLSTM()
clear;
n= gpuDeviceCount;
parameter.isGPU = 0;
if n>0 % GPU exists
parameter.isGPU = 1;
gpuDevice(1);
else
print('no gpu ! ! ! ! !');
end
addpath('../misc');
parameter.dimension=30;
parameter.alpha=0.05;
% learning rate
parameter.layer_num=2;
% number of layer for word composition... |
github | jiweil/Sequence-Models-on-Stanford-Treebank-master | Backward.m | .m | Sequence-Models-on-Stanford-Treebank-master/Hier_Bi_LSTM/Backward.m | 7,732 | utf_8 | b4b282b4fb5b88818520fc87f051e20b | function[grad]=Backward(batch,grad,result,parameter)
% backward propagation to clause level
grad=Backward_Sen(batch,grad,result,parameter);
% backward propagation to word level
grad=Backward_Word(batch,grad,result,parameter);
grad=Normalize(grad,batch,parameter);
end
function[grad]=Normalize(grad,b... |
github | csdms-contrib/topotoolbox-master | flowpathapp.m | .m | topotoolbox-master/flowpathapp.m | 34,896 | utf_8 | 734cc80dd560b49bdaa6670114a8d62f | function flowpathapp(FD,DEM,S)
%FLOWPATHAPP Map, visualize and export flowpaths that start at manually set channelheads
%
% Syntax
%
% flowpathapp
% flowpathapp(FD,DEM)
% flowpathapp(FD,DEM,S)
%
% Description
%
% flowpathapp provides an interactive tool to visualize and generate
% flow paths o... |
github | csdms-contrib/topotoolbox-master | mappingapp.m | .m | topotoolbox-master/mappingapp.m | 14,821 | utf_8 | ffe073ffbfeb9ca660c30b6d55805d19 | function mappingapp(DEM,S,varargin)
% map knickpoints combining planform and profile view
%
% Syntax
%
% mappingapp(DEM,S)
%
% Description
%
% This light-weight tool enables mapping points in planform and profile
% view simultaneously based on a digital elevation model (DEM) and a
% stream network (S).... |
github | csdms-contrib/topotoolbox-master | STREAMobj2cell.m | .m | topotoolbox-master/@STREAMobj/STREAMobj2cell.m | 11,145 | utf_8 | 2c3e536a80b6350646f0a5c4f1e78576 | function [CS,locS,order] = STREAMobj2cell(S,ref,n)
%STREAMOBJ2CELL convert instance of STREAMobj to cell array of stream objects
%
% Syntax
%
% CS = STREAMobj2cell(S)
% CS = STREAMobj2cell(S,'outlets')
% CS = STREAMobj2cell(S,'tributaries')
% CS = STREAMobj2cell(S,'channelheads')
% CS = STREAMobj2c... |
github | csdms-contrib/topotoolbox-master | crsapp.m | .m | topotoolbox-master/@STREAMobj/crsapp.m | 9,021 | utf_8 | 2e3923689f7f7f669f2e50fc615f2557 | function crsapp(S,DEM)
%CRSAPP interactive smoothing of river long profiles
%
% Syntax
%
% crsapp(S,DEM)
%
% Description
%
% CRSAPP is an interactive tool to visually assess the results of the
% function STREAMobj/crs. You can export the results and the parameters
% to the workspace.
%
% The graphi... |
github | csdms-contrib/topotoolbox-master | knickpointfinder.m | .m | topotoolbox-master/@STREAMobj/knickpointfinder.m | 9,830 | utf_8 | 0874c8247d46fd1a27df15a28216ed92 | function [zs,kp] = knickpointfinder(S,DEM,varargin)
%KNICKPOINTFINDER find knickpoints in river profiles
%
% Syntax
%
% [zk,kp] = knickpointfinder(S,DEM)
% [zk,kp] = knickpointfinder(S,z)
% [zk,kp] = knickpointfinder(...,pn,pv,...)
%
% Description
%
% Rivers that adjust to changing base levels or have ... |
github | csdms-contrib/topotoolbox-master | modify.m | .m | topotoolbox-master/@STREAMobj/modify.m | 19,540 | utf_8 | 4e1dc7576aeaecdf0136f7d7bb376582 | function [Sout,nalix] = modify(S,varargin)
%MODIFY modify instance of STREAMobj to meet user-defined criteria
%
% Syntax
%
% S2 = modify(S,pn,pv)
% [S2,nalix] = ...
%
% Description
%
% The function modify changes the geometry of a stream network to meet
% different user-defined criteria. See
%
% de... |
github | csdms-contrib/topotoolbox-master | plot.m | .m | topotoolbox-master/@STREAMobj/plot.m | 3,874 | utf_8 | 100b5f9ed345a98e7bd8bd286eba6fc4 | function h = plot(S,varargin)
%PLOT plot instance of STREAMobj
%
% Syntax
%
% plot(S)
% plot(S,...)
% h = ...;
%
% Description
%
% plot overloads the builtin plot command and graphically outputs the
% stream network in S. Additional plot options can be set in the same
% way as with the builtin ... |
github | csdms-contrib/topotoolbox-master | labelreach.m | .m | topotoolbox-master/@STREAMobj/labelreach.m | 4,399 | utf_8 | e9ed777e70d697c79be738a328f49925 | function [label,varargout] = labelreach(S,varargin)
%LABELREACH create node-attribute list with labelled reaches
%
% Syntax
%
% label = labelreach(S)
% label = labelreach(S,pn,pv,...)
% [label,ix] = ...
% [label,x,y] = ...
%
% Description
%
% labelreach creates a node attribute list where each elem... |
github | csdms-contrib/topotoolbox-master | binarize.m | .m | topotoolbox-master/@STREAMobj/binarize.m | 2,128 | utf_8 | 5624f214e918f9062c23dcc030fb7918 | function S = binarize(S,a)
%BINARIZE Make a stream network a strictly binary tree
%
% Syntax
%
% S2 = binarize(S)
% S2 = binarize(S,a)
%
% Description
%
% Stream networks are commonly binary trees. This means that, when
% moving upstream, a stream branches into a two streams. However, there
% are ca... |
github | csdms-contrib/topotoolbox-master | getlocation.m | .m | topotoolbox-master/@STREAMobj/getlocation.m | 6,678 | utf_8 | a21f2338872b1a7706f3c06f49b42e97 | function varargout = getlocation(S,d0,varargin)
%GETLOCATION Get locations along a stream network
%
% Syntax
%
% [x,y,value] = getlocation(S,val)
% [x,y,value] = getlocation(S,val,'value',S.distance)
% [P,value] = getlocation(...,'output','PPS','z',DEM)
% [xc,yc,value] = getlocation(...,'o... |
github | csdms-contrib/topotoolbox-master | crslin.m | .m | topotoolbox-master/@STREAMobj/crslin.m | 12,568 | utf_8 | 2fd3709790684c8985bf919a1f0899da | function [zs,exitflag,output] = crslin(S,DEM,varargin)
%CRSLIN constrained regularized smoothing of the channel length profile
%
% Syntax
%
% zs = crslin(S,DEM)
% zs = crslin(S,DEM,pn,pv,...)
%
% Description
%
% Elevation values along stream networks are frequently affected by
% large scatter, often as... |
github | csdms-contrib/topotoolbox-master | STREAMobj2mapstruct.m | .m | topotoolbox-master/@STREAMobj/STREAMobj2mapstruct.m | 18,292 | utf_8 | 6f517eed0d2304432b7f2490e393475c | function [GS,x,y] = STREAMobj2mapstruct(S,varargin)
%STREAMOBJ2MAPSTRUCT convert instance of STREAMobj to mapstruct
%
% Syntax
%
% MS = STREAMobj2mapstruct(S)
% MS = STREAMobj2mapstruct(S,type)
% MS = STREAMobj2mapstruct(S,'seglength',length,...
% 'attributes',{'fieldname1' var1 aggf... |
github | csdms-contrib/topotoolbox-master | union.m | .m | topotoolbox-master/@STREAMobj/union.m | 3,666 | utf_8 | 37cb7faf4b6966748f4eaee363a5f96b | function S = union(varargin)
%UNION merge different instances of STREAMobj into a new instance
%
% Syntax
%
% S = union(S1,S2,...)
% S = union(S1,S2,...,FD)
%
% Description
%
% union combines different instances of STREAMobj into a new STREAMobj.
%
% union(S1,S2,...) combines all instances into a new S... |
github | csdms-contrib/topotoolbox-master | netdist.m | .m | topotoolbox-master/@STREAMobj/netdist.m | 3,816 | utf_8 | fa9cee81d7efe936d657212e04678a0e | function d = netdist(S,a,varargin)
%NETDIST distance transform on a stream network
%
% Syntax
%
% d = netdist(S,a)
% d = netdist(S,ix)
% d = netdist(S,I)
% d = netdist(S,c)
% d = netdist(...,pn,pv,...)
%
% Description
%
% netdist computes the distance along a stream network S. It calculates
% ... |
github | csdms-contrib/topotoolbox-master | loessksn.m | .m | topotoolbox-master/@STREAMobj/loessksn.m | 3,522 | utf_8 | 1d2179c5f6fe2ca591572cdcf722e420 | function k = loessksn(S,DEM,A,varargin)
%LOESSKSN Loess-smoothed river steepness
%
% Syntax
%
% k = loessksn(S,DEM,A)
% k = loessksn(S,DEM,A,'pn',pv,...)
%
% Description
%
% loessksn calculates the chitransformation of the horizontal river
% coordinate. Based on the transformed coordinate, it then calc... |
github | csdms-contrib/topotoolbox-master | intersect.m | .m | topotoolbox-master/@STREAMobj/intersect.m | 2,384 | utf_8 | bfb31c873cc2737ec5302fb066bd8081 | function S = intersect(varargin)
%INTERSECT intersect different instances of STREAMobj
%
% Syntax
%
% S = intersect(S1,S2,...)
%
% Description
%
% intersect combines different instances of STREAMobj into a new STREAMobj.
% All STREAMobjs must have been derived
% from the same FLOWobj (e.g., all STREAM... |
github | csdms-contrib/topotoolbox-master | densify.m | .m | topotoolbox-master/@STREAMobj/densify.m | 2,449 | utf_8 | 4b475448dfd27966658ecbfe4ca50e58 | function varargout = densify(S,spacing)
%DENSIFY Increase number of vertices in stream network using splines
%
% Syntax
%
% [x,y] = densify(S,spacing)
% MS = densify(S,spacing)
%
% Description
%
% This function increases the number of vertices in a stream network
% (STREAMobj) using spline interpola... |
github | csdms-contrib/topotoolbox-master | mnoptim.m | .m | topotoolbox-master/@STREAMobj/mnoptim.m | 7,461 | utf_8 | 367778c000e27de046274a6a31e5aca0 | function [mn,results] = mnoptim(S,DEM,A,varargin)
%MNOPTIM Bayesian optimization of the mn ratio
%
% Syntax
%
% [mn,results] = mnoptim(S,DEM,A)
% [mn,results] = mnoptim(S,z,a)
% [mn,results] = mnoptim(...,pn,pv,...)
%
% Description
%
% mnoptim uses Bayesian optimization to find an optimal mn-ratio b... |
github | csdms-contrib/topotoolbox-master | sinuosity.m | .m | topotoolbox-master/@STREAMobj/sinuosity.m | 1,689 | utf_8 | c99b8b777c1a1ad9d0192eb994281fa0 | function s = sinuosity(S,seglength)
%SINUOSITY sinuosity coefficient
%
% Syntax
%
% s = sinuosity(S,seglength)
%
% Description
%
% The sinuosity is the actual river length divided by the shortest path
% length. This function calculates the sinuosity for a streamnetwork S
% along segments of the networ... |
github | csdms-contrib/topotoolbox-master | chiplot.m | .m | topotoolbox-master/@STREAMobj/chiplot.m | 11,090 | utf_8 | bf9ff7d979f1e4c704452a78550e777e | function OUT = chiplot(S,DEM,A,varargin)
%CHIPLOT CHI analysis for bedrock river analysis
%
% Syntax
%
% C = chiplot(S,DEM,A)
% C = chiplot(S,z,a)
% C = chiplot(S,DEM,A,pn,pv,...)
%
% Description
%
% CHI plots are an alternative to slope-area plots for bedrock river
% analysis. CHI plots are based ... |
github | csdms-contrib/topotoolbox-master | mnoptimvar.m | .m | topotoolbox-master/@STREAMobj/mnoptimvar.m | 5,058 | utf_8 | 5b0db0503d47a7470bccd2d10d0abf32 | function [mn,cm,zm,zsd] = mnoptimvar(S,DEM,A,varargin)
%MNOPTIMVAR optimize the mn ratio using minimum variance method
%
% Syntax
%
% mn = mnoptimvar(S,DEM,A)
% mn = mnoptimvar(S,z,a)
% mn = mnoptimvar(...,pn,pv,...)
% [mn,cm,zm,zsd] = ...
%
% Description
%
% mnoptimvar finds an optimal value of th... |
github | csdms-contrib/topotoolbox-master | extractconncomps.m | .m | topotoolbox-master/@STREAMobj/extractconncomps.m | 3,753 | utf_8 | 97cbe0629081a02fb8b9da18f269a4d0 | function extractconncomps(S)
%EXTRACTCONNCOMPS interactive stream network selection
%
% Syntax
%
% extractconncomps(S)
%
% Description
%
% extractconncomps displays a figure and plots the stream network S.
% Here you can mouse-select individual connected components and export
% them to the workspace.
%... |
github | csdms-contrib/topotoolbox-master | funerosion_impnlin_par.m | .m | topotoolbox-master/ttlem/private/funerosion_impnlin_par.m | 2,828 | utf_8 | 75783ec5ffdbd652177ac64e859f9fc5 | function Z = funerosion_impnlin_par(p,Z,dt, A, S,upl)
% Implicit solution for nonlinear river incision (parallel)
%
% Syntax
%
% Z = funerosion_impnlin_par(n,Z,dt, A, i,k,dx_ik)
%
%
% Description
%
% Implicit solution for nonlinear river incision, calculated by
% solving the Stream Power Law. This sch... |
github | csdms-contrib/topotoolbox-master | linearDiffusion.m | .m | topotoolbox-master/ttlem/private/linearDiffusion.m | 1,066 | utf_8 | a46308e5bb228e8e7802b4197c983afd | function DEM=linearDiffusion(DEM,EYE,p,dx2,C,nrc,L,dt)
% Calcualte linear diffusion using a Crank-Nicolson method
%
% Syntax
%
% DEM_D=linearDiffusion(DEM,EYE,p,dx2,C,nrc,L,dt)
%
% Description
%
% Calcualte linear diffusion using a Crank-Nicholson method
%
% Input
%
% DEM DEM (digital elevation ... |
github | csdms-contrib/topotoolbox-master | get1up1down.m | .m | topotoolbox-master/ttlem/private/get1up1down.m | 547 | utf_8 | 7f144c307f5574263fd607040a1b3888 | function [ii,kk] = get1up1down(i,k,A)
% get receiver of receiver and giver of giver...
% ii and kk will have nans where neighbors do not exist, % either because, there is none % or because the upstream node has a smaller % contribution area.
i = double(i);
k = double(k);
nrc = numel(A);
% Downstream neighbor
kk = na... |
github | csdms-contrib/topotoolbox-master | preparegui.m | .m | topotoolbox-master/ttlem/private/preparegui.m | 2,542 | utf_8 | 10288e915c28ef730d714cbaddb6ddef | function hGUI = preparegui(H1)
% prepare GUI for TTLEM
%
% Syntax
%
% hGui = preparegui(H1)
%
%
% create figure with panels
hGUI.fig = figure('Name','TTLEM',...
'NumberTitle','off',...
'Toolbar','none',...
'MenuBar','none',...
'V... |
github | csdms-contrib/topotoolbox-master | BC_Disturbance.m | .m | topotoolbox-master/ttlem/LateralDisplacement/BC_Disturbance.m | 847 | utf_8 | 09c6b42e1aae00bfdf74fae8b2672974 | %TODO define seperate BCs for edges (eg. combination of Neuman and Dirichlet etc. )
function u_g= BC_Disturbance(u_g,distSites,BC)
if any(strcmp(distSites,{'l','lr','tl','bl','tblr'}))
u_g(BC.BC_indices.leftRow)=u_g(BC.BC_indices.leftRow).*rand(size(u_g(BC.BC_indices.leftRow)))*BC.BC_dir_Dist_Value;
end
if any(st... |
github | csdms-contrib/topotoolbox-master | dpsimplify.m | .m | topotoolbox-master/utilities/dpsimplify.m | 6,439 | utf_8 | 520039e696aaacc7377a4ba3f7f12ebe | function [ps,ix] = dpsimplify(p,tol)
% Recursive Douglas-Peucker Polyline Simplification, Simplify
%
% [ps,ix] = dpsimplify(p,tol)
%
% dpsimplify uses the recursive Douglas-Peucker line simplification
% algorithm to reduce the number of vertices in a piecewise linear curve
% according to a specified tolerance. The a... |
github | csdms-contrib/topotoolbox-master | ylinerel.m | .m | topotoolbox-master/utilities/ylinerel.m | 2,150 | utf_8 | 1ae474bcc6273835c08434daf19f2ece | function ht = ylinerel(values,rel,varargin)
%YLINEREL Plot vertical lines with constant y values and relative length
%
% Syntax
%
% ylinerel(y)
% ylinerel(y, fraction, pn, pv)
%
% Description
%
% ylinerel plots vertical lines at the values y with length (or
% positions) relative to the limits of the x-... |
github | csdms-contrib/topotoolbox-master | subplotlabel.m | .m | topotoolbox-master/utilities/subplotlabel.m | 10,762 | utf_8 | 3ef341b52695a23e1cff8f17484b8653 | classdef subplotlabel < handle
%SUBPLOTLABEL Label subplots (works only for 2D plots so far)
%
% Syntax
%
% h = subplotlabel(ax,letter)
% h = subplotlabel(fig,letter)
% h = subplotlabel(...,pn,pv,...)
%
% Description
%
% subplotlabel adds labels to the corner of each panel of a composite
% figu... |
github | csdms-contrib/topotoolbox-master | ginputc.m | .m | topotoolbox-master/utilities/ginputc.m | 14,143 | utf_8 | a450a3853eafb56c18eae28bedda2956 |
function [x, y, button, ax] = ginputc(varargin)
%GINPUTC Graphical input from mouse.
% GINPUTC behaves similarly to GINPUT, except you can customize the
% cursor color, line width, and line style.
%
% [X,Y] = GINPUTC(N) gets N points from the current axes and returns
% the X- and Y-coordinates in length N vect... |
github | csdms-contrib/topotoolbox-master | label2poly.m | .m | topotoolbox-master/utilities/label2poly.m | 3,316 | utf_8 | b33b9f4de3cb8d7c5dab5a3e1535c89d | function [xy,Adj] = label2poly(L,X,Y,c)
% plot region outlines with polyline
%
% Syntax
%
% label2poly(L)
% label2poly(L,X,Y)
% [xy,Adj] = label2poly(...)
%
% Description
%
% label2poly extracts the outlines of regions in a label matrix and
% plots them. The outlines are drawn along the pixel edge... |
github | csdms-contrib/topotoolbox-master | niceticks.m | .m | topotoolbox-master/utilities/niceticks.m | 2,608 | utf_8 | 34d0f23a2cc44119e26ffca9e835359e | function niceticks(ax,varargin)
%NICETICKS Makes nice ticks in a 2D plot
%
% Syntax
%
% niceticks
% niceticks(ax)
% niceticks(ax,pn,pv,...)
%
% Description
%
% Coordinate values are often quite large numbers which are displayed
% with an exponent along the graphics axes. This function identifi... |
github | csdms-contrib/topotoolbox-master | xlinerel.m | .m | topotoolbox-master/utilities/xlinerel.m | 2,174 | utf_8 | 37a9fd9de56f5f3d40109d94423c8a13 | function ht = xlinerel(values,rel,varargin)
%XLINEREL Plot vertical lines with constant x values and relative length
%
% Syntax
%
% xlinerel(x)
% xlinerel(x, fraction, pn, pv)
%
% Description
%
% xlinerel plots vertical lines at the values x with length (or
% positions) relative to the limits of the y-... |
github | csdms-contrib/topotoolbox-master | ScaleBar.m | .m | topotoolbox-master/utilities/ScaleBar.m | 14,766 | utf_8 | f427b2f29039b6551befa3179d811c51 | classdef ScaleBar < handle
%ScaleBar A dynamic scalebar
%
% Syntax
%
% SB = ScaleBar
% SB = ScaleBar(pn,pv,...)
%
% Description
%
% ScaleBar plots a dynamic scale bar in the 2D-axis. The function is
% currently beta and only supports axis with projected coordinate
% systems (no geographic coord... |
github | csdms-contrib/topotoolbox-master | ttcmap.m | .m | topotoolbox-master/colormaps/ttcmap.m | 7,409 | utf_8 | f69ae3172e6256ac1df5fa16898e307e | function [cmap,zlimits] = ttcmap(zlimits,varargin)
%TTCMAP create elevation color map optimized for elevation range
%
% Syntax
%
% [cmap,zlimits] = ttcmap(zlimits)
% [cmap,zlimits] = ttcmap(DEM)
% [cmap,zlimits] = ttcmap(...,pn,pv,...)
% ttcmap
% t = ttcmap
%
% Description
%
% TTCMAP has a... |
github | csdms-contrib/topotoolbox-master | demprofile.m | .m | topotoolbox-master/@GRIDobj/demprofile.m | 2,234 | utf_8 | ad3eb1effcb69999451ce63954a9ac00 | function [dn,z,x,y] = demprofile(DEM,n,x,y)
%DEMPROFILE get profile along path
%
% Syntax
%
% [d,z] = demprofile(DEM)
% [d,z] = demprofile(DEM,n)
% [d,z,x,y] = demprofile(DEM,n,x,y)
% p = demprofile(DEM,...)
% p = demprofile(DEM,p)
%
% Description
%
% demprofile enables to interactively... |
github | csdms-contrib/topotoolbox-master | line2GRIDobj.m | .m | topotoolbox-master/@GRIDobj/line2GRIDobj.m | 2,452 | utf_8 | fdf709803da04db01e146056e52b242f | function L = line2GRIDobj(DEM,varargin)
%LINE2GRIDOBJ convert line to a grid
%
% Syntax
%
% L = line2GRIDobj(DEM,x,y)
% L = line2GRIDobj(DEM,MS)
%
% Description
%
% line2GRIDobj grids a polyline defined by a set of x and y
% coordinates. x and y can be nan-punctuated vectors. Alternatively,
% the p... |
github | csdms-contrib/topotoolbox-master | GRIDobj.m | .m | topotoolbox-master/@GRIDobj/GRIDobj.m | 16,757 | utf_8 | 6ea7e6581d8a6516a18fa590e970ada9 | classdef GRIDobj
%GRIDobj Create instance of a GRIDobj
%
% Syntax
%
% DEM = GRIDobj(X,Y,dem)
% DEM = GRIDobj('ESRIasciiGrid.txt')
% DEM = GRIDobj('GeoTiff.tif')
% DEM = GRIDobj();
% DEM = GRIDobj([]);
% DEM = GRIDobj(FLOWobj or GRIDobj or STREAMobj,class)
%
%
% Description
%
% GRIDobj c... |
github | csdms-contrib/topotoolbox-master | surf.m | .m | topotoolbox-master/@GRIDobj/surf.m | 6,852 | utf_8 | 45f9744f3f0139f3ecfa42461f63f7f0 | function ht = surf(DEM,varargin)
%SURF surface plot for GRIDobj
%
% Syntax
%
% surf(DEM)
% surf(DEM,A)
% surf(...,pn,pv,...)
% h = ...
%
% Description
%
% surf for GRIDobj overloads the surf command and thus provides fast
% access to 3D visualization of digital elevation models. Note that
% ... |
github | csdms-contrib/topotoolbox-master | createmask.m | .m | topotoolbox-master/@GRIDobj/createmask.m | 1,576 | utf_8 | e6f1a75f902357fa601bca1fd25fc8a2 | function MASK = createmask(DEM,usehillshade)
%CREATEMASK create a binary mask using polygon mapping
%
% Syntax
%
% MASK = createmask(DEM)
% MASK = createmask(DEM,usehillshade)
%
% Description
%
% createmask is an interactive tool to create a mask based on an
% interactively mapped polygon.
%
% Input ar... |
github | csdms-contrib/topotoolbox-master | inpaintnans.m | .m | topotoolbox-master/@GRIDobj/inpaintnans.m | 7,009 | utf_8 | c6b52bf4df2d66271f2671d9281793d1 | function DEM = inpaintnans(DEM,varargin)
%INPAINTNANS interpolate missing values in a grid (GRIDobj)
%
% Syntax
%
% DEMf = inpaintnans(DEM,type)
% DEMf = inpaintnans(DEM,type,k)
% DEMf = inpaintnans(DEM,type,k,conn)
% DEMf = inpaintnans(DEM,DEM2)
% DEMf = inpaintnans(DEM,DEM2,method)
%
% Descriptio... |
github | csdms-contrib/topotoolbox-master | gradient8.m | .m | topotoolbox-master/@GRIDobj/gradient8.m | 3,766 | utf_8 | f749aa581aad377ab3f0fc89799f1c82 | function G = gradient8(DEM,unit,varargin)
%GRADIENT8 8-connected neighborhood gradient of a digital elevation model
%
% Syntax
%
% G = gradient8(DEM)
% G = gradient8(DEM,unit)
% G = gradient8(DEM,unit,pn,pv,...)
%
% Description
%
% gradient8 returns the numerical steepest downward gradient of a
% d... |
github | csdms-contrib/topotoolbox-master | acv.m | .m | topotoolbox-master/@GRIDobj/acv.m | 2,639 | utf_8 | e7dab97e537450d261af006db317e472 | function DEM = acv(DEM)
%ACV Anisotropic coefficient of variation (ACV)
%
% Syntax
%
% C = acv(DEM)
%
% Description
%
% The anisotropic coefficient of variation describes the general
% geometry of the local land surface and can be used to distinguish
% elongated from oval landforms.
%
% Input
%
% ... |
github | csdms-contrib/topotoolbox-master | curvature.m | .m | topotoolbox-master/@GRIDobj/curvature.m | 5,258 | utf_8 | 7240df0571c0bc98e4abdebd1cbae0d6 | function C = curvature(DEM,ctype,varargin)
%CURVATURE 8-connected neighborhood curvature of a digital elevation model
%
% Syntax
%
% C = curvature(DEM)
% C = curvature(DEM,type)
% C = curvature(DEM,type,pn,pv,...)
%
% Description
%
% curvature returns the second numerical derivative (curvature) o... |
github | csdms-contrib/topotoolbox-master | dist2line.m | .m | topotoolbox-master/@GRIDobj/dist2line.m | 2,592 | utf_8 | 66b36b67a419b02a052eaa562c892eff | function [D] = dist2line(DEM,x0,y0,alpha)
%DIST2LINE labels pixels in a GRIDobj by their distance to a straight line
%
% Syntax
% D = dist2line(DEM,x0,y0,alpha)
%
% Description
%
% dist2line(DEM,x0,y0,alpha) computes the orthogonal distance of each
% pixel in a GRIDobj to a line that goes through the point... |
github | csdms-contrib/topotoolbox-master | hillshade.m | .m | topotoolbox-master/@GRIDobj/hillshade.m | 4,823 | utf_8 | 717524829e593728e878154bb56ea185 | function OUT2 = hillshade(DEM,varargin)
%HILLSHADE create hillshading from a digital elevation model (GRIDobj)
%
% Syntax
%
% H = hillshade(DEM)
% H = hillshade(DEM,'pn','pv',...)
%
% Description
%
% Hillshading is a very powerful tool for relief depiction.
% hillshade calculates a shaded relief fo... |
github | csdms-contrib/topotoolbox-master | GRIDobj2polygon.m | .m | topotoolbox-master/@GRIDobj/GRIDobj2polygon.m | 7,552 | utf_8 | 2ecdf8e4bbde4f680c75082f2320b19b | function [MS,x,y] = GRIDobj2polygon(DB,varargin)
%GRIDobj2polygon Conversion from drainage basin grid to polygon or polyline
%
% Syntax
%
% MS = GRIDobj2polygon(DB)
% MS = GRIDobj2polygon(DB,pn,pv,...)
% [MS,x,y] = ...
%
% Description
%
% GRIDobj2polygon converts a GRIDobj (label grid) to a mapstruct
%... |
github | csdms-contrib/topotoolbox-master | GRIDobj2geotiff.m | .m | topotoolbox-master/@GRIDobj/GRIDobj2geotiff.m | 3,485 | utf_8 | 8ccb99afc25d3673f746f67381243357 | function GRIDobj2geotiff(A,file)
%GRIDobj2geotiff Exports an instance of GRIDobj to a geotiff file
%
% Syntax
%
% GRIDobj2geotiff(DEM)
% GRIDobj2geotiff(DEM,filename)
%
% Description
%
% GeoTIFF is a common image file format that stores coordinates and
% projection information to be read by most GI... |
github | csdms-contrib/topotoolbox-master | reclassify.m | .m | topotoolbox-master/@GRIDobj/reclassify.m | 8,427 | utf_8 | 86a039d53fdd06670c162d0c49b0c685 | function DEM = reclassify(DEM,varargin)
%RECLASSIFY generate univariate class intervals for an instance of GRIDobj
%
% Syntax
%
% C = reclassify(DEM);
% C = reclassify(DEM,'method',value)
%
% Description
%
% reclassify bins continous values of an instance of GRIDobj by setting
% class intervals based o... |
github | csdms-contrib/topotoolbox-master | polygon2GRIDobj.m | .m | topotoolbox-master/@GRIDobj/polygon2GRIDobj.m | 5,497 | utf_8 | a1e8f50f0e6880c5c9de8b91cdea53db | function P = polygon2GRIDobj(DEM,MS,field)
%POLYGON2GRIDobj convert polygon to a grid
%
% Syntax
%
% P = polygon2GRIDobj(DEM,MS)
% P = polygon2GRIDobj(DEM,MS,field)
%
% Description
%
% polygon2GRIDobj maps polygons in the mapping structure MS to a
% GRIDobj with the same extent and resolution as the G... |
github | csdms-contrib/topotoolbox-master | idw.m | .m | topotoolbox-master/@PPS/idw.m | 3,105 | utf_8 | 76959699a63701038e6ac2f02a7fe4c6 | function c = idw(P,marks,varargin)
%IDW Inverse distance weighted interpolation on stream networks
%
% Syntax
%
% c = idw(P,marks)
% c = idw(P,marks,pn,pv,...)
%
% Description
%
% idw computes an inverse distance weighted interpolation on a stream
% network. Distances are calculated as geodesic distanc... |
github | csdms-contrib/topotoolbox-master | plotdz.m | .m | topotoolbox-master/@PPS/plotdz.m | 4,600 | utf_8 | 781e021368981a4095294e1dc6360978 | function varargout = plotdz(P,varargin)
%PLOTDZ plot upstream distance version elevation or covariate of a PPS
%
% Syntax
%
% plotdz(P)
%
% Description
%
% plot distance versus elevation of points and stream network in an
% instance of PPS.
%
% Input arguments
%
% P instance of PPS (needs z-prope... |
github | csdms-contrib/topotoolbox-master | plotpoints.m | .m | topotoolbox-master/@PPS/plotpoints.m | 3,644 | utf_8 | a234be892ec75fab1559dc1bb596a2d8 | function h = plotpoints(P,varargin)
%PLOTPOINTS plot points of PPS
%
% Syntax
%
% plotpoints(P)
% plotpoints(P,'pn',pv,...)
% h = plotpoints(...)
%
% Description
%
% plotpoints plots the points of an instance of PPS. The function uses
% the build-in function scatter. Thus, it accepts all parameter
... |
github | csdms-contrib/topotoolbox-master | aggregate.m | .m | topotoolbox-master/@PPS/aggregate.m | 5,971 | utf_8 | 9e0fbc15cca218f657f3f1eb53de4631 | function [P,locb] = aggregate(P,c,varargin)
%AGGREGATE Aggregate points in PPS to new point pattern
%
% Syntax
%
% P2 = aggregate(P,c)
% P2 = aggregate(P,c,pn,pv,...)
%
% Description
%
% aggregate merges points in a PPS object to a new PPS object based on
% the labels in the marks c. The labels can b... |
github | csdms-contrib/topotoolbox-master | convhull.m | .m | topotoolbox-master/@PPS/convhull.m | 3,641 | utf_8 | 7dd0ac9cd40bcda35dd6d612617bb046 | function h = convhull(P,varargin)
%CONVHULL Convex hull around points in PPS
%
% Syntax
%
% psh = convhull(P)
% psh = convhull(P,'groups',c,'bufferwidth',bw);
% convhull(P,...)
%
% Description
%
% convhull returns the convex hull around all or groups of points in P
% as polyshape object. Without ou... |
github | csdms-contrib/topotoolbox-master | bayesloglinear.m | .m | topotoolbox-master/@PPS/bayesloglinear.m | 3,435 | utf_8 | c7b83ddd36f61b9142262c276bc748c0 | function [mdl,int,intci,predstats,rank] = bayesloglinear(P,c,varargin)
%BAYESLOGLINEAR Bayesian analysis of a loglinear point process model
%
% Syntax
%
% [mdl,int,intci,predstats] = bayesloglinear(P,c,pn,pv,...)
%
% Description
%
% Loglinear models embrace numerous models that can be fitted to
% homogene... |
github | csdms-contrib/topotoolbox-master | fitloglinear.m | .m | topotoolbox-master/@PPS/fitloglinear.m | 4,201 | utf_8 | 3ef47df48cfaf98672497101fe806135 | function [mdl,int,rts] = fitloglinear(P,c,varargin)
%FITLOGLINEAR fit loglinear model to point pattern
%
% Syntax
%
% [mdl,int] = fitloglinear(P,c)
% [mdl,int] = fitloglinear(P,c,pn,pv,...)
% [mdl,int,mx] = ...
%
% Description
%
% Loglinear models embrace numerous models that can be fitted to
% hom... |
github | csdms-contrib/topotoolbox-master | ploteffects.m | .m | topotoolbox-master/@PPS/ploteffects.m | 4,474 | utf_8 | 2ac2470dcf1b4e94ab9109a3d11676f9 | function ploteffects(P,mdl,varargin)
%PLOTEFFECTS Plot of slices through fitted generalized linear regression
%
% Syntax
%
% ploteffects(P,mdl)
% ploteffects(P,mdl,covariate)
%
% Description
%
% ploteffects plots the individual effects of a loglinear point process
% model.
%
% Input arguments
%
% P... |
github | csdms-contrib/topotoolbox-master | dpsimplify.m | .m | topotoolbox-master/GIStools/dpsimplify.m | 6,439 | utf_8 | 520039e696aaacc7377a4ba3f7f12ebe | function [ps,ix] = dpsimplify(p,tol)
% Recursive Douglas-Peucker Polyline Simplification, Simplify
%
% [ps,ix] = dpsimplify(p,tol)
%
% dpsimplify uses the recursive Douglas-Peucker line simplification
% algorithm to reduce the number of vertices in a piecewise linear curve
% according to a specified tolerance. The a... |
github | csdms-contrib/topotoolbox-master | zonalstats.m | .m | topotoolbox-master/GIStools/zonalstats.m | 8,351 | utf_8 | aa96dc0495b5d1116abe4d7731963f79 | function MS = zonalstats(MS,attributes,varargin)
%ZONALSTATS Zonal statistics
%
% Syntax
%
% MS = zonalstats(MS)
% MS = zonalstats(MS,{varname1, vargrid1, varfun1, ...
% varname2, vargrid1, varfun2, ...})
% MS = zonalstats(MS,{varname1, vargrid1, varfun1, ...
% ... |
github | csdms-contrib/topotoolbox-master | readopentopo.m | .m | topotoolbox-master/IOtools/readopentopo.m | 8,912 | utf_8 | db44d3a4270723e290f6f3d131a22399 | function DEM = readopentopo(varargin)
%READOPENTOPO read DEM using the opentopography.org API
%
% Syntax
%
% DEM = readopentopo(pn,pv,...)
%
% Description
%
% readopentopo reads DEMs from opentopography.org using the API
% described on:
% http://www.opentopography.org/developers
% The DEM comes in ... |
github | csdms-contrib/topotoolbox-master | FLOWobj2cell.m | .m | topotoolbox-master/@FLOWobj/FLOWobj2cell.m | 1,882 | utf_8 | 71c4541d170224c2ef6dc4d5e647e544 | function [CFD,D,A,cfix] = FLOWobj2cell(FD,IX)
%FLOWOBJ2CELL return cell array of FLOWobjs for individual drainage basins
%
% Syntax
%
% CF = FLOWobj2cell(FD)
% [CF,D,a] = FLOWobj2cell(FD)
% [CF,D,a,cfix] = FLOWobj2cell(FD,IX)
%
% Description
%
% FLOWobj2cell derives a cell array of FLOWobjs for each in... |
github | csdms-contrib/topotoolbox-master | flow_matrix.m | .m | topotoolbox-master/@FLOWobj/private/flow_matrix.m | 10,451 | utf_8 | 7ad31c1c00660f3f2280acc9832bdce9 | function T = flow_matrix(E, R, d1, d2)
%flow_matrix System of linear equations representing pixel flow
%
% T = flow_matrix(E, R) computes a sparse linear system representing flow from
% pixel to pixel in the DEM represented by the matrix of height values, E. R
% is the matrix of pixel flow directions as computed... |
github | csdms-contrib/topotoolbox-master | routeflats.m | .m | topotoolbox-master/@FLOWobj/private/routeflats.m | 5,974 | utf_8 | 411ad344f47b1cadb9c82e6c107a56eb | function [IXf,IXn] = routeflats(dem,type)
% route through flats of a digital elevation model
%
% Syntax
%
% [IXf,IXn] = routeflats(dem,type)
%
% Description
%
% routeflats is a subroutine used by some of the flowdirection
% algorithms in the toolbox. routeflats recursively creates flow paths
% through... |
github | csdms-contrib/topotoolbox-master | jctcon.m | .m | topotoolbox-master/@DIVIDEobj/jctcon.m | 3,625 | utf_8 | 07d3aab34aad2e41e9ca2f7232a14b26 | function [CJ,varargout] = jctcon(D,varargin)
%JCTCON compute junction connectivity
%
% Syntax
%
% CJ = jctcon(D)
% CJ = jctcon(D,maxdist)
% [CJ,x,y] = jctcon(D)
%
%
% Description
%
% JCTCON computes the junction connectivity for junctions provided by
% the linear indices in ixj... |
github | csdms-contrib/topotoolbox-master | DIVIDEobj2mapstruct.m | .m | topotoolbox-master/@DIVIDEobj/DIVIDEobj2mapstruct.m | 11,951 | utf_8 | d2d9ab5c45b3649f93c78ffacc502f96 | function MS = DIVIDEobj2mapstruct(D,DEM,seglen,varargin)
%DIVIDEPROPS obtain divide properties from GRIDobj
%
% Syntax
%
% D = DIVIDEobj2mapstruct(D,DEM,seglength)
% D = DIVIDEobj2mapstruct(D,DEM,seglength,...
% {'fieldname1' var1 aggfunction1},...
% {'fieldname2' var2 aggfunction2})
%
%... |
github | daniel-e/rustml-master | xor_dataset.m | .m | rustml-master/prototyping/xor_dataset.m | 750 | utf_8 | d1b5588313fb4f813bb2098f1f72224b | % [x, y] = xor_dataset(n)
%
% Creates a dataset where points are normally distributed around
% the coordinates (0,0), (1,0), (0,1) and (1,1). The number of
% points around each coordinate is specified by the parameter n.
%
% RETURNS
%
% x A matrix which contains in each row the coordinates of one point.
% y A co... |
github | daniel-e/rustml-master | l6_dataset.m | .m | rustml-master/prototyping/l6_dataset.m | 937 | utf_8 | f8e34332bbb098dec0282170fa98c045 | % [x, y] = l6_dataset(n)
%
% Creates a dataset where points are normally distributed around
% the coordinates (0,0), (1,0), (0,1) and (1,1). The number of
% points around each coordinate is specified by the parameter n.
%
% RETURNS
%
% x A matrix which contains in each row the coordinates of one point.
% y A col... |
github | daniel-e/rustml-master | plot_dataset.m | .m | rustml-master/prototyping/plot_dataset.m | 711 | utf_8 | 3ac7b7392e0ded3418863b60fbeb3fec | % plot_dataset(x, y)
%
% Creates a two-dimensional plot of the points in x with the labels in y.
%
%
% RETURNS
%
% x A matrix which contains in each row the coordinates of one point.
% y A column vector which contains the labels for the points.
function plot_dataset(x, y)
colors = [
1, 1, 0;
1, 0, 0;
0,... |
github | daniel-e/rustml-master | l4_dataset.m | .m | rustml-master/prototyping/l4_dataset.m | 755 | utf_8 | 3ab3ea44551d162f918920db291296ed | % [x, y] = l4_dataset(n)
%
% Creates a dataset where points are normally distributed around
% the coordinates (0,0), (1,0), (0,1) and (1,1). The number of
% points around each coordinate is specified by the parameter n.
%
% RETURNS
%
% x A matrix which contains in each row the coordinates of one point.
% y A col... |
github | daniel-e/rustml-master | nn_train.m | .m | rustml-master/prototyping/nn_train.m | 1,165 | utf_8 | a9ff022a4daa936a641303346f85d67f | % TODO doc, iter, alpha
function [p1, p2, err] = nn_train(x, y, settings)
iter = settings.iter;
alpha = settings.alpha;
i = settings.input;
h = settings.hidden;
o = settings.output;
if isfield(settings, 'progress')
w = waitbar(0);
end
% number of examples
m = size(x, 1);
% parameters from input layer to h... |
github | daniel-e/rustml-master | nn_predict.m | .m | rustml-master/prototyping/nn_predict.m | 144 | utf_8 | 6ee79934cbf831f3fbb2bf654c57f17e | % TODO doc
function [label] = nn_predict(p1, p2, x)
z2 = p1 * x(:);
a2 = [1; sigmoid(z2)];
z3 = p2 * a2;
a3 = sigmoid(z3);
label = a3;
end
|
github | wenwei202/caffe-master | classification_demo.m | .m | caffe-master/matlab/demo/classification_demo.m | 5,412 | utf_8 | 8f46deabe6cde287c4759f3bc8b7f819 | function [scores, maxlabel] = classification_demo(im, use_gpu)
% [scores, maxlabel] = classification_demo(im, use_gpu)
%
% Image classification demo using BVLC CaffeNet.
%
% IMPORTANT: before you run this demo, you should download BVLC CaffeNet
% from Model Zoo (http://caffe.berkeleyvision.org/model_zoo.html)
%
% *****... |
github | feng1008/image-retrieval-based-on-BOF-model-master | cbires.m | .m | image-retrieval-based-on-BOF-model-master/cbires.m | 15,326 | utf_8 | 31878ccd9cf0229a8efb02af7b06bbaa | function varargout = cbires(varargin)
% CBIRES MATLAB code for cbires.fig
% CBIRES, by itself, creates a new CBIRES or raises the existing
% singleton*.
%
% H = CBIRES returns the handle to a new CBIRES or the handle to
% the existing singleton*.
%
% CBIRES('CALLBACK',hObject,eventData,handles,... |
github | feng1008/image-retrieval-based-on-BOF-model-master | find_sift_grid.m | .m | image-retrieval-based-on-BOF-model-master/BOW/find_sift_grid.m | 4,155 | utf_8 | 0089f72da820ec4f89e58e0444b10062 | function sift_arr = sp_find_sift_grid(I, grid_x, grid_y, patch_size, sigma_edge)
% parameters
num_angles = 8;
num_bins = 4;
num_samples = num_bins * num_bins;
alpha = 9;
if nargin < 5
sigma_edge = 1;
end
angle_step = 2 * pi / num_angles;
angles = 0:angle_step:2*pi;
angles(num_angles+1) = []; % bin centers
[hgt ... |
github | rnsandeep/ObjectDetection-master | voc_eval.m | .m | ObjectDetection-master/tf-faster-rcnn/lib/datasets/VOCdevkit-matlab-wrapper/voc_eval.m | 1,332 | utf_8 | 3ee1d5373b091ae4ab79d26ab657c962 | function res = voc_eval(path, comp_id, test_set, output_dir)
VOCopts = get_voc_opts(path);
VOCopts.testset = test_set;
for i = 1:length(VOCopts.classes)
cls = VOCopts.classes{i};
res(i) = voc_eval_cls(cls, VOCopts, comp_id, output_dir);
end
fprintf('\n~~~~~~~~~~~~~~~~~~~~\n');
fprintf('Results:\n');
aps = [res(:... |
github | bearshen/object_detection-master | use_cimgmatlab.m | .m | object_detection-master/libs/CImg/examples/use_cimgmatlab.m | 1,242 | utf_8 | c7cefea57d7bf6077ec6a77f3bdda6b6 | /*-----------------------------------------------------------------------
File : use_cimgmatlab.m
Description: Example of use for the CImg plugin 'plugins/cimgmatlab.h'
which allows to use CImg in order to develop matlab external
functions (mex functions).
User should be familiar with Matlab C/C++ mex functi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.