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 | limosek/somtoolbox-master | som_stats_table.m | .m | somtoolbox-master/som_stats_table.m | 3,686 | utf_8 | 6912c6255f426f76c05980ec23e6fc9e | function [sTstats,csThist] = som_stats_table(csS,histlabel)
%SOM_STATS_TABLE Statistics table.
%
% [sTstats,csThist] = som_stats_table(csS)
%
% sTstats = som_stats_table(csS);
% som_table_print(sTstats);
%
% Input and output arguments ([]'s are optional):
% csS (cell array) of statistics struct... |
github | limosek/somtoolbox-master | som_barplane.m | .m | somtoolbox-master/som_barplane.m | 13,956 | utf_8 | 51eb9bd26d321d69dc1ab4e877471271 | function h = som_barplane(varargin)
%SOM_BARPLANE Visualize the map prototype vectors as bar charts
%
% h = som_barplane(lattice, msize, data, [color], [scaling], [gap], [pos])
% h = som_barplane(topol, data, [color], [scaling], [gap], [pos])
%
% som_barplane('hexa',[5 5], rand(25,4), jet(4))
% som_barplane(sM, sM.... |
github | limosek/somtoolbox-master | som_recolorbar.m | .m | somtoolbox-master/som_recolorbar.m | 12,445 | utf_8 | 6d85fa6f4b95de0c96b2845e2299f2b3 | function h=som_recolorbar(p, ticks, scale, labels)
%SOM_RECOLORBAR Refresh and rescale colorbars in the current SOM_SHOW fig.
%
% h = som_recolorbar([p], [ticks], [scaling], [labels])
%
% colormap(jet); som_recolorbar
%
% Input and output arguments ([]'s are optional)
% [p] (vector) subplot number vector ... |
github | limosek/somtoolbox-master | som_show.m | .m | somtoolbox-master/som_show.m | 28,146 | utf_8 | 0e04fdeae682e2ffa5ba8ccb2567fa00 | function h=som_show(sMap, varargin)
% SOM_SHOW Basic SOM visualizations: component planes, u-matrix etc.
%
% h = som_show(sMap, ['argID', value, ...])
%
% som_show(sMap);
% som_show(sMap,'bar','none');
% som_show(sMap,'comp',[1:3],'umat','all');
% som_show(sMap,'comp',[1 2],'umat',{[1 2],'1,2 only'},'comp',[3:6])... |
github | limosek/somtoolbox-master | som_show_gui.m | .m | somtoolbox-master/som_show_gui.m | 21,169 | utf_8 | 92c6824c0daccf472eccf0142830e161 | function fig = som_show_gui(input,varargin)
%SOM_SHOW_GUI A GUI for using SOM_SHOW and associated functions.
%
% h = som_show_gui(sM);
%
% Input and output arguments:
% sM (struct) a map struct: the SOM to visualize
% h (scalar) a handle to the GUI figure
%
% This is a graphical user interface to make... |
github | limosek/somtoolbox-master | som_label.m | .m | somtoolbox-master/som_label.m | 9,508 | utf_8 | 3899000deb2bd3937a02621c28dd6611 | function [sTo] = som_label(sTo, mode, inds, labels)
%SOM_LABEL Give/clear labels to/from map or data struct.
%
% sTo = som_label(sTo, mode, inds [, labels])
%
% sD = som_label(sD,'add',20,'a_label');
% sM = som_label(sM,'replace',[2 4],'a_label');
% sM = som_label(sM,'add',som_bmus(sM,x),'BMU');
% sD = som_la... |
github | limosek/somtoolbox-master | som_clset.m | .m | somtoolbox-master/som_clset.m | 10,183 | utf_8 | d02fcc3aa7ffd4487436a7526e4067d3 | function [sC,old2new,newi] = som_clset(sC,action,par1,par2)
% SOM_CLSET Create and/or set values in the som_clustering struct.
%
% first argument
% sC (struct) a som_clustering struct
% Z (matrix) size nb-1 x 3, as given by LINKAGE function
% base (vector) size dlen x 1, a partiti... |
github | limosek/somtoolbox-master | sompak_init.m | .m | somtoolbox-master/sompak_init.m | 6,131 | utf_8 | 633cd16812fd4c272ab37834420b6ae5 | function sMap=sompak_init(sData,ft,init_type,cout,ct,xdim,ydim,topol,neigh)
%SOMPAK_INIT Call SOM_PAK initialization programs from Matlab.
%
% sMap=sompak_init(sData,ft,init_type,cout,ct,xdim,ydim,topol,neigh)
%
% ARGUMENTS ([]'s are optional and can be given as empty: [] or '')
% sData (struct) data struct
% ... |
github | limosek/somtoolbox-master | som_distortion3.m | .m | somtoolbox-master/som_distortion3.m | 5,405 | utf_8 | cc0b47113a8d2f1b6bc8992df977f735 | function [Err,sPropTotal,sPropMunits,sPropComps] = som_distortion3(sM,D,rad)
%SOM_DISTORTION3 Map distortion measures.
%
% [sE,Err] = som_distortion3(sM,[D],[rad]);
%
% sE = som_distortion3(sM);
%
% Input and output arguments ([]'s are optional):
% sM (struct) map struct
% [D] (matrix) a ma... |
github | limosek/somtoolbox-master | som_drmake.m | .m | somtoolbox-master/som_drmake.m | 5,522 | utf_8 | 498afb5b0252180a83fe7653a22cc910 | function [sR,best,sig,Cm] = som_drmake(D,inds1,inds2,sigmea,nanis)
% SOM_DRMAKE Make descriptive rules for given group within the given data.
%
% sR = som_drmake(D,[inds1],[inds2],[sigmea],[nanis])
%
% D (struct) map or data struct
% (matrix) the data, of size [dlen x dim]
% [inds1] (vector) ind... |
github | limosek/somtoolbox-master | preprocess.m | .m | somtoolbox-master/preprocess.m | 177,114 | utf_8 | 70cb0623fde982354f2e9cb65669548c | function preprocess(sData,arg2)
%PREPROCESS A GUI for data preprocessing.
%
% preprocess(sData)
%
% preprocess(sData)
%
% Launches a preprocessing GUI. The optional input argument can be
% either a data struct or a struct array of such. However, primarily
% the processed data sets are loaded to the application us... |
github | limosek/somtoolbox-master | som_kmeans.m | .m | somtoolbox-master/som_kmeans.m | 4,247 | utf_8 | 8fd568079b3daefedc13f7bba8f3e450 | function [codes,clusters,err] = som_kmeans(method, D, k, epochs, verbose)
% SOM_KMEANS K-means algorithm.
%
% [codes,clusters,err] = som_kmeans(method, D, k, [epochs], [verbose])
%
% Input and output arguments ([]'s are optional):
% method (string) k-means algorithm type: 'batch' or 'seq'
% D (ma... |
github | limosek/somtoolbox-master | sompak_rb_control.m | .m | somtoolbox-master/sompak_rb_control.m | 7,251 | utf_8 | 4b1db407a9f343cd7d82ccfa3cc3b5e5 | function varargout=sompak_rb_control(str)
%SOMPAK_RB_CONTROL An auxiliary function for SOMPAK_*_GUI functions.
%
% This is an auxiliary function for SOMPAK_GUI, SOMPAK_INIT_GUI,
% SOMPAK_SAMMON_GUI and SOMPAK_TRAIN_GUI functions. It controls the
% radio buttons in the GUIs.
%
% See also SOMPAK_GUI, SOMPAK_INIT_GU... |
github | limosek/somtoolbox-master | lvq1.m | .m | somtoolbox-master/lvq1.m | 5,024 | utf_8 | a070f35398c18c51f027085933d68898 | function codebook=lvq1(codebook, data, rlen, alpha);
%LVQ1 Trains a codebook with the LVQ1 -algorithm.
%
% sM = lvq1(sM, D, rlen, alpha)
%
% sM = lvq1(sM,sD,30*length(sM.codebook),0.08);
%
% Input and output arguments:
% sM (struct) map struct, the class information must be
% present on the... |
github | limosek/somtoolbox-master | som_colorcode.m | .m | somtoolbox-master/som_colorcode.m | 7,992 | utf_8 | e139a86fbbaf6d611756042a645ce669 | function colors=som_colorcode(m, colorcode, scaling)
%SOM_COLORCODE Calculates a heuristic color coding for the SOM grid
%
% colors = som_colorcode(m, colorcode, scaling)
%
% Input and output arguments ([]'s are optional):
% m (struct) map or topol struct
% (cell array) of form {str,[m1 m2]... |
github | limosek/somtoolbox-master | som_pieplane.m | .m | somtoolbox-master/som_pieplane.m | 9,900 | utf_8 | b60d176e5188e9bf6201adc225f354f6 | function h=som_pieplane(varargin)
%SOM_PIEPLANE Visualize the map prototype vectors as pie charts
%
% h=som_pieplane(lattice, msize, data, [color], [s], [pos])
% h=som_pieplane(topol, data, [color], [s], [pos])
%
% som_pieplane('hexa',[5 5], rand(25,4), jet(4), rand(25,1))
% som_pieplane(sM, sM.codebook);
%
% Input... |
github | p5a0u9l/coffee-pi-radar-master | event_doppler.m | .m | coffee-pi-radar-master/matlab/event_doppler.m | 3,216 | utf_8 | f78828597af139e167c7228fe98131ed | % filename: event_doppler.m
% author: Paul Adams
%
function dc = event_doppler(varargin)
% config
args = containers.Map(varargin(1:2:end), varargin(2:2:end));
dc = DopplerConfig(args);
dc.wav.record(dc.n_dwell_detect*dc.Tp);
% Loop until EOF
eof = false;
while ~eof
tic;
x = ... |
github | p5a0u9l/coffee-pi-radar-master | batch_doppler_example.m | .m | coffee-pi-radar-master/matlab/batch_doppler_example.m | 6,850 | utf_8 | 3527e8a2e3e645104eba0b6e220f2dc4 | % filename: batch_doppler_example.m
% author: Paul Adams
%
function batch_doppler_example(varargin)
% config
keys = varargin(1:2:end);
vals = varargin(2:2:end);
opts = containers.Map(keys, vals);
fname = fullfile('..', 'reference', 'charvat_doppler', 'Off of Newton Exit 17.wav');
fname = 'test.... |
github | p5a0u9l/coffee-pi-radar-master | netscope.m | .m | coffee-pi-radar-master/matlab/netscope.m | 5,128 | utf_8 | 297bae7bb1c4302c7e0730b3f05c1c40 | % filename: netscope.m
% author: Paul Adams
function netscope(varargin)
% parse input args
args = containers.Map(varargin(1:2:end), varargin(2:2:end));
%socket_ip =char(py.socket.gethostbyname('thebes')));
socket_ip = get_arg(args, 'socket_ip', 'thebes');
sub_topic = get_arg(args, 'sub_topic', 'raw... |
github | p5a0u9l/coffee-pi-radar-master | event_fmcw.m | .m | coffee-pi-radar-master/matlab/event_fmcw.m | 1,975 | utf_8 | 4ccf69820537b4d12ce59438baa6605d | function fmcw_playback()
% init config
fc = FmcwConfig('dev_type', 'zmq');
dbv = @(x, n) 20*log10(abs(x(1:n/2)));
% fetch data
x = audioread(fc.fname);
% sync pulses
[pulse_idx, n_samp_pulse] = pulse_sync(x, fc.SYNC_CHAN);
n_pulse = length(pulse_idx) - 1;
n_frame = 100;
fc.get_... |
github | p5a0u9l/coffee-pi-radar-master | batch_fmcw_detection.m | .m | coffee-pi-radar-master/matlab/batch_fmcw_detection.m | 3,684 | utf_8 | 47e9c8c45e3d798e16fb64d7c9f0c6e8 | % filename: batch_fmcw_detection.m
% author: Paul Adams
%
function x = batch_fmcw_detection(varargin)
% init and params
dbv = @(x) 20*log10(abs(x));
fname = dir('*radar_data*');
[~, idx] = max([fname.datenum]);
fname = fname(idx).name;
% parse input args
args = containers.Map(varargin(1:2:e... |
github | p5a0u9l/coffee-pi-radar-master | imagr.m | .m | coffee-pi-radar-master/matlab/imagr.m | 4,033 | utf_8 | 12a5609cc61a267a54f0c5635a7fb0a2 | % filename: imagr.m
% author: Paul Adams
%
function im = imagr(z, varargin)
if nargin > 1
args = containers.Map(varargin(1:2:end), varargin(2:2:end));
else
args = containers.Map(1,1);
end
cm = get_arg(args, 'colormap', 'hot');
fignum = get_arg(args, 'fignum', 101);
xdata = get_ar... |
github | p5a0u9l/coffee-pi-radar-master | audioscope.m | .m | coffee-pi-radar-master/matlab/audioscope.m | 4,653 | utf_8 | 1a15bb6021e10f972cd79751db683e66 | % filename: audioscope.m
% author: Paul Adams
%
function scope(varargin)
% playback params
fs = 48000;
n_chan = 2;
n_bit = 16;
% parse input args
args = containers.Map(varargin(1:2:end), varargin(2:2:end));
oversample = get_arg(args, 'oversample', 2);
socket_ip = get_arg(args, 'socket_i... |
github | thomasdeneux/brick-master | fn_colorlegend.m | .m | brick-master/fn_colorlegend.m | 3,559 | utf_8 | b96baeb4ac998022b8f2eeed057dafe5 | function hleg = fn_colorlegend(varargin)
% function [hleg =] fn_colorlegend([handles,]names[,'NorthWest|...'][,'frame'][,text options...])
%---
% Display discreet color legend for set of lines
% Input
if nargin==0
figure(1), clf
hl = plot(rand(100,5));
names = {'a first line' 'a second one' 'number 3' '4' ... |
github | thomasdeneux/brick-master | fn_register.m | .m | brick-master/fn_register.m | 11,630 | utf_8 | 043e3392f248a33c96ab4c26de7becb3 | function varargout = fn_register(varargin)
%FN_REGISTER Coregister images or movie
%---
% function [shift e xreg] = fn_register(x,par|ref)
% function par = fn_register('par')
%---
% Be careful with the sign: xreg is obtained as
% xreg = fn_translate(x,-shift);
% If no reference is provided, uses the average of the firs... |
github | thomasdeneux/brick-master | fn_progress.m | .m | brick-master/fn_progress.m | 8,006 | utf_8 | 006095753064fbba44e623287e0837a8 | function out = fn_progress(varargin)
% function fn_progress(prompt,max[,ht][,'ignoresub'][,'noerase'])
% function fn_progress(prompt,'%',[,ht][,'ignoresub'][,'noerase'])
% function fn_progress(text)
% function fn_progress(i)
% function fn_progress(i,'pause')
% function fn_progress('end')
% function fn_progress('cont')
... |
github | thomasdeneux/brick-master | fn_pan.m | .m | brick-master/fn_pan.m | 666 | utf_8 | b6caa538909bec36bc7ad63f90049b52 | function fn_pan(ha,mode)
% function fn_pan(ha[,'x|y'])
%---
% pan axes
%
% See also fn_buttonmotion, fn_moveobject
% Thomas Deneux
% Copyright 2015-2017
if nargin<2, mode = 'xy'; end
ax0 = axis(ha);
p0 = get(ha,'currentpoint'); p0 = p0(1,1:2);
hf = fn_parentfigure(ha);
ptr = get(hf,'pointer');
set(hf,'pointer','hand... |
github | thomasdeneux/brick-master | fn_filecontrol.m | .m | brick-master/fn_filecontrol.m | 2,371 | utf_8 | fc539f305158bcb9ddc2765bcc36b1c8 | function hu = fn_filecontrol(varargin)
%FN_FILECONTROL Select a file
%---
% function hu = fn_filecontrol([hu,]'property1',value1,...)
%---
% Set the properties of a regular uicontrol with style 'edit' so that
% clicking in it lets user select a file.
%
% Input
% - hu uicontrol handle
% - 'property1... |
github | thomasdeneux/brick-master | fn_readxml.m | .m | brick-master/fn_readxml.m | 2,986 | utf_8 | b4ab20bff5a9504bd3edbeae3df5b2ab | function s = fn_readxml(fname,version)
% function s = fn_readxml(fname[,version])
%---
% This function is a wrapper for function xml_read.m downloaded on Matlab
% File Exchange.
% Additionally, the structure is slightly simplified.
%
% Input:
% - fname file name
% - version 'xml_read' to use MatlabExchange Ja... |
github | thomasdeneux/brick-master | fn_slider.m | .m | brick-master/fn_slider.m | 29,828 | utf_8 | 24f358525041639458721286371a3291 | classdef fn_slider < hgsetget
%FN_SLIDER Special control that improves the functionality of Matlab slider
%---
% function fn_slider([hp,][properties])
%---
% Slider
%
% Detail on some properties:
% - mode 'point' [default], 'area' or 'area+point'
% - layout 'auto' [default], ... |
github | thomasdeneux/brick-master | fn_cd.m | .m | brick-master/fn_cd.m | 8,597 | utf_8 | f747a992d0cdefd9173f32278a9e55d0 | function repout = fn_cd(flag,varargin)
%FN_CD User definition of shortcut to fast access directories
%---
% function rep = fn_cd(flag,relpath)
% function fn_cd('edit')
% function [list = ] fn_cd('list')
%---
% This function allows user to rapidly change the current directory or get
% the full path to some files.
%
% -... |
github | thomasdeneux/brick-master | fn_imageop.m | .m | brick-master/fn_imageop.m | 1,619 | utf_8 | fe86ed9600a3096326c1231b4b1491e2 | function x = fn_imageop(x,par)
%FN_IMAGEOP Apply a series of transformations to an image
%---
% function a = fn_imageop(a[,par])
% function par = fn_imageop('par')
%---
% Apply a series of transformations to an image
%
% Input/Output:
% - a 2D (or more) array - image (or movie, ...) to be modified
% - par s... |
github | thomasdeneux/brick-master | fn_4Dview.m | .m | brick-master/fn_4Dview.m | 74,344 | UNKNOWN | dde697234f07c2b102d1c92d427af9a0 | function varargout = fn_4Dview(varargin)
%FN_4DVIEW Navigation inside 3D, 4D or 5D imaging data
%---
% function fn_4Dview(option1,optionArgs1,...)
% function varargout = fn_4Dview(action,actionArgs)
%---
% displays spatial or temporal slices of multi-dimensional data
% by default: data is considered to be 3D, 4D or 5D ... |
github | thomasdeneux/brick-master | fn_stepper.m | .m | brick-master/fn_stepper.m | 7,620 | utf_8 | aa2fb3fad28278110e49058f4904bff3 | classdef fn_stepper < hgsetget
%FN_STEPPER Edit a numeric value, includes increment/decrement buttons
%---
% function fn_stepper([n,][properties])
% See also fn_slider, fn_control
% Thomas Deneux
% Copyright 2008-2017
properties
nx
value
step
coer... |
github | thomasdeneux/brick-master | fn_savefig.m | .m | brick-master/fn_savefig.m | 15,712 | utf_8 | f6dee53252fd17dad0673a663b2647b4 | function out = fn_savefig(varargin)
%FN_SAVEFIG Save figure with a number of options
%---
% function fn_savig([hobj][,fname][,options...])
% function im = fn_savig([hobj][,options...])
%---
% Save an image of one or several figure(s). Large number of options
% are available.
% If function is called with no argument, o... |
github | thomasdeneux/brick-master | fn_poly2mask.m | .m | brick-master/fn_poly2mask.m | 4,385 | utf_8 | 189f377207f274d6071eeafab73da2b4 | function mask = fn_poly2mask(xpoly,ypoly,m,n)
%FN_POLY2MASK Get the mask of a polygon interior
%---
% function mask = fn_poly2mask(xpoly,ypoly,m,n)
% function mask = fn_poly2mask(poly,sizes)
% function movie = fn_poly2mask('demo')
%---
% Do the same as Matlab poly2mask without needing the Image Toolbox
% Except use dif... |
github | thomasdeneux/brick-master | fn_watch.m | .m | brick-master/fn_watch.m | 1,610 | utf_8 | bbe9f4f1f9b96973e351cbae2193f9a6 | function c = fn_watch(hf,varargin)
%FN_WATCH Change the pointer to a watch during long computations
%---
% function c = fn_watch([hf])
%---
% Replace mouse pointer of the current (or specified) figure by a sandglass
% until returned object c will be killed (typically when leaving the
% function where it lies).
% Thom... |
github | thomasdeneux/brick-master | fn_structedit.m | .m | brick-master/fn_structedit.m | 1,207 | utf_8 | 1e667a964d49149b0628ea507089c4d4 | function s = fn_structedit(s,varargin)
%FN_STRUCTEDIT Edit a structure with a GUI interface; this is a wrapper of fn_control
%---
% function s = fn_structedit(s[,spec][,hp][,other fn_control arguments...])
% function s = fn_structedit(fieldname1,value1,fieldname2,value2,...)
%---
% allow user to interactively modify a ... |
github | thomasdeneux/brick-master | fn_menu.m | .m | brick-master/fn_menu.m | 3,738 | utf_8 | af35cca5dacf376f749d794e3bbd04e9 | function varargout = fn_menu(varargin)
%FN_MENU Utility to create a basic GUI made of a line of buttons
%---
% function m = fn_menu([fig,]'h'|'v',title,width,height,'FramePropertyName',FramePropertyValue,...)
% function u = fn_menu(m,'UIControlPropertyName',UIControlPropertyValue,...)
% function [m u] = fn_menu([menu o... |
github | thomasdeneux/brick-master | fn_spectrogram.m | .m | brick-master/fn_spectrogram.m | 4,403 | utf_8 | 100c885c719e8ff182cff317fb177d4b | function [y freqs yticklog yticklabel] = fn_spectrogram(x,dt,varargin)
%FN_SPECTROGRAM Compute spectrogram
%---
% function [y freqs yticklog yticklabel] = fn_spectrogram(x,dt[,freqscaling][,freqs])
% function fn_spectrogram(['display',]y,dt|tt,freqs,yticklog,yticklabel[,freqscaling][,clip])
%---
% This is a wrapper of ... |
github | thomasdeneux/brick-master | fn_hash.m | .m | brick-master/fn_hash.m | 3,094 | utf_8 | 9f7b49057786f3f617d8f880e5c4b6f9 | function h = fn_hash(inp,varargin)
%FN_HASH Unique hash number for an array/cell/structure (Copyright M Kleder)
%---
% function h = fn_hash(input[,meth][,'char|hexa|HEXA|num'][,n])
%---
% This function relies on function hash.m downloaded on Matlab File
% Exchange.
% It extends hash functionalities to structures and ce... |
github | thomasdeneux/brick-master | fn_coordinates.m | .m | brick-master/fn_coordinates.m | 4,944 | utf_8 | 76c76e8fb84b709f7a5d1460b8f210c6 | function varargout = fn_coordinates(varargin)
%FN_COORDINATES Conversion of screen/figure/axes, normalized/pixel coordinates
%---
% function [orig scale] = fn_coordinates([handle,]refchangetag)
% function x2 = fn_coordinates([handle,]refchangetag,x1,'position')
% function v2 = fn_coordinates([handle,]refchangetag,v1,'v... |
github | thomasdeneux/brick-master | fn_translate.m | .m | brick-master/fn_translate.m | 7,963 | utf_8 | c49e1c9df6a0527e93be30bdca1c6f81 | function [y weight J dweight] = fn_translate(x,shift,varargin)
% function [y weight J dweight] = fn_translate(x,shift[,'full|valid'][,'linear|cubic'][,datatype])
%---
% Translate image (or movie) x by shift.
%
% Input:
% - x 2D or 3D array
% - shift 2, 3 or 4-element vector or 2/3/4-by-N array (N being ... |
github | thomasdeneux/brick-master | fn_plotscale.m | .m | brick-master/fn_plotscale.m | 4,754 | utf_8 | 94a7eb56af5e184cb2be2eb57a870d66 | function hl = fn_plotscale(varargin)
%FN_PLOTSCALE Add horizontal and vertical scale bars to graph
%---
% function hl = fn_plotscale([ha,]tlabel,ylabel[,t_y_sizes[,posflag]])
%---
% Creates a 2 directional scale bar for graph display
%
% Input:
% - tlabel string with %f%s format, for example '1s'
% - ylabel s... |
github | thomasdeneux/brick-master | disable_listener.m | .m | brick-master/disable_listener.m | 1,052 | utf_8 | 20b268b33e4e1ada432d6baf47a3a33c | function c = disable_listener(hl)
%DISABLELISTENER Momentarily disable a listener (returns an onCleanup oject that reenable it when being garbage collected)
%---
% function c = disable_listener(hl)
%---
% Disable listener(s) and return an onCleanup object that will re-enable it
% (them) upon deletion. This is particula... |
github | thomasdeneux/brick-master | fn_framedesign.m | .m | brick-master/fn_framedesign.m | 12,804 | utf_8 | 3d8db8f56c19dc32524aa903dac9e077 | function [pos cmd] = fn_framedesign(grob,pos,resetflag)
%FN_FRAMEDESIGN Utility to let user reposition graphic objects inside a figure
%---
% function [pos cmd] = fn_framedesign([grob[,pos|cmd[,resetflag]]])
%---
% utility for positioning frames in a figure
%
% Input:
% - grob structure with fields the names of... |
github | thomasdeneux/brick-master | fn_mouse.m | .m | brick-master/fn_mouse.m | 22,933 | UNKNOWN | 67277e5b4778490b8dd3f59969c8be9b | function varargout = fn_mouse(varargin)
% function poly = fn_mouse([axes handle],'point|cross|poly|free|ellipse'[,msg])
% function [x y] = fn_mouse([axes handle],'point|cross'[,msg])
% function rect = fn_mouse([axes handle],'rect'[,msg])
% function [center axis e] = fn_mouse([axes handle],'ellipse'[,msg])
% function [c... |
github | thomasdeneux/brick-master | fn_controlpositions.m | .m | brick-master/fn_controlpositions.m | 3,360 | utf_8 | c1f752cf2afb24cc1444171a1df81497 | function fn_controlpositions(hu,hp,posrel,pospix)
%FN_CONTROLPOSITIONS Set an object position using a combination of absolute and relative (to any other object) coordinates
%---
% function fn_controlpositions(hu,hp,posrel,pospix)
% ---
% set the position of controls relatively to an axes, and set the
% appropriate lis... |
github | thomasdeneux/brick-master | fn_sliderenhance.m | .m | brick-master/fn_sliderenhance.m | 2,090 | utf_8 | 5e2b51312494073193f6e389f5f8440e | function fn_sliderenhance(hu,varargin)
%FN_SLIDERENHANCE Allow a slider uicontrol to evaluate its callback during scrolling
%---
% function fn_sliderenhance(sliderhandle)
%---
% allows a slider uicontrol to evaluate its callback during scrolling
% (instead of only at the moment that the mouse if released):
% just call ... |
github | thomasdeneux/brick-master | fn_buttonmotion.m | .m | brick-master/fn_buttonmotion.m | 7,058 | utf_8 | 0259068dff6f104e6ee47d9df5810c78 | function varargout = fn_buttonmotion(fun,varargin)
%FN_BUTTONMOTION Execute a task while mouse pointer is moved (try 'fn_buttonmotion demo')
%---
% function varargout = fn_buttonmotion(fun[,hf][,'doup'][,'pointer',pointer])
% function [moved ...] = fn_buttonmotion(...,'moved?')
% function fn_buttonmotion('demo')
%---
%... |
github | thomasdeneux/brick-master | fn_moveobject.m | .m | brick-master/fn_moveobject.m | 4,826 | utf_8 | 912b84119a417098e225e9f2807cdf0c | function dp = fn_moveobject(hobj,varargin)
% function [dp =] fn_moveobject(hobj[,'latch'][,'point',i][,'pointer',pointer])
% function [dp =] fn_moveobject(hobj,vector)
% function [dp =] fn_moveobject(hobj,event)
%---
% Moves objects while mouse button is pressed.
% Second syntax moves the object by a fixed vector.
% Th... |
github | thomasdeneux/brick-master | fn_control.m | .m | brick-master/fn_control.m | 64,756 | utf_8 | c2fb121c7d1442b719d7b602020e7c4d | classdef fn_control < hgsetget
%FN_CONTROL Arrangement of control that reflect the state of a set of parameters
%---
% function X = fn_control(s[,fun][,spec][,hparent] ...
% [,'okbutton|nobutton'][,'ncol',n][,'title',titl])
% function fn_control('demo')
%---
% cluster of controls repre... |
github | thomasdeneux/brick-master | fn_imvalue.m | .m | brick-master/fn_imvalue.m | 19,621 | UNKNOWN | 8d547065df6ed558ac263382c20a6f30 | function fn_imvalue(varargin)
%FN_IMVALUE Automatic link graphs and images for point selection and zooming (try 'fn_imvalue demo')
%---
% fn_imvalue [image] [xy|xonly]
% fn_imvalue clean
% fn_imvalue end
% fn_imvalue('chgx'|'chgy'|'chgxy',newax[,ha])
% fn_imvalue('register'[,ha][,command])
% fn_imvalue('unregister'[,ha... |
github | thomasdeneux/brick-master | fn_fit.m | .m | brick-master/fn_fit.m | 2,128 | utf_8 | 0125fe6425468147e3bb11a788baf334 | function varargout = fn_fit(x,y,fun,startpoint)
%FN_FIT Fit the parameters of a given function
%---
% function [par1 ... parN yfit] = fn_fit(x,y,@(x,par1,..,parN)fun,startpoint)
% function [a b yfit] = fn_fit(x,y,'affine')
% function [low high thr slope yfit] = fn_fit(x,y,'sigmoid')
%---
% Fit the parameters of a given... |
github | thomasdeneux/brick-master | fn_listedit.m | .m | brick-master/fn_listedit.m | 5,736 | utf_8 | 57a7a8b4f197fee9e39f4ad4fe007e92 | function indices = fn_listedit(varargin)
% function indices = fn_listedit(A[,B...][,indices])
%---
% Manually select and reorder items in one or multiple lists (in the case
% of multiple lists, the item are aligned in a single table).
%
% Input:
% - A,B,... numerical or cell array - a list
%
% Output:
% - indices... |
github | thomasdeneux/brick-master | fn_structdisp.m | .m | brick-master/fn_structdisp.m | 2,438 | utf_8 | bad0ae0a01d2f1672ed6824db4cf09cd | function fn_structdisp(Xname)
%FN_STRUCTDISP Recursive display of a structure content
%---
% function fn_structdisp Xname
% function fn_structdisp(X)
%---
% Recursively display the content of a structure and its sub-structures
%
% Input:
% - Xname/X one can give as argument either the structure to display or
% ... |
github | thomasdeneux/brick-master | fn_errorbar.m | .m | brick-master/fn_errorbar.m | 6,840 | utf_8 | f6b35eaca7e240b4307a3bf7bac9b808 | function hl = fn_errorbar(varargin)
%FN_ERRORBAR Display nice error bars
%---
% function hl = fn_errorbar([x,]y,ey[,flag][,'colors',colors],line options)
% function hl = fn_errorbar([x,]yy[,flag],...)
% function hl = fn_errorbar(x,ex,y,ey,'xerror',...)
% function hl = fn_errorbar(xx,yy,'xerror',...)
%---
% ym and ystd... |
github | thomasdeneux/brick-master | fn_email.m | .m | brick-master/fn_email.m | 4,988 | utf_8 | 13e584a12c97c3e8db0cc462fd1cf70a | function m = fn_email(flag)
%FN_EMAIL Send e-mails from Matlab! Automatically attach figures, M-files and more
%---
% function fn_email
% function fn_email('setserver')
%--------------
% sends an email !!
% prompts for recipient, title, attachments and text
% Thomas Deneux
% Copyright 2004-2017
if nargin==1
if ~... |
github | thomasdeneux/brick-master | fn_readimg.m | .m | brick-master/fn_readimg.m | 3,639 | utf_8 | 469cf20493927997e755e25c81cd58dd | function [a, alpha] = fn_readimg(fname,flag)
% function [a [,alpha]] = fn_readimg(fname[,'nopermute'])
%---
% read image using imread, and handles additional features:
% - converts to double
% - detects if color or gray-scale images (in the last case, use a 2D array per image)
% - can read a stack of images (returns 3D... |
github | thomasdeneux/brick-master | fn_userconfig.m | .m | brick-master/fn_userconfig.m | 2,497 | utf_8 | 4644b1b3914a4020955ac59fe0783635 | function varargout = fn_userconfig(flag,varargin)
% function fn_userconfig(flag,var1,var2,var3...) % save
% function [var1 var2 var3...] = fn_userconfig(flag) % load
% function name = fn_userconfig('configfolder|codefolder'[,filename]) % get file name
% function name = fn_userc... |
github | thomasdeneux/brick-master | fn_xregister.m | .m | brick-master/fn_xregister.m | 2,803 | utf_8 | cff6554d7f2e48dc8921b72e521691e5 | function d = fn_xregister(a,b,maxshift)
%FN_XREGISTER Fast fft-based coregistration at pixel (but not sub-pixel) resolution
%---
% function d = fn_xregister(a,b,maxshift)
%---
% register images a and b using cross-correlation
% based on the Matlab code for normxcorr2, and normalization is improved
% when a is not insid... |
github | thomasdeneux/brick-master | fn_figmenu.m | .m | brick-master/fn_figmenu.m | 9,587 | utf_8 | 0d04fd55553497aad6f2a8ad5b99bfc7 | function fn_figmenu(hf,varargin)
%FN_FIGMENU Type 'fn_figmenu' to get a useful new menu in every figure
%---
% function fn_figmenu
% function fn_figmenu(hf)
%---
% adds a custom menu to figure
%
% Note that function fn_figmenu makes use of fn_cd, and in order to be
% able to use it to save figures in the predefined di... |
github | thomasdeneux/brick-master | createhelpfiles.m | .m | brick-master/helpsource/createhelpfiles.m | 5,871 | utf_8 | bb9bdc3c99d284e5d6e4c69d0166b774 | function createhelpfiles(target)
% function createhelpfiles('all|funcbycat|allfunc|allmanual'|mfile)
% which files to create
if nargin==0, target = 'all'; end
dofuncbycat = fn_ismemberstr(target,{'all' 'funcbycat'});
domanual = strcmp(target,'allmanual');
% memorize current working directory
swd = pwd;
% Create auto... |
github | maximilianzhang/Task-priority-for-Cartesian-Position-and-Orientation-control-of-KUKA-LWR-7R-robot-arm-master | Vrep_source.m | .m | Task-priority-for-Cartesian-Position-and-Orientation-control-of-KUKA-LWR-7R-robot-arm-master/Vrep_source.m | 3,426 | utf_8 | c0bafbfe5d9a4ce42f251808fa548fe2 | %% This S-function implements the Simulink callback functions necessary to
% communicate with a VRep scene. In particular, the Simulink block that uses this
% S-function is intended to communicate synchronously with a
% VRep scene that runs in real-time mode.
% Matlab uses its discrete time steps to command the ... |
github | maximilianzhang/Task-priority-for-Cartesian-Position-and-Orientation-control-of-KUKA-LWR-7R-robot-arm-master | Vrep_sink.m | .m | Task-priority-for-Cartesian-Position-and-Orientation-control-of-KUKA-LWR-7R-robot-arm-master/Vrep_sink.m | 3,394 | utf_8 | e41a0d4d25edcb440b35e8a9dce85287 | %% This S-function implements the Simulink callback functions necessary to
% communicate with a VRep scene. In particular, the Simulink block that uses this
% S-function is intended to communicate synchronously with a
% VRep scene that runs in real-time mode.
% Matlab uses its discrete time steps to command the ... |
github | JuanMarcosRamirez/RecursiveMyriadBasedFilters-master | witm.m | .m | RecursiveMyriadBasedFilters-master/OthersNonlinearFilters/witm.m | 685 | utf_8 | 3310d00b68d976da1866eed09994a68c | % ITM filter; only allow positive weights
function [opt itetime] = witm (data,w)
n = length(data);
itetime = 0;
maxw = max(w);
while(1)
itetime = itetime+1;
% get the mu and tau
mu = sum(data.*w)/sum(w);
tau = (sum((abs(data-mu)).*w))/sum(w);
% truncate the data
... |
github | JuanMarcosRamirez/RecursiveMyriadBasedFilters-master | WITM.m | .m | RecursiveMyriadBasedFilters-master/RecursiveMyriadImages/WITM.m | 685 | utf_8 | 64a125f103e158a4f20ce9b1213dd06c | % ITM filter; only allow positive weights
function [opt itetime] = WITM (data,w)
n = length(data);
itetime = 0;
maxw = max(w);
while(1)
itetime = itetime+1;
% get the mu and tau
mu = sum(data.*w)/sum(w);
tau = (sum((abs(data-mu)).*w))/sum(w);
% truncate the data
... |
github | psiden/BFAST3D-master | download_ds107_data.m | .m | BFAST3D-master/download_ds107_data.m | 1,712 | utf_8 | 762015639657ff2cdc317360ede78789 | %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PURPOSE: Download ds107 data from openneuro.org. Task and condition
% data are pre-stored in the BFAST3D repo since openneuro
% seems to have removed them.
%
% AUTHOR: Per Siden
% ... |
github | psiden/BFAST3D-master | readTaskFile.m | .m | BFAST3D-master/readTaskFile.m | 1,101 | utf_8 | 4205f6782e1c20fae055d40919ba449d | %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PURPOSE: Read files like condition_key.txt, task_contrasts.txt or
% events.tsv and output as cell-matrix of character arrays
%
% AUTHOR: Per Siden
% Division of Statistics and Machi... |
github | psiden/BFAST3D-master | runEBMatern.m | .m | BFAST3D-master/runEBMatern.m | 8,771 | utf_8 | ec6d7d90f8dafed53aa3cc4fe957587b | %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PURPOSE: Run Empirical Bayes estimation of the hyperparameters in
% the model with Matern spatial priors
%
% Based on the Paper "Matern 3D fMRI" (2019).
%
% INPUT: fS - fMRI analysi... |
github | psiden/BFAST3D-master | computeExcursions.m | .m | BFAST3D-master/computeExcursions.m | 2,514 | utf_8 | 5039e584227f1e8adaca1405568622d7 | %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PURPOSE: Run excursions in R (just contrasts)
%
% AUTHOR: Per Siden
% Division of Statistics and Machine Learning
% Department of Computer and Information Science
% Lin... |
github | psiden/BFAST3D-master | setupPrecMats.m | .m | BFAST3D-master/setupPrecMats.m | 6,233 | utf_8 | 36698fd37b43a3b0eb11316ddb275802 | %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PURPOSE: Setup precision matrices
% Q = G'*G
% G not properly updated for all dimensions/types
%
% AUTHOR: Per Siden
% Division of Statistics and Machine... |
github | psiden/BFAST3D-master | runSVB.m | .m | BFAST3D-master/runSVB.m | 4,438 | utf_8 | 1a8e8f36a94b4c25f9b04f265cc50696 | %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PURPOSE: Run SVB estimation for BIDS format fMRI data
%
% INPUT: dS - data settings struct
% VBMethod - string containing estimation method,
% possible options: S... |
github | psiden/BFAST3D-master | runMCMC.m | .m | BFAST3D-master/runMCMC.m | 21,162 | utf_8 | 074c1c672ffb5652afb1ae47765d7f34 | %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PURPOSE: Run MCMC spatial model estimation
%
% INPUT: dS - data settings struct
% estimationMethod - string containing estimation method,
% possible options: MCMC... |
github | psiden/BFAST3D-master | preprocessing.m | .m | BFAST3D-master/preprocessing.m | 1,085 | utf_8 | 7058f9e35c11a255c56a24cb3f06d69b | %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PURPOSE: Motion correction for openneuro datasets
%
% AUTHOR: Per Siden
% Division of Statistics and Machine Learning
% Department of Computer and Information Science
% ... |
github | psiden/BFAST3D-master | computePPMs.m | .m | BFAST3D-master/computePPMs.m | 18,879 | utf_8 | de8668628aef075b19e131c4222cc06c | %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PURPOSE: Compute Posterior mean and PPMs for all contrasts and
% regressors for a certain method. Save result as nifti.
%
% Assuming using design matrix with canonical HRF and
% ... |
github | psiden/BFAST3D-master | spm_svb_setupPrecMats.m | .m | BFAST3D-master/svb/spm_svb_setupPrecMats.m | 6,241 | utf_8 | 6f854ad297e0a2e1251c3d8ab4d61cc5 | %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PURPOSE: Setup precision matrices
% Q = G'*G
% G not properly updated for all dimensions/types
%
% AUTHOR: Per Siden
% Division of Statistics and Machine... |
github | psiden/BFAST3D-master | spm_svb_parallel_GMRF_sampling.m | .m | BFAST3D-master/svb/spm_svb_parallel_GMRF_sampling.m | 777 | utf_8 | 396df20a7c632318c302430d86ce0f5d | %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PURPOSE: Sample from GMRF in parallel
%
% AUTHOR: Per Siden
% Division of Statistics and Machine Learning
% Department of Computer and Information Science
% Linkoping U... |
github | psiden/BFAST3D-master | spm_svb_cholSafe.m | .m | BFAST3D-master/svb/spm_svb_cholSafe.m | 1,311 | utf_8 | cdac5edc3ddb3354f3947f0dbdda8b2f | %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PURPOSE: Help function that calls Matlab's chol for sparse matrix A
% in try/catch to
% prevent numerical errors when the matrix is just close to
% positive definite. If chol... |
github | psiden/BFAST3D-master | setupAnisoPrecMats.m | .m | BFAST3D-master/eb/util/setupAnisoPrecMats.m | 2,315 | utf_8 | 6b01e6512f97abba657cdde6a3296ac8 | %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PURPOSE: Setup precision matrices
% Q = G'*G
% G not properly updated for all dimensions/types
%
% AUTHOR: Per Siden
% Division of Statistics and Machine Learning
% ... |
github | psiden/BFAST3D-master | setupPrecMats.m | .m | BFAST3D-master/eb/util/setupPrecMats.m | 7,797 | utf_8 | ecd45c68e393bb943e5b6330a3978ba9 | %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PURPOSE: Setup precision matrices
% Q = G'*G
% G not properly updated for all dimensions/types
%
% AUTHOR: Per Siden
% Division of Statistics and Machine... |
github | VeroL/BioFrag-master | Edge_response_default.m | .m | BioFrag-master/Edge_response_default.m | 3,016 | utf_8 | eb425c2e0bc79af33419b8a83670b9f4 | %general main for edge response software
function Edge_response_default()
%creates runvar structure variable that stores variables of the current run:
%runvar contains path and file names that depend on users and input data
%1) store start msg in runvar:
runvar.start_msg = {'Hello, to perf... |
github | VeroL/BioFrag-master | Edge_response_ExecSequence.m | .m | BioFrag-master/Software_functions/Edge_response_ExecSequence.m | 8,765 | utf_8 | d44d94fbf137921099a046ac1b64baee | %Edge Response sequence of operations. function called by a Main (that may vary depending on users)
function Edge_response_ExecSequence(runvar)
%input runvar (structure) will contain path and file names that depend on users or input data
%at this stage it contains plugin_info (empty if no plugin, function han... |
github | VeroL/BioFrag-master | exportas_CSV.m | .m | BioFrag-master/Software_functions/functions_DataExport/exportas_CSV.m | 985 | utf_8 | 83abba8ca6186eb714a81421418c8159 | % function exportas_CSV(cellarr,csvfile)
% function that accepts any cell array 'cellarr' and writes it to the file 'csvfile' in CSV format
% if 'cellarr' is not a cell array of strings it is converted.
% if csvfile already exists it is overwritten.
function exportas_CSV(cellarr,csvfile)
%if the cell array does ... |
github | VeroL/BioFrag-master | generate_outputs.m | .m | BioFrag-master/Software_functions/functions_DataExport/generate_outputs.m | 10,592 | utf_8 | e2083da453879f402feaf2d10dd96673 | %generate software file outputs:
%geotiff of Binary map
%geotiff of distance map
%geotiff of EI map
%csv containing census plots properties: plotName x y row col distance2nearestEdge PC EI
%csv containing species matrix smoothed with respect to PC and EI at census locations
%csv containing list of species with the f... |
github | VeroL/BioFrag-master | dispwrite_log.m | .m | BioFrag-master/Software_functions/functions_DataExport/dispwrite_log.m | 386 | utf_8 | 30b588a55cb2e0baa5959f03d6018f6d |
function dispwrite_log(runvar, param, msg)
msgbox(msg,param.msgbox_Title,'help','replace'); %display box
%append msg to file:
fid = fopen(runvar.log_filename, 'a');
if iscell(msg)
nrows= length(msg);
for row=1:nrows
fprintf(fid, '%s \r\n', msg{row});
end
else
... |
github | VeroL/BioFrag-master | start_log.m | .m | BioFrag-master/Software_functions/functions_DataExport/start_log.m | 636 | utf_8 | 00a3f268a2c4abc370cb337a2f9cefe8 |
function runvar = start_log(runvar)
%create log file, and log start message:
%grab current time to create log file name
tsp = datestr(now, 'yymmdd_HHMMSS');
runvar.log_filename = fullfile(runvar.folder_Data_Output, ['Edge_response_log_' tsp '.txt']); %overwrite log file name
%write star... |
github | VeroL/BioFrag-master | check_log_error.m | .m | BioFrag-master/Software_functions/functions_DataExport/check_log_error.m | 1,078 | utf_8 | 6cf8b9002276f05b3e11fef9b01c6061 | %prepare error message, and if error has occured display message and log it
%check for error and throw it if needed with ID [param.errorID errID] and message: errmsg
function check_log_error(var_to_assert, erreason, errID, runvar, param)
%prepare error message:
errmsg = [param.runaborted erreason];
%... |
github | VeroL/BioFrag-master | writeRastertif.m | .m | BioFrag-master/Software_functions/functions_DataExport/writeRastertif.m | 175 | utf_8 | 024428096ed630fcbe4e833cd427818f | %write geotiff
function writeRastertif(pathfilename,map,R,ginfo)
p=ginfo.GeoTIFFTags.GeoKeyDirectoryTag;
geotiffwrite(pathfilename,map,R,'GeoKeyDirectoryTag',p);
end |
github | VeroL/BioFrag-master | getLandscape_metrics.m | .m | BioFrag-master/Software_functions/functions_EdgeResponse/getLandscape_metrics.m | 4,307 | utf_8 | d9db864a98439b6c857b09bfa74cdb8d | % getLandscape_metrics
%compute the total habitat amout in landscape (habitat defined by PC >60, soft threshold), in hectares
%habitat configuration index (total edge effects but rescaled)
%total edge effects on habitat
%stores in runvar.Landscape_metrics_matfile as a structure with 3 fields : PC_amount, PC_CI, PC_Co... |
github | VeroL/BioFrag-master | MakeEIMap.m | .m | BioFrag-master/Software_functions/functions_EdgeResponse/MakeEIMap.m | 1,946 | utf_8 | 89c20cd37c96f31a3b8c3c039da124ce | %MakeEIMap
%compute gaussian filter and threshold it at DEI
%compute AVG and SD from the point cover map
%compute EI map as max deviation
function [HDmap, SDmap, LCmap] = MakeEIMap(PCmap, res, DEI)
%---------------compute thresholded gaussian filter, of DEI size
%DEI size
sigma = round(DEI /(2*re... |
github | VeroL/BioFrag-master | getPlotAbPCEI.m | .m | BioFrag-master/Software_functions/functions_EdgeResponse/getPlotAbPCEI.m | 9,381 | utf_8 | 86a6ef622c590002c544551a2d605c49 | % getPlotAbPCEI
% get Point cover and Habitat Disturbance values for each plot and save in plotLoc, for opt DEI (just for 1 DEI)
% for each species remove abundance outliers
% smooth abundance values wrt PC and HD and store as mat file (with valid positions)
function runvar = getPlotAbPCEI(runvar, param)
%INPUT... |
github | VeroL/BioFrag-master | MakeDistMap.m | .m | BioFrag-master/Software_functions/functions_EdgeResponse/MakeDistMap.m | 3,096 | utf_8 | 56eef625ce3bd4d147bdcab46a08ae6c | %MakeDistMap
%compute dist map from the PC map
function runvar = MakeDistMap(runvar, param)
%create filenames for binary map and dist map
runvar.Binmap_matfile = fullfile(runvar.folder_Data_Matlab, [runvar.PCmap_name param.PCBin]);
runvar.Distmap_matfile = fullfile(runvar.folder_Data_Matlab, [runvar.PCma... |
github | VeroL/BioFrag-master | MakeEIMapIO.m | .m | BioFrag-master/Software_functions/functions_EdgeResponse/MakeEIMapIO.m | 5,504 | utf_8 | 8f0c7a9e7272be047571e1b55ef339ec | %MakeEIMapIO
%compute optimal DEI from plot locations and distance to edge
%check DEI with user,
%then run MakeEIMap.m to compute Local Cover and SD from the point cover map and compute the EI map
function runvar = MakeEIMapIO(runvar, param)
%---------------get the DEI value, set runvar.DEI
DEIchoices = 250:25... |
github | VeroL/BioFrag-master | construct_AbPatRef7.m | .m | BioFrag-master/Software_functions/functions_EdgeResponse/construct_AbPatRef7.m | 18,139 | utf_8 | b5d31eef65d17bbf2f0c3dce766b73e8 | %making training set: simulated species abundance on PC/EI graph - per category (Forest Core,Forest Edge, etc..)
% using combinations of flipped 1D sigmoids
%these are graphs: the lowest values EI values correspond to the lowest row values so they are at the top
%needs to be displayed inverted (axis xy, not image)
fu... |
github | VeroL/BioFrag-master | getPlotDistances.m | .m | BioFrag-master/Software_functions/functions_EdgeResponse/getPlotDistances.m | 2,097 | utf_8 | c8b34732d9f9b75c6d5343b6f29bdc40 | %getPlotDistances
%compute plot distances
function runvar = getPlotDistances(runvar, param)
%load PCmap, plotLoc and distance map
load(runvar.PCmap_matfile);
load(runvar.plot_matfile);
load(runvar.Distmap_matfile);
if ~isfield(plotLoc,'dist') %#ok<NODEF> %if dist info not stored in plotLoc
... |
github | VeroL/BioFrag-master | set_software_parameters.m | .m | BioFrag-master/Software_functions/functions_DataImport/set_software_parameters.m | 1,865 | utf_8 | 49499b0525af37ee9c789f35dce9cb19 | %set_software_parameters
%param structure contains naming conventions of files and folder and messages
%these do not vary
function param = set_software_parameters
%software name for title of message windows:
param.msgbox_Title = 'Edge response';
%error msgs:
param.runaborted = ['!!! Error: ' par... |
github | VeroL/BioFrag-master | import_prepare_inputData.m | .m | BioFrag-master/Software_functions/functions_DataImport/import_prepare_inputData.m | 13,204 | utf_8 | 7110f6fa2091c09d6d2bbc2f7d160e4c | %import_prepare_inputData.m
function runvar = import_prepare_inputData(runvar, param)
%1) -------------------- grab names of user selected files:
%select species matrix file
filefilter = {['*' param.csv],'Comma Separated Values files (*.csv)'};
DialogTitle = [param.msgbox_Title ' : Select ... |
github | VeroL/BioFrag-master | importSpeciesMatrix.m | .m | BioFrag-master/Software_functions/functions_DataImport/importSpeciesMatrix.m | 4,410 | utf_8 | 4d149e1b3b853905e0777b7fc6580e33 | % function importSpeciesMatrix and store in a structure
%the format of the csv file is assumed to be:
% plot | species name 1 | species name 2 | ..
% plot name | abundance | abundance | ..
% string | num | num
%converts first column and first line to string if necessary
%order by natural ... |
github | VeroL/BioFrag-master | importPlotCoords.m | .m | BioFrag-master/Software_functions/functions_DataImport/importPlotCoords.m | 3,626 | utf_8 | 975b1785f862d13125eee55bc779565d | % function importPlotCoords import plots from CSV file and store in a matlab structure array
% reads PID####_Plots.csv of format:
% plot name | lat | lon
% string | num | num
%converts first column to string if necessary
%order by natural order
% The plots coordinates are stored in the structure PlotLoc of format... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.