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 | gmaze/gmaze_legacy-master | fitpow.m | .m | gmaze_legacy-master/matlab/codes/statistics/fitpow.m | 2,629 | utf_8 | 16c9dda6c2e1b0fdcc12df7508208c54 | % fitpow Power Law least-square curve fitting
%
% [A,B] = fitpow(x,y)
%
% Estimate coefficients A and B so that:
% y = A x^B
% is optimized in a least-square sense.
%
% Inputs:
% x,y: two series of data points
%
% Outputs:
% A,B: Coefficients of the optimized power law relation between x and y.
%
% Reference:
% Wei... |
github | gmaze/gmaze_legacy-master | myspecgram.m | .m | gmaze_legacy-master/matlab/codes/statistics/myspecgram.m | 82,115 | utf_8 | 5c4103c85cfd1f9a547927b1f0ed57bb | % MYSPECGRAM Spectrogram
%
% MYSPECGRAM(y,Fs) displays a spectrogram of signal y, assuming
% a sample rate of Fs Hz. If y is specified but Fs is not,
% a sample rate of 1 Hz is assumed. If no input arguments
% are supplied, y and Fs are taken from the default data file
% "mtlb.mat."
%
% Context me... |
github | gmaze/gmaze_legacy-master | lanfilt.m | .m | gmaze_legacy-master/matlab/codes/statistics/lanfilt.m | 2,799 | utf_8 | ac8b1b7a2ef8cfaaf8404287206229da | % LANFILT High, low, band pass filters based on Lanczos filter
%
% Y = LANFILT(X,FILTER_TYPE,HFc,LFc,N)
%
% Filter 1D signal X through a Lanczos filter.
%
% Inputs:
% X: Input signal (1 dimension of length n)
%
% FILTER_TYPE: Type of filtering you want:
% 1 : Low-pass (cutoff frequency is LFc)
% 2 : High-pass (cu... |
github | gmaze/gmaze_legacy-master | nlinvp.m | .m | gmaze_legacy-master/matlab/codes/statistics/nlinvp.m | 4,587 | utf_8 | 1b2499a9fdf6b27784db36e48fb9b202 | % nlinvp Non-Linear inverse problem
%
% [Xs, Cs, FXs, FX0] = nlinvp(X0,C0,F,CT,F0,[OPTIONS])
%
% Solve a non-linear inverse problem.
%
% Given f a set of constraints to be applied at points X
% F is the matrix of partial derivatives of f with respect to X:
% F(t,k) = d f(t) / d X(k)
% Because the problem is non-linea... |
github | gmaze/gmaze_legacy-master | bin1mat.m | .m | gmaze_legacy-master/matlab/codes/statistics/bin1mat.m | 3,507 | utf_8 | 44a47cec7c532bd5c067aaae68806219 | % bin1mat create a 1D matrix from scattered data without interpolation
%
% YG = BIN1MAT(X,Y,XI) - creates a grid from the data
% in the (usually) nonuniformily-spaced vectors (x,y)
% using grid-cell averaging (no interpolation). The grid
% dimensions are specified by the uniformily spaced vectors
% XI.
%
%... |
github | gmaze/gmaze_legacy-master | chi2conf.m | .m | gmaze_legacy-master/matlab/codes/statistics/chi2conf.m | 12,554 | utf_8 | 1fb59279d5b3418706a3f4ae5c86cbbf | % CHI2CONF Confidence interval using inverse of chi-square cdf.
% C = CHI2CONF(P,K) is the confidence interval of an unbiased power spectrum
% estimate made up of K independent measurements. C is a two element
% vector. We are P*100% confident that the true PSD lies in the interval
% [C(1)*X C(2)*X], where X... |
github | gmaze/gmaze_legacy-master | fitbest.m | .m | gmaze_legacy-master/matlab/codes/statistics/fitbest.m | 2,844 | utf_8 | a89e9e7bef6435b973c2a35b0ec1120e | % fitbest Determine the best least-square curve fitting solution
%
% [] = fitbest(x,y)
%
% Determine the best least-square curve fitting solution
%
% Created: 2013-07-25.
% Copyright (c) 2013, Guillaume Maze (Ifremer, Laboratoire de Physique des Oceans).
% All rights reserved.
% http://codes.guillaumemaze.org
%
% Re... |
github | gmaze/gmaze_legacy-master | hannfilter.m | .m | gmaze_legacy-master/matlab/codes/statistics/hannfilter.m | 896 | utf_8 | 4813501354c4f9f2457e8e93ad7a3cf4 | % HANNFILTER Disable function
%
% Hann filter of C(1,N)
%
%
% Copyright (c) 2007 Guillaume Maze.
% http://codes.guillaumemaze.org
%
% This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either versio... |
github | gmaze/gmaze_legacy-master | getdblpeaks.m | .m | gmaze_legacy-master/matlab/codes/statistics/getdblpeaks.m | 3,748 | utf_8 | 92bcd08ff534b012cbfe90a4101bfb38 | % getdblpeaks Find indices corresponding to a common peak in two series
%
% ipeaks = getdblpeaks(C1,C2,N,Z,dZpeaks,dZseries)
%
% We identify peaks of order N(1) in C1 and N(2) in C2 and then
% try to find common peaks.
%
% Inputs:
% C1 and C2 are two 1xn series.
% N = [n1 n2] specify the order of each peaks. See: get... |
github | gmaze/gmaze_legacy-master | fitlin.m | .m | gmaze_legacy-master/matlab/codes/statistics/fitlin.m | 4,506 | utf_8 | 3afb9d6dd7a563678dbef77ee8e108fb | % fitlin Linear least-square curve fitting
%
% [a,b,a_er,b_er,Rsq,Qmin] = fitlin(x,y)
%
% Estimate a and b from the linear equation:
% f(x) = a + b * x
% so that the error function
% Q = sum( [f(x) - y]^2 )
% is minimized and thus y ~ f(x).
%
% Inputs:
% x,y: two series of data points
%
% Outputs:
% a,b: Coeffici... |
github | gmaze/gmaze_legacy-master | stan.m | .m | gmaze_legacy-master/matlab/codes/statistics/stan.m | 2,431 | utf_8 | 84f88db76ea9c0685e12652763801ed3 | % stan Return a standardized serie
%
% X = stan(X,[DIM])
%
% Return a standardized serie:
% [X - mean(X,DIM)]/std(X,[],DIM)
%
% Mean and std are taken along DIM (1 by default)
%
% See also: nanstan
%
% http://codes.guillaumemaze.org
% Copyright (c) 2012, Guillaume Maze (Laboratoire de Physique des Oceans).
% Create... |
github | gmaze/gmaze_legacy-master | mcovar2.m | .m | gmaze_legacy-master/matlab/codes/statistics/mcovar2.m | 2,030 | utf_8 | cae9b5e55fe1365be421b19dfdfb8fec | % MCOVAR2 Two Dimensioal Spectral Estimation
%
% Wang Xianju
% Two Dimensioal Spectral Estimation
% Convariance Method and Modified Convariance Method
% This function implements the modified covariance method for estimation
% of the AR parameters.
%
% [a,variance]=mcovar2(x,m,n,mode)
% Input Parameters:
% ===... |
github | gmaze/gmaze_legacy-master | benchthis.m | .m | gmaze_legacy-master/matlab/codes/statistics/benchthis.m | 2,176 | utf_8 | 6285a64d4375c80b75a0c28befa1874a | % benchthis Benchmark an expression or function call (performace)
%
% [] = benchthis(EXPR,[N])
%
% Benchmark an expression or function call:
% Evaluate in the caller workspace expression 'EXPR', N (20 by defaults) times
% and return the N elapsed time necessary to evaluate the expr.
%
% Created: 2013-01-31.
% Copyrig... |
github | gmaze/gmaze_legacy-master | armodel2.m | .m | gmaze_legacy-master/matlab/codes/statistics/armodel2.m | 2,173 | utf_8 | 95848c64a95b7ba79bee11adf9d6e5ed | % ARMODEL2 Two Dimensional Spectral Estimation
%
% [a,variance] = ARMODEL2(x,m,n,mode)
%
% Wang Xianju, April 2002
% Two Dimensional Spectral Estimation
% Note: The program is for Quater Plane Model Region Support ( Causal Support)
%
%
% This function determines the autoregressive coefficients by the
% Yule-W... |
github | gmaze/gmaze_legacy-master | comp2ts.m | .m | gmaze_legacy-master/matlab/codes/statistics/comp2ts.m | 3,759 | utf_8 | 729e74b6ce5ef71ac8cce46dff19d285 | % comp2ts Plot a serie of graphes to compare two time series (scatter, crosscor)
%
% comp2ts(y1,y2)
% comp2ts(y1,y2,x1)
% comp2ts(y1,y2,x1,x2)
% comp2ts(y1,y2,x1,x2,ARG,VAL,...)
% ARG: col1, col2, leg, T
%
% Created: 2013-07-24.
% Copyright (c) 2013, Guillaume Maze (Ifremer, Laboratoire de Physique des Oceans).
% All... |
github | gmaze/gmaze_legacy-master | ncvardesc.m | .m | gmaze_legacy-master/matlab/codes/netcdf/ncvardesc.m | 2,350 | utf_8 | b0be85e109fc28f48a3f2f13fe26b394 | % ncvardesc List informations about variables of a netcdf object
%
% desc_list = ncvardesc(nc)
%
% List informations about variables of a netcdf object
%
% Created: 2009-12-02.
% Copyright (c) 2009, Guillaume Maze (Laboratoire de Physique des Oceans).
% All rights reserved.
% http://codes.guillaumemaze.org
%
% Redis... |
github | gmaze/gmaze_legacy-master | ncdimname.m | .m | gmaze_legacy-master/matlab/codes/netcdf/ncdimname.m | 2,132 | utf_8 | f95c4f67ff124bb7116533591b29e065 | % ncdimname List dimensions name of a netcdf object
%
% dimlist = ncdimname(nc)
%
% Give back the list of dimensions of the netcdf object nc
%
% Created: 2010-11-26.
% Copyright (c) 2010, Guillaume Maze (Laboratoire de Physique des Oceans).
% All rights reserved.
% http://codes.guillaumemaze.org
%
% Redistribution a... |
github | gmaze/gmaze_legacy-master | ncvarlongname.m | .m | gmaze_legacy-master/matlab/codes/netcdf/ncvarlongname.m | 2,822 | utf_8 | 03ab01adaf2a4d4ec845b940a070fa90 | % ncvarlongname List variables long name of a netcdf object
%
% [long_namelist var_name_list] = ncvarlongname(nc)
%
% Give back the list of long names of all variables of the netcdf object nc.
% If no output are requested, simply display the list on screen.
%
% Created: 2009-12-02.
% Rev. by Guillaume Maze on 2011-03-... |
github | gmaze/gmaze_legacy-master | ncvarname.m | .m | gmaze_legacy-master/matlab/codes/netcdf/ncvarname.m | 2,637 | utf_8 | 422685510117942119facc54b2883901 | % ncvarname List variable name of a netcdf object
%
% namelist = ncvarname(nc)
%
% Give back the list of names of all variables of the netcdf object nc
%
% Created: 2009-10-20.
% Copyright (c) 2009, Guillaume Maze (Laboratoire de Physique des Oceans).
% All rights reserved.
% http://codes.guillaumemaze.org
%
% Redis... |
github | d5618/graphem-master | neigh_size_adj.m | .m | graphem-master/neigh_size_adj.m | 429 | utf_8 | 89313ef20132e70b5138a18fe977f81e | % Computes an adjacency matrix where the k closest neighbors are adjacents
function adj = neighMat(lonlat,k)
p = size(lonlat,1); % Number of points
d = zeros(p,p);
adj = eye(p,p);
[X,Y] = meshgrid(lonlat(:,1)*pi/180,lonlat(:,2)*pi/180);
d = greatCircleDistance(Y,X',Y',X);
fo... |
github | d5618/graphem-master | greedy_search_d.m | .m | graphem-master/greedy_search_d.m | 2,811 | utf_8 | 35225dee6216bc737afeb6e6323f7bf7 | % greedy_search.m
% Dominique Guillot (dguillot@stanford.edu)
% 2012
%
% Input: - S = sample covariance matrix of the field
% - ind_T = temperature indices
% - ind_P = proxy indices
% - target_TT, target_TP, target_PP = target sparsity for the
% different parts of the precision matrix
%... |
github | d5618/graphem-master | graphem_cfr_bootstrap.m | .m | graphem-master/graphem_cfr_bootstrap.m | 3,108 | utf_8 | 7352cd48b847a1f8249f558eb8ecee03 | % N = number of samples (use e.g. N = 50 samples)
% We assume time decreases with the rows of "field" and "proxy".
% Note: time is assumed to go forward (i.e., field(1,:) is the oldest time).
% calib can either be a list of indices or a logical vector. In order for
% the block bootstrap to work properly, '... |
github | d5618/graphem-master | greedy_search_TT.m | .m | graphem-master/greedy_search_TT.m | 1,624 | utf_8 | ee2c1721aa8b7278827c83a1a8c1ad06 | % greedy_search.m
% Dominique Guillot (dguillot@stanford.edu)
% 2012
%
% Input: - S = sample covariance matrix of the field
% - ind_T = indices of the subset of the precision matrix
% - target_TT = target sparsity for the subset of the precision matrix
% - N = maximum number of regularization param... |
github | d5618/graphem-master | greedy_search.m | .m | graphem-master/greedy_search.m | 2,769 | utf_8 | 0d66d2a3c0c579ddecb93cb668295823 | % greedy_search.m
% Dominique Guillot (dguillot@stanford.edu)
% 2012
%
% Input: - S = sample covariance matrix of the field
% - ind_T = temperature indices
% - ind_P = proxy indices
% - target_TT, target_TP, target_PP = target sparsity for the
% different parts of the precision matrix
%... |
github | d5618/graphem-master | neigh_radius_adj.m | .m | graphem-master/neigh_radius_adj.m | 388 | utf_8 | d9ab7b51b429e724d36b9bdc8cc93181 | % Computes an adjacency matrix where two points are
% adjacent if and only if they are at distance <= d_max
function adj = distance_neigh_adj(lonlat,d_max)
p = size(lonlat,1); % Number of points
d = zeros(p,p);
adj = eye(p,p);
[X,Y] = meshgrid(lonlat(:,1)*pi/180,lonlat(:,2)*pi/180);
... |
github | d5618/graphem-master | fitggm.m | .m | graphem-master/fitggm.m | 2,902 | utf_8 | 166588f29630f22917f93bd41101f6cd | % FITGGM:
% A modified regression algorithm for estimation of an undirected Gaussian
% graphical model with known structure
% Ref: Hastie, Tibshirani, Friedman, 'The elements of statistical
% learning', Algorithm 17.1, p. 634.
% Programmed by Dominique Guillot (dguillot@usc.edu)
% Created: March 1, 2011
% Last m... |
github | d5618/graphem-master | threshpath.m | .m | graphem-master/threshpath.m | 1,690 | utf_8 | d21a67f225ad6fcd0380ea336f6bc4c2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% threshpath.m
%
% Computes a path of graphs by thresholding a sample correlation matrix
%
% Input: - S = correlation matrix
% - ind_T, ind_P = temperature and proxy indices
% - levels = vector of sparsity levels (in %, ex: levels = [1,2,3])
%
% Output: - adj... |
github | d5618/graphem-master | filter_adj.m | .m | graphem-master/filter_adj.m | 189 | utf_8 | 90e6713efe4164804699b5bd16af24ae | % Filter the adjacency matrix "adj" so that only
% points at distance <= dmax remain
function Af = filter_adj(adj,lonlat, dmax)
adj_d = dMat(lonlat,dmax);
Af = adj .* adj_d;
end |
github | Paul-Licameli/audacity-master | loudness_test.m | .m | audacity-master/tests/octave/loudness_test.m | 10,410 | utf_8 | a7a09a5ed27bab66056e4ad664e17ea5 | ## Audacity Loudness effect unit test
#
# Max Maisel
#
# This tests the Loudness effect with 30 seconds long pseudo-random stereo
# noise sequences. The test sequences have different amplitudes per
# channel and sometimes a DC component. For best test coverage, irrelevant
# parameters for the current operation are rand... |
github | Paul-Licameli/audacity-master | run_test.m | .m | audacity-master/tests/octave/run_test.m | 4,348 | utf_8 | 75c11d2514c05064e08ef2b8332ec9f0 | #!/usr/bin/octave -qf
## Audacity Octave unit test runner
#
# Max Maisel
#
if !(nargin == 1 || nargin == 2)
printf("Usage: ./testbench.m <test-file.m> [-v]\n");
exit(2);
end
arg_list = argv();
if exist(arg_list{1}, "file") != 2
printf("Specified test file does not exist!\n");
exit(2);
end
global VERBOSE;
VE... |
github | userjjb/22_6xx-DG-for-PDEs-master | dLagrange.m | .m | 22_6xx-DG-for-PDEs-master/Module 3B/dLagrange.m | 1,078 | utf_8 | 741ff29ef8525faf4c78ff8c18a707d1 | %Evaluate the value of the derivative of a Nth order Lagrange interpolation
%at the intepolation points x_i (GL quad points) for each of the basis
%vectors and return a NxN matrix where Stiffness(n,i)=L_n'(x_i)
function dL = dLagrange(N)
[Qx,Qw]=GLquad(N);
for n=1:N
dL(n,:) = LagBasisD_n(N,n,Qx);
en... |
github | huashiyiqike/LSTM-MATLAB-master | testmodel.m | .m | LSTM-MATLAB-master/testmodel.m | 7,290 | utf_8 | 98d59df90cb221893f54de4dbefa9a08 | function [inerr,dw,inLL,right ]=testmodel(W,dataall,maskall,problem )
% gradient threshold for bptt need done ,inLL,right
global mones mzeros convert in_size gate_size out_size share_size numMmcell usegpu...
share_size2 in ingate cellstate cells outgate globalData globalMask ...
signum
if nargin==1
... |
github | huashiyiqike/LSTM-MATLAB-master | slaveRun.m | .m | LSTM-MATLAB-master/dependence/matlabserver_r1/slaveRun.m | 844 | utf_8 | a64ac81156653c6140bc0579eb64f156 | % SLAVERUN runs a standard slave processing loop using a single call.
%
% slaveRun(hostname,port,gpu) initializes the slave by calling
% slaveInit(hostname,port), then enters a loop calling slaveProcessRequest()
% forever. This function is usually the only function called on a slave,
% and is often given to MATLAB as ... |
github | huashiyiqike/LSTM-MATLAB-master | serverRef.m | .m | LSTM-MATLAB-master/dependence/matlabserver_r1/serverRef.m | 1,759 | utf_8 | 840b40394cbf630400b4b759d5073bce | % SERVERREF is a wrapper for slave references that ensures their deletion
% after the server releases them. Do not create instances of this class directly.
classdef serverRef < handle
properties (SetAccess = private)
slaveIdx;
server;
end
properties (SetAccess = private, GetAccess = private)
remoteRef;
end
met... |
github | huashiyiqike/LSTM-MATLAB-master | matlab2java.m | .m | LSTM-MATLAB-master/dependence/matlabserver_r1/matlab2java.m | 1,724 | utf_8 | a2192c156b0557d0b6454bde2fc8793b | function javaVal = matlab2java(matlabVal)
fieldType=class(matlabVal);
if (strcmp(fieldType, 'struct') == 1)
if (numel(matlabVal) > 1)
% display('Warning: Can''t yet serialize structure arrays.');
end
end
if (strcmp(fieldType, 'slaveRef') == 1)
if (numel(matlabVal) > 1)
error('Error: C... |
github | huashiyiqike/LSTM-MATLAB-master | setup_paths.m | .m | LSTM-MATLAB-master/dependence/matlabserver_r1/setup_paths.m | 683 | utf_8 | d835708713845d276fdb101e9bc09bbf | % setup_paths() sets up paths for the matlabserver code to include subdirectories, etc.
% This file is sourced by the serverInit() and slaveInit() functions. You can add your
% own paths here if you like to ensure that they're added to the server and slaves.
%
% The returned variable 'rootpath' is the path of the setu... |
github | huashiyiqike/LSTM-MATLAB-master | slaveRef.m | .m | LSTM-MATLAB-master/dependence/matlabserver_r1/slaveRef.m | 1,428 | utf_8 | 1f06ac32133bd3dd655bebce4a5e53ab | classdef slaveRef < int32
methods
function H = slaveRef(data, hidx)
global state;
if (~isfield(state, 'refs'))
state.refs=cell(1,10);
end
if (~isfield(state, 'refs_occupancy'))
state.refs_occupancy=zeros(1,10);
end
if (nargin < 2)
I=find(state.refs_occupancy == 0);
if (length(I) == 0)
... |
github | huashiyiqike/LSTM-MATLAB-master | getRequest.m | .m | LSTM-MATLAB-master/dependence/matlabserver_r1/@Slave/getRequest.m | 488 | utf_8 | e41fc44c525b1b7aedfd4ecc0f20a748 | % SLAVE.GETREQUEST waits for and then returns a request from the server.
function req = getRequest(slave)
% this blocks until server creates output stream
slave.sock.setSoTimeout(2000);
while(1)
try
is=java.io.ObjectInputStream(slave.sock.getInputStream());
break;
end
end
% block unti... |
github | huashiyiqike/LSTM-MATLAB-master | processRequest.m | .m | LSTM-MATLAB-master/dependence/matlabserver_r1/@Slave/processRequest.m | 2,284 | utf_8 | e644044a2bbc045e7c70f9a4703c76fd | % SLAVE.PROCESSREQUEST processes a single request from the server.
%
% This function is the standard mechanism for interacting with the server.
% It retrieves a single request, executes the requested function, then copies
% the results of the function back to the server before returning.
function processRequest(slave)
... |
github | huashiyiqike/LSTM-MATLAB-master | hook.m | .m | LSTM-MATLAB-master/dependence/matlabserver_r1/@Slave/hook.m | 1,213 | utf_8 | 6a8749c674ef1ffadf07c90baf3dffdd | % SLAVEHOOK installs a 'hook' into the slave structure which overrides
% function calls made to the named hook.
%
% slave.hook(hookName, func, userData, noDeref) inserts a hook into the
% slave structure which will be called whenever the slave receives a request
% to call the function with name hookName. func is the f... |
github | huashiyiqike/LSTM-MATLAB-master | Slave.m | .m | LSTM-MATLAB-master/dependence/matlabserver_r1/@Slave/Slave.m | 1,372 | utf_8 | 02544775af48897161127b9aa72ac0fd | % SLAVE is a slave instance that connects to a SERVER instance to do work.
% To start a slave, use the slaveRun() method.
classdef Slave < handle
properties
rootpath
server_hostname
server_port
slave_hostname
sock
hooks
end
methods
function slave = Slave(server_hostname, server_port)
slave... |
github | huashiyiqike/LSTM-MATLAB-master | sendReply.m | .m | LSTM-MATLAB-master/dependence/matlabserver_r1/@Slave/sendReply.m | 284 | utf_8 | d71a96445b518ac59144d11c8e57ab1e | % SLAVE.SENDREPLY sends a reply to the server (or an error)
function sendReply(slave, result, err)
reply.result=result;
if (nargin >= 3)
reply.error=err;
end
os=slave.sock.getOutputStream();
oos=java.io.ObjectOutputStream(os);
oos.writeObject(matlab2java(reply));
|
github | huashiyiqike/LSTM-MATLAB-master | softmaxLoss.m | .m | LSTM-MATLAB-master/dependence/matlabserver_r1/softmax/softmaxLoss.m | 805 | utf_8 | 74bfc8d93bee71ac5319f2ccd3df0523 | % SOFTMAXLOSS Computes softmax loss on slaves connected to given server
% context.
%
% server is the server handle.
%
% w, X, y, K, and (optionally) LAMBDA are all passed to the slaves.
% The returned results from the slaves are summed up and
% returned to the caller.
%
% Returns the total negative log likelihood and s... |
github | huashiyiqike/LSTM-MATLAB-master | slaveSoftmaxLoss.m | .m | LSTM-MATLAB-master/dependence/matlabserver_r1/softmax/slaveSoftmaxLoss.m | 576 | utf_8 | 9b0b5f559473f1d591ed50fdab703119 | % Computes softmax loss and gradient for data in state.(Xstorage) and labels
% in state.(ystorage) where there are K classes. w is the weight matrix
% with K-1 columns as a vector.
function [nll, g] = slaveSoftmaxLoss(w, X, y, K, LAMBDA)
if (nargin < 5)
LAMBDA = 0;
end
[M,N] = size(X);
theta = reshape(w, ... |
github | huashiyiqike/LSTM-MATLAB-master | getReply.m | .m | LSTM-MATLAB-master/dependence/matlabserver_r1/@Server/getReply.m | 1,090 | utf_8 | 73cead5b1d74e19c5795fb1ffff4c031 | % SERVER.GETREPLY gets a reply structure stored by the slave with given index.
function result = getReply(server, slaveIdx)
if (slaveIdx > server.slaveCount)
error('Slave index is out of bounds.');
end
if (server.options.emulate)
% emulate the following:
% 1. deserialization of data by slave
% ... |
github | huashiyiqike/LSTM-MATLAB-master | sendRequest.m | .m | LSTM-MATLAB-master/dependence/matlabserver_r1/@Server/sendRequest.m | 672 | utf_8 | 01f9a9a7e71f6407061d68cf5b78e9f7 | % SERVER.SENDREQUEST sends an RPC request to a slave.
function sendRequest(server, slaveIdx, numArgsOut, reqHook, varargin)
if (slaveIdx > server.slaveCount)
error('Slave index is out of bounds.');
end
% set up output stream
req.hook = reqHook;
req.vars = varargin;
req.nargout = numArgsOut;
% set up... |
github | huashiyiqike/LSTM-MATLAB-master | Server.m | .m | LSTM-MATLAB-master/dependence/matlabserver_r1/@Server/Server.m | 7,443 | utf_8 | fedf67f9fbf10d950bd92c81e61e78b8 | % SERVER represents a handle to a server instance.
%
% To initialize a server, use:
%
% s = Server(options);
%
% See help for Server.Server and Server.rpc for usage.
classdef Server < handle
properties
slaveCount
serv_sock
slave_processes
slave_sock
options
hostname
rootpath
savedObjects
end
methods
... |
github | huashiyiqike/LSTM-MATLAB-master | rpc.m | .m | LSTM-MATLAB-master/dependence/matlabserver_r1/@Server/rpc.m | 3,504 | utf_8 | f8a19b6855fe68085ed1f52ab6ec292b | % RPC processes requests to the slaves. It is the main mechanism by which
% the server communicates with the slaves and has a "remote procedure
% call"-like interface.
%
% rpc(reqHook, ...) runs the function identified by the string 'reqHook' on
% all of the slaves with the arguments that follow.
%
% The arguments tha... |
github | huashiyiqike/LSTM-MATLAB-master | rpcsum.m | .m | LSTM-MATLAB-master/dependence/matlabserver_r1/@Server/rpcsum.m | 560 | utf_8 | c17c9a6a2048db29bc20f247ec809e70 | % SERVER.RPCSUM invokes an RPC, then sums the results from each slave.
% The sum is performed independently for each parameter.
function varargout = rpcsum(server, reqHook, varargin)
argsout = cell(1, nargout);
[argsout{:}] = server.rpc(reqHook, varargin{:});
for i=1:length(argsout)
sz = size(argsout{i}{1... |
github | huashiyiqike/LSTM-MATLAB-master | emulateSlaveProcessRequest.m | .m | LSTM-MATLAB-master/dependence/matlabserver_r1/@Server/emulateSlaveProcessRequest.m | 982 | utf_8 | 85eb126b1cc0047982161387a6755884 | function result = emulateSlaveProcessRequest(server, slaveIdx)
% emulates the following:
% 1. deserialization of data by slave
% 2. processing of request by slave
% 3. serialization of reply by slave.
% 4. de-serialization of reply by server.
% construct an imaginary slave context
hooks.exit.func = @exit;
h... |
github | huashiyiqike/LSTM-MATLAB-master | WolfeLineSearch.m | .m | LSTM-MATLAB-master/dependence/matlabserver_r1/minFunc/WolfeLineSearch.m | 11,395 | utf_8 | 3d2acf1139093fe11df95ccdf888aab8 | function [t,f_new,g_new,funEvals,H] = WolfeLineSearch(...
x,t,d,f,g,gtd,c1,c2,LS,maxLS,tolX,debug,doPlot,saveHessianComp,funObj,varargin)
%
% Bracketing Line Search to Satisfy Wolfe Conditions
%
% Inputs:
% x: starting location
% t: initial step size
% d: descent direction
% f: function value at st... |
github | huashiyiqike/LSTM-MATLAB-master | minFunc_processInputOptions.m | .m | LSTM-MATLAB-master/dependence/matlabserver_r1/minFunc/minFunc_processInputOptions.m | 3,704 | utf_8 | dc74c67d849970de7f16c873fcf155bc |
function [verbose,verboseI,debug,doPlot,maxFunEvals,maxIter,tolFun,tolX,method,...
corrections,c1,c2,LS_init,LS,cgSolve,qnUpdate,cgUpdate,initialHessType,...
HessianModify,Fref,useComplex,numDiff,LS_saveHessianComp,...
DerivativeCheck,Damped,HvFunc,bbType,cycle,...
HessianIter,outputFcn,useMex,use... |
github | huashiyiqike/LSTM-MATLAB-master | WolfeLineSearch.m | .m | LSTM-MATLAB-master/dependence/minFunc_2012/minFunc/WolfeLineSearch.m | 10,590 | utf_8 | f962bc5ae0a1e9f80202a9aaab106dab | function [t,f_new,g_new,funEvals,H] = WolfeLineSearch(...
x,t,d,f,g,gtd,c1,c2,LS_interp,LS_multi,maxLS,progTol,debug,doPlot,saveHessianComp,funObj,varargin)
%
% Bracketing Line Search to Satisfy Wolfe Conditions
%
% Inputs:
% x: starting location
% t: initial step size
% d: descent direction
% f: function v... |
github | huashiyiqike/LSTM-MATLAB-master | minFunc_processInputOptions.m | .m | LSTM-MATLAB-master/dependence/minFunc_2012/minFunc/minFunc_processInputOptions.m | 4,103 | utf_8 | 8822581c3541eabe5ce7c7927a57c9ab |
function [verbose,verboseI,debug,doPlot,maxFunEvals,maxIter,optTol,progTol,method,...
corrections,c1,c2,LS_init,cgSolve,qnUpdate,cgUpdate,initialHessType,...
HessianModify,Fref,useComplex,numDiff,LS_saveHessianComp,...
Damped,HvFunc,bbType,cycle,...
HessianIter,outputFcn,useMex,useNegCurv,precFunc... |
github | ihstevenson/matlab-eyetribe-master | readTETfile.m | .m | matlab-eyetribe-master/readTETfile.m | 657 | utf_8 | 5d5082703c9d347ce735b3e8b14019a6 | % Reads an eyetribe file saved as a result of a tcpip recording...
%
% * Author: Ian Stevenson
% * This work is licensed under a Creative Commons Attribution 4.0
% International License (https://creativecommons.org/licenses/by/4.0/).
function F = readTETfile(fname)
fid = fopen(fname);
tline = fgetl(fid);
F=[];
whi... |
github | ryanbressler/rf-ace-master | dataGenerator.m | .m | rf-ace-master/data/dataGenerator.m | 20,662 | utf_8 | 4f68d5233e526d0460f2affe2f11758e | function [traindata, testdata] = dataGenerator( par )
%
% function [traindata, testdata] = dataGenerator( par )
%
% Generates data for testing machine learning algorithms, especially feature
% selection algorithms.
%
% TODO Does not yet generate redundant variables.
%
%--------------------------------------... |
github | ryanbressler/rf-ace-master | deltaImpurity.m | .m | rf-ace-master/test/matlab/deltaImpurity.m | 2,039 | utf_8 | 5b827514c24f52e68ebda1ad5ff42f15 | function DI = deltaImpurity(x_left,x_right,isNumerical)
%DI = deltaImpurity(x,idx)
%
%Returns decrease in impurity when data x is split into two
%halves, "x_left" and "x_right". Type of data is indicated by
% isNumerical flag
assert(~any(isnan(x_left)));
assert(~any(isnan(x_right)));
% Calculate the decrease using t... |
github | shayo/Planner-master | EntryPoint.m | .m | Planner-master/EntryPoint.m | 11,191 | utf_8 | d049b2e6d16feeb512ff36c5f8598b41 | function EntryPoint
clear global g_strctWindows g_strctApp g_strctModule g_acModules g_iCurrModule
clear persistent
global g_strctWindows g_strctApp g_strctModule g_acModules g_iCurrModule
% if ishandle(1,'figure')
% close(1);
% drawnow
% end;
warning off
%clear all
addpath(fullfile('.', 'MEX'));
addpath(genp... |
github | shayo/Planner-master | fnGenerateSurfacePlotFor_FEF_Paper_Julien.m | .m | Planner-master/AnalysisScripts/fnGenerateSurfacePlotFor_FEF_Paper_Julien.m | 10,294 | utf_8 | 3cc7e5caddcde723f163a4b76510a476 | function fnGenerateSurfacePlotFor_FEF_Paper_Julien()
% strSessionName = 'D:\Data\Doris\Planner\Julien\Julien_Session_For_Optogenetics_Publication.mat';
% PlannerAPI('StartPlanner');
% bSuccessful = PlannerAPI('LoadSession', strSessionName);
% 1. Load White matter surface
strRH_Root = 'D:\Data\Doris\Planner\Julien\1002... |
github | shayo/Planner-master | parseXML.m | .m | Planner-master/AnalysisScripts/parseXML.m | 2,018 | utf_8 | 2724c1f93ec07c68fe29c10e2ae7562f | function theStruct = parseXML(filename)
% PARSEXML Convert XML file to a MATLAB structure.
try
tree = xmlread(filename);
catch
error('Failed to read XML file %s.',filename);
end
% Recurse over child nodes. This could run into problems
% with very deeply nested trees.
try
theStruct = parseChildNodes(tree);
ca... |
github | shayo/Planner-master | TestPlannerAPI_FunctionalOverlaySurfaces.m | .m | Planner-master/AnalysisScripts/TestPlannerAPI_FunctionalOverlaySurfaces.m | 7,795 | utf_8 | ade912a71f1ea5b80a6f1b97718dc129 | function TestPlannerAPI_FunctionalOverlaySurfaces
strSessionName = 'D:\Data\Doris\Planner\Julien\Julien_Session_For_Optogenetics_Publication.mat';
PlannerAPI('StartPlanner');
bSuccessful = PlannerAPI('LoadSession', strSessionName);
% 1. Load White matter surface
strWhiteMatterFile = 'D:\Data\Doris\Planner\Julien\1002... |
github | shayo/Planner-master | fnGenerateSurfacePlotFor_FEF_Paper_Bert.m | .m | Planner-master/AnalysisScripts/fnGenerateSurfacePlotFor_FEF_Paper_Bert.m | 11,131 | utf_8 | a1d49689ebd68693cda9d604576b0f53 | function fnGenerateSurfacePlotFor_FEF_Paper_Bert()
% 1. Load White matter surface
strRH_Root = 'D:\Data\Doris\Planner\Bert\New Reference For Surface Recon\RH\';
strWhiteMatterFile = [strRH_Root,'rh.white'];
strPialFile = [strRH_Root,'rh.pial'];
strInflatedFile = [strRH_Root,'rh.inflated'];
strCurvatureFile = [strR... |
github | shayo/Planner-master | stlwrite.m | .m | Planner-master/Utilities/stlwrite.m | 8,719 | utf_8 | c8e0c3cfa55b3e86cda04dac85d9bd15 | function stlwrite(filename, varargin)
%STLWRITE Write STL file from patch or surface data.
%
% STLWRITE(FILE,fv) writes a stereolithography (STL) file to FILE for a triangulated
% patch defined by FV (a structure with fields 'vertices' and 'faces').
%
% STLWRITE(FILE,FACES,VERTICES) takes faces and vertices sep... |
github | shayo/Planner-master | AtlasMarker.m | .m | Planner-master/Modules/AtlasMarker/AtlasMarker.m | 42,765 | utf_8 | b549bc02000c351449f0d602d7895189 | function varargout = AtlasMarker(varargin)
% ATLASMARKER MATLAB code for AtlasMarker.fig
% ATLASMARKER, by itself, creates a new ATLASMARKER or raises the existing
% singleton*.
%
% H = ATLASMARKER returns the handle to a new ATLASMARKER or the handle to
% the existing singleton*.
%
% ATLASMARK... |
github | shayo/Planner-master | fnMyImpoly.m | .m | Planner-master/Modules/AtlasMarker/fnMyImpoly.m | 29,021 | utf_8 | 6306798e221e607bd2cb62bcc6e60b59 | %IMPOLY Create draggable, resizable polygon.
% H = IMPOLY begins interactive placement of a polygon on the
% current axes. The function returns H, a handle to an impoly object.
%
% During interactive placement, left-click to place polygon
% vertices. Double-click to add a vertex and finish initial placement of
... |
github | shayo/Planner-master | fnMyClose.m | .m | Planner-master/Modules/AtlasMarker/fnMyClose.m | 278 | utf_8 | ab91a5a1935b9ae27842d9f7d4cca4d4 | function a3bOut=fnMyClose(a3bInput,fSize)
a3bOut = fnMyErode(fnMyDilate(a3bInput,fSize-0.0001),fSize-0.0001);
function a3bOutput=fnMyErode(a3bInput,fSize)
a3bOutput = bwdist(~a3bInput)>fSize;
function a3bOutput=fnMyDilate(a3bInput,fSize)
a3bOutput = bwdist(a3bInput)<fSize;
|
github | shayo/Planner-master | roiParseInputs.m | .m | Planner-master/Modules/AtlasMarker/roiParseInputs.m | 7,507 | utf_8 | c7dd5c6795899d1e527b611343c4a65c | function [common_args,specific_args] = roiParseInputs(low,high,varargin,client_name,specific_arg_names)
%roiParseInputs Parse inputs of ROI tools.
% [commonArgs,specific_args] =
% roiParseInputs(LOW,HIGH,VARARGIN,CLIENT_NAME,SPECIFIC_ARG_NAMES) parses
% the input of an ROI tool. LOW and HIGH are the minimum ... |
github | shayo/Planner-master | fnRegisterationCallback.m | .m | Planner-master/Modules/Registeration/fnRegisterationCallback.m | 58,395 | utf_8 | aae220d62e9d98c7a866204255e0eb10 | function fnRegisterationCallback(strCallback, varargin)
global g_strctWindows g_strctModule
switch strCallback
case 'RunFLIRT'
fnRunFLIRT();
case 'ResetReg'
fnResetReg();
case 'SolveMarkers'
fnSolveMarkers();
case 'DelMarker'
fnDelMarker();
case 'SelectMarker'
... |
github | shayo/Planner-master | fnRegisterationInit.m | .m | Planner-master/Modules/Registeration/fnRegisterationInit.m | 10,655 | utf_8 | 55394c12a7a1dce3e81c99fbce30806c | function bInitOK = fnRegisterationInit(strctParams)
% The way module appearance is controlled is by g_strctModule.m_hWindowsPanel
% and g_strctModule.m_ahAxes, all other stuff are module-dependent
global g_strctModule g_strctWindows
g_strctModule.m_bVolumeLoaded = false;
g_strctModule.m_strDefaultFilesFolder = 'D:\Da... |
github | shayo/Planner-master | fnGridMeasureCallback.m | .m | Planner-master/Modules/GridMeasure/fnGridMeasureCallback.m | 36,370 | utf_8 | c00d2692800af3a4406b8326d17823af | function GridMeasureCallback(strCallback, varargin)
global g_strctWindows g_strctModule
switch strCallback
case 'MouseMove'
strctMouseOp = varargin{1};
fnMouseMove(strctMouseOp);
case 'MouseUp'
strctMouseOp = varargin{1};
fnMouseUp(strctMouseOp);
case 'MouseDown'
strc... |
github | shayo/Planner-master | fnGridMeasureInit.m | .m | Planner-master/Modules/GridMeasure/fnGridMeasureInit.m | 6,659 | utf_8 | b61b8ff30b0ab4b39d07a4b6fa92a3c7 | function GridMeasureInit(strctParams)
% The way module appearance is controlled is by g_strctModule.m_hWindowsPanel
% and g_strctModule.m_ahAxes, all other stuff are module-dependent
global g_strctModule g_strctWindows
g_strctModule.m_strDefaultFilesFolder = 'D:\Data\Doris\Grids\';
g_strctModule.m_iCurrGrid = 0;
g_s... |
github | shayo/Planner-master | maximize_new.m | .m | Planner-master/Modules/maximize/maximize_new.m | 797 | utf_8 | b78313eade36db2b7c3a8bf35f2fc587 | %MAXIMIZE Maximize a figure window to fill the entire screen
%
% Examples:
% maximize
% maximize(hFig)
%
% Maximizes the current or input figure so that it fills the whole of the
% screen that the figure is currently on. This function is platform
% independent, but it does require findjobj to be on the MATLAB path... |
github | shayo/Planner-master | ImageRegis.m | .m | Planner-master/Modules/ImageRegis/ImageRegis.m | 80,707 | utf_8 | 7583aeb77b937efe2b83ce3e4c49aa3b | function varargout = ImageRegis(varargin)
% IMAGEREGIS MATLAB code for ImageRegis.fig
% IMAGEREGIS, by itself, creates a new IMAGEREGIS or raises the existing
% singleton*.
%
% H = IMAGEREGIS returns the handle to a new IMAGEREGIS or the handle to
% the existing singleton*.
%
% IMAGEREGIS('CALL... |
github | shayo/Planner-master | fnConvertAnnotationToMRICoordinates.m | .m | Planner-master/Modules/ImageRegis/fnConvertAnnotationToMRICoordinates.m | 6,171 | utf_8 | d80692595ef21d725f18ec3e54252c99 | function [apt3fAnnotationInMRImm, acAnnotationType, acSliceName, aiAnnotationIndex]=fnConvertAnnotationToMRICoordinates(strctFluorescence, strctPlanner)
%% Convert annotation to MRI coordinates
% This is tricky. it involves multiple transformations
% and the data is in two separate sources (strctFluorescence,
% strctPl... |
github | shayo/Planner-master | fnDigitalReadoutInit.m | .m | Planner-master/Modules/DigitalReadout/fnDigitalReadoutInit.m | 6,753 | utf_8 | 773f92731be74c009e24067864781546 | function bInitOK = fnDigitalReadoutInit(strctParams)
% The way module appearance is controlled is by g_strctModule.m_hWindowsPanel
% and g_strctModule.m_ahAxes, all other stuff are module-dependent
global g_strctModule g_strctWindows
% Initialize DAQ
iBoardNum = 0;
g_strctModule.m_afCalibX = [-60 -50 -40 -30 -20 -10 0... |
github | shayo/Planner-master | fnDigitalReadoutCallback.m | .m | Planner-master/Modules/DigitalReadout/fnDigitalReadoutCallback.m | 6,090 | utf_8 | ba68d1f1187b9a38a7f15251ecf55688 | function fnDigitalReadoutCallback(strCallback, varargin)
switch strCallback
case 'PrepareForModuleSwitch'
% Stop timer
fnStopUpdateTimer();
case 'ModuleSwitch'
% Start timer
fnStartUpdateTimer();
case 'SetValue1NaN'
fnSetValue1NaN();
case 'SetValue2NaN'
f... |
github | shayo/Planner-master | fnVolumeViewer.m | .m | Planner-master/Modules/VolumeViewer/fnVolumeViewer.m | 22,276 | utf_8 | f0b0ff7b93910d08ce21c6ea01477356 | function varargout = fnVolumeViewer(varargin)
% This is the GUI handler that shows a volume and marks the position of
% large hessian values and of found blood vessels
gui_Singleton = 0;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @fnVolumeViewerOp... |
github | shayo/Planner-master | fnVolumeViewerCallback.m | .m | Planner-master/Modules/VolumeViewer/fnVolumeViewerCallback.m | 40,508 | utf_8 | 12a55d6edfeb873e5b66c4cfaa6373fa | function fnVolumeViewerCallback(strCallback, varargin)
global g_strctWindows g_strctModule
switch strCallback
case 'MouseMove'
strctMouseOp = varargin{1};
fnMouseMove(strctMouseOp);
case 'MouseUp'
strctMouseOp = varargin{1};
fnMouseUp(strctMouseOp);
case 'MouseDown'
s... |
github | shayo/Planner-master | fnVolumeViewerInit.m | .m | Planner-master/Modules/VolumeViewer/fnVolumeViewerInit.m | 8,800 | utf_8 | e8e2146d2d88a884afff1f1f476f2aad | function fnVolumeViewerInit(strctParams)
% The way module appearance is controlled is by g_strctModule.m_hWindowsPanel
% and g_strctModule.m_ahAxes, all other stuff are module-dependent
global g_strctModule g_strctWindows
g_strctModule.m_bVolumeLoaded = false;
g_strctModule.m_strDefaultFilesFolder = 'D:\Data\Doris\MR... |
github | shayo/Planner-master | HistologyAssistant.m | .m | Planner-master/Modules/HistologyAssistant/HistologyAssistant.m | 5,899 | utf_8 | 052d85915f60cdea9bb4926fea0ad67f | function varargout = HistologyAssistant(varargin)
% HISTOLOGYASSISTANT MATLAB code for HistologyAssistant.fig
% HISTOLOGYASSISTANT, by itself, creates a new HISTOLOGYASSISTANT or raises the existing
% singleton*.
%
% H = HISTOLOGYASSISTANT returns the handle to a new HISTOLOGYASSISTANT or the handle to
%... |
github | shayo/Planner-master | AtlasReg.m | .m | Planner-master/Modules/AtlasReg/AtlasReg.m | 44,932 | utf_8 | 274e0aaabd0f0aac9761fe5259c483b6 | function varargout = AtlasReg(varargin)
% ATLASREG MATLAB code for AtlasReg.fig
% ATLASREG, by itself, creates a new ATLASREG or raises the existing
% singleton*.
%
% H = ATLASREG returns the handle to a new ATLASREG or the handle to
% the existing singleton*.
%
% ATLASREG('CALLBACK',hObject,ev... |
github | shayo/Planner-master | fnDICOM_ImportInit.m | .m | Planner-master/Modules/DICOM_Import/fnDICOM_ImportInit.m | 1,457 | utf_8 | 6619508f1a855f40d3da0c11776be4c7 | function bInitOK = fnDICOM_ImportInit(strctParams)
% The way module appearance is controlled is by g_strctModule.m_hWindowsPanel
% and g_strctModule.m_ahAxes, all other stuff are module-dependent
global g_strctModule g_strctWindows
g_strctModule.m_bVolumeLoaded = false;
if ~exist( strctParams.m_strctConfig.m_strctDire... |
github | shayo/Planner-master | fnRecursiveGetSubDirectories.m | .m | Planner-master/Modules/DICOM_Import/fnRecursiveGetSubDirectories.m | 664 | utf_8 | d53dfbb1796429e4db78c4f7b01b4ab8 | function [acstrResult] = fnRecursiveGetSubDirectories(strStartDir)
% This function returns all sub-directories of strStartDir (recursively)
% It is used mainly to get the list of all sub-directories that include
% matlab code(so they could be entered to matlab path upon exeution...)
%
strAllSubPaths = [';',genpath(strS... |
github | shayo/Planner-master | StereotacticDesign.m | .m | Planner-master/Modules/StereotacticDesign/StereotacticDesign.m | 18,799 | utf_8 | 21b5fde04a3dc985545b3cfd17c86188 | function varargout = StereotacticDesign(varargin)
% STEREOTACTICDESIGN M-file for StereotacticDesign.fig
% STEREOTACTICDESIGN, by itself, creates a new STEREOTACTICDESIGN or raises the existing
% singleton*.
%
% H = STEREOTACTICDESIGN returns the handle to a new STEREOTACTICDESIGN or the handle to
% ... |
github | shayo/Planner-master | fnRobotInverse.m | .m | Planner-master/Modules/MyRobot/fnRobotInverse.m | 2,803 | utf_8 | abdb2ff8879e3a3a10d53193d8432463 | function afConf = fnRobotInverse(strctRobot, a2fTarget, abFixedJoints, afFixedValue, afInitialSolution, iNumIterations)
iNumJoints = size(strctRobot.m_a2fDH,1);
fStopCondition = 1e-6; % Changed from 1e-12
afConf = afInitialSolution;
abFixedJoints = abFixedJoints>0;
afConf(abFixedJoints) = afFixedValue(abFixedJoints);
i... |
github | shayo/Planner-master | fnElectrodePlanningNewInit.m | .m | Planner-master/Modules/ElectrodePlanning/fnElectrodePlanningNewInit.m | 65,917 | utf_8 | 04ad0c1e6217f191ce8ae314c72ecd9e | function bInitOK = fnElectrodePlanningNewInit(strctParams)
% The way module appearance is controlled is by g_strctModule.m_hWindowsPanel
% and g_strctModule.m_ahAxes, all other stuff are module-dependent
global g_strctModule g_strctWindows
g_strctModule.m_bVolumeLoaded = false;
bInitOK = true;
%strDefaultFontName = 'H... |
github | shayo/Planner-master | fnElectrodePlanningNewCallback.m | .m | Planner-master/Modules/ElectrodePlanning/fnElectrodePlanningNewCallback.m | 53,713 | utf_8 | 7b97f7a027883bbd6ed237b3dd435cdc | function fnElectrodePlanningNewCallback(strCallback, varargin)
global g_strctWindows g_strctModule %#ok
switch strCallback
case 'StereotaxHelper'
fnStereotaxHelper();
case 'ModifyImageSeries'
fnModifyImageSeries();
case 'ToggleLabelsVisibility'
fnToggleLabelsVisibility();
case 'S... |
github | shayo/Planner-master | fnLoadAnatVol.m | .m | Planner-master/Modules/ElectrodePlanning/Anatomicals/fnLoadAnatVol.m | 817 | utf_8 | 52c1935882768c2e640e525c9008d41e |
function fnLoadAnatVol()
global g_strctModule
[strFile, strPath] = uigetfile([g_strctModule.m_strDefaultFilesFolder,'*.mgz;*.img;*.nii'],'MultiSelect','off');
if strFile(1) == 0
return;
end;
% Start the import process
strFilename = fullfile(strPath,strFile);
strctVol=fnQuickAddVolume(strFilename);
% Add the ... |
github | shayo/Planner-master | fnSetNewDefaultView.m | .m | Planner-master/Modules/ElectrodePlanning/Anatomicals/fnSetNewDefaultView.m | 437 | utf_8 | b33937fd55309bdf14c6fe5c24777683 |
function fnSetNewDefaultView()
global g_strctModule
g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_strctCrossSectionHoriz = g_strctModule.m_strctCrossSectionXY;
g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_strctCrossSectionCoronal = g_strctModule.m_strctCrossSectionXZ;
g_strctModule.m_acAna... |
github | shayo/Planner-master | fnSetCurrAnatVol.m | .m | Planner-master/Modules/ElectrodePlanning/Anatomicals/fnSetCurrAnatVol.m | 2,201 | utf_8 | a5fa6eaeb47c2b5bda503215dc83e5da |
function fnSetCurrAnatVol()
global g_strctModule
if isfield(g_strctModule.m_strctPanel,'m_hMainVolSurface') && ~isempty(g_strctModule.m_strctPanel.m_hMainVolSurface) && ishandle(g_strctModule.m_strctPanel.m_hMainVolSurface)
delete(g_strctModule.m_strctPanel.m_hMainVolSurface);
g_strctModule.m_strctPanel.m_hMai... |
github | shayo/Planner-master | fnApplyAnatTrans.m | .m | Planner-master/Modules/ElectrodePlanning/Anatomicals/fnApplyAnatTrans.m | 655 | utf_8 | 67cadef9faf8f74aff6aeafc712717d3 |
function fnApplyAnatTrans()
global g_strctModule
if g_strctModule.m_iCurrAnatVol == 0
return;
end;
[strFile, strPath] = uigetfile([g_strctModule.m_strDefaultFilesFolder,'*.reg'],'Select transformation file');
if strFile(1) == 0
return;
end;
a2fTrans = fnReadRegisteration([strPath, strFile]);
g_strctModule.m_... |
github | shayo/Planner-master | fnExportAnatRegMatrix.m | .m | Planner-master/Modules/ElectrodePlanning/Anatomicals/fnExportAnatRegMatrix.m | 624 | utf_8 | 9807d0129d1dd98fc7b431604cff5366 |
function fnExportAnatRegMatrix()
global g_strctModule
if g_strctModule.m_iCurrAnatVol == 0
return;
end;
[strFile, strPath] = uiputfile([g_strctModule.m_strDefaultFilesFolder,'*.reg'],'Select transformation file');
if strFile(1) == 0
return;
end;
strFilename =fullfile(strPath,strFile);
strVolType = 'round'; % m... |
github | shayo/Planner-master | fnApplyAnatInvTrans.m | .m | Planner-master/Modules/ElectrodePlanning/Anatomicals/fnApplyAnatInvTrans.m | 545 | utf_8 | 4475390d70191a00746100cb07cc39a7 |
function fnApplyAnatInvTrans()
global g_strctModule
if g_strctModule.m_iCurrAnatVol == 0
return;
end;
[strFile, strPath] = uigetfile([g_strctModule.m_strDefaultFilesFolder,'*.reg'],'Select transformation file');
if strFile(1) == 0
return;
end;
a2fTrans = fnReadRegisteration([strPath, strFile]);
g_strctModule.m... |
github | shayo/Planner-master | fnPrintInfoAnat.m | .m | Planner-master/Modules/ElectrodePlanning/Anatomicals/fnPrintInfoAnat.m | 227 | utf_8 | 373275c5805a6ed83ecd19fad8d6f0d0 |
function fnPrintInfoAnat()
global g_strctModule
if ~isempty(g_strctModule.m_acAnatVol) && g_strctModule.m_iCurrAnatVol >0
h=msgbox(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_strFileName);
waitfor(h);
end |
github | shayo/Planner-master | EarBarZeroRegGUI.m | .m | Planner-master/Modules/ElectrodePlanning/EarBarZeroReg/EarBarZeroRegGUI.m | 35,068 | utf_8 | 65ba4801b70bf54a05296d382128c466 | function varargout = EarBarZeroRegGUI(varargin)
% EARBARZEROREGGUI MATLAB code for EarBarZeroRegGUI.fig
% EARBARZEROREGGUI, by itself, creates a new EARBARZEROREGGUI or raises the existing
% singleton*.
%
% H = EARBARZEROREGGUI returns the handle to a new EARBARZEROREGGUI or the handle to
% the exis... |
github | shayo/Planner-master | OrientationWizard.m | .m | Planner-master/Modules/ElectrodePlanning/ImportWizard/OrientationWizard.m | 61,841 | utf_8 | a7334776511ac46ebb369dd5f73f60d7 | function varargout = OrientationWizard(varargin)
% ORIENTATIONWIZARD M-file for OrientationWizard.fig
% ORIENTATIONWIZARD, by itself, creates a new ORIENTATIONWIZARD or raises the existing
% singleton*.
%
% H = ORIENTATIONWIZARD returns the handle to a new ORIENTATIONWIZARD or the handle to
% the ex... |
github | shayo/Planner-master | ImportWizard.m | .m | Planner-master/Modules/ElectrodePlanning/ImportWizard/ImportWizard.m | 8,349 | utf_8 | dccabd378d51d6460d19e57d6fd9084a | function varargout = ImportWizard(varargin)
% IMPORTWIZARD M-file for ImportWizard.fig
% IMPORTWIZARD, by itself, creates a new IMPORTWIZARD or raises the existing
% singleton*.
%
% H = IMPORTWIZARD returns the handle to a new IMPORTWIZARD or the handle to
% the existing singleton*.
%
% IMPORTW... |
github | shayo/Planner-master | QuickOrientationWizard.m | .m | Planner-master/Modules/ElectrodePlanning/ImportWizard/QuickOrientationWizard.m | 10,426 | utf_8 | c36d6c7f9518b994870a1414582c1db8 | function varargout = QuickOrientationWizard(varargin)
% QUICKORIENTATIONWIZARD MATLAB code for QuickOrientationWizard.fig
% QUICKORIENTATIONWIZARD, by itself, creates a new QUICKORIENTATIONWIZARD or raises the existing
% singleton*.
%
% H = QUICKORIENTATIONWIZARD returns the handle to a new QUICKORIENTAT... |
github | shayo/Planner-master | fnBuildCylinderWithPlane.m | .m | Planner-master/Modules/ElectrodePlanning/Grids/fnBuildCylinderWithPlane.m | 1,836 | utf_8 | bbfd315cd25b6916e33b6c73dccc8a82 | function astrctMesh = fnBuildCylinderWithPlane(fHeight, fDiameter, afColor, fTilt, fInnerRotation, fCenterX, fCenterY,fOuterRotation,bLongGrid)
astrctMesh(1) = fnGenPlane(fDiameter,fHeight,afColor*0.6);
fLongGridMM = 80;
if bLongGrid
astrctMesh(2) = fnCreateCylinderMesh(fDiameter, -fLongGridMM, 0, 20, afColor);
... |
github | shayo/Planner-master | fnSelectGrid.m | .m | Planner-master/Modules/ElectrodePlanning/Grids/fnSelectGrid.m | 404 | utf_8 | c25ed77cdfa4426db86a889646cd37bd |
function fnSelectGrid()
global g_strctModule
iSelectedGrid = get(g_strctModule.m_strctPanel.m_hGridList,'value');
if isempty(iSelectedGrid) || g_strctModule.m_iCurrChamber == 0
return;
end;
g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_astrctChambers(g_strctModule.m_iCurrChamber).m_iGridSelected = iSe... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.