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 | xyza11808/MATLAB-master | convertcmpsdp.m | .m | MATLAB-master/ca_source_extraction-master/cvx/sdpt3/Solver/convertcmpsdp.m | 3,465 | utf_8 | 6bd9a62cfb0249da5d75665cfb26063b | %%*********************************************************
%% convertcmpsdp: convert SDP with complex data into one
%% with real data by converting
%%
%% C - sum_{k=1}^m yk*Ak psd
%% to
%% [CR,-CI] - sum ykR*[AkR,-AkI] psd
%% [CI, CR] [AkI, AkR]
%%
%% ykI = 0 for k = 1:m
%%
%% [bblk,AAt,C... |
github | xyza11808/MATLAB-master | sqlpsummary.m | .m | MATLAB-master/ca_source_extraction-master/cvx/sdpt3/Solver/sqlpsummary.m | 4,047 | utf_8 | 78361a4e3dfeaeb73a7102b08ad30733 | %%*****************************************************************************
%% sqlpsummary: print summary
%%
%% SDPT3: version 3.1
%% Copyright (c) 1997 by
%% K.C. Toh, M.J. Todd, R.H. Tutuncu
%% Last Modified: 16 Sep 2004
%%*****************************************************************************
function sq... |
github | xyza11808/MATLAB-master | checkdepconstr.m | .m | MATLAB-master/ca_source_extraction-master/cvx/sdpt3/Solver/checkdepconstr.m | 6,926 | utf_8 | 186362786fef9d7d3328ab9e5a9e117c | %%*****************************************************************************
%% checkdepconst: compute AAt to determine if the
%% constraint matrices Ak are linearly independent.
%%
%% [At,b,y,idxB,neardepconstr,feasible,AAt] = checkdepconstr(blk,At,b,y,rmdepconstr);
%%
%% rmdepconstr = 1, if want to rem... |
github | xyza11808/MATLAB-master | convertRcone.m | .m | MATLAB-master/ca_source_extraction-master/cvx/sdpt3/Solver/convertRcone.m | 948 | utf_8 | afa3b210699dbf796a257cb53e92ef0d | %%***************************************************************
%% convertRcone: convert rotated cone to socp cone
%%
%% [blk,At,C,b,T] = convertRcone(blk,At,C,b);
%%
%%***************************************************************
function [blk,At,C,b,T] = convertRcone(blk,At,C,b)
T = cell(size(blk,1),1);
for p =... |
github | xyza11808/MATLAB-master | qops.m | .m | MATLAB-master/ca_source_extraction-master/cvx/sdpt3/Solver/qops.m | 1,421 | utf_8 | bddd4e93643ef0eb5b6868ef41d2bec7 | %%********************************************************
%% qops: Fu = qops(pblk,w,f,options,u);
%%
%% options = 1, Fu(i) = <wi,fi>
%% = 2, Fu(i) = 2*wi(1)*fi(1)-<wi,fi>
%% = 3, Fui = w(i)*fi
%% = 4, Fui = w(i)*fi, Fui(1) = -Fui(1).
%% options = 5, Fu = w [ f'*u ; ub + fb*alp ], where
%% ... |
github | xyza11808/MATLAB-master | HKMdirfun.m | .m | MATLAB-master/ca_source_extraction-master/cvx/sdpt3/Solver/HKMdirfun.m | 1,703 | utf_8 | 2e90b8de8daed6f5a9a6894232dbff6a | %%*******************************************************************
%% HKMdirfun: compute (dX,dZ), given dy, for the HKM direction.
%%
%% SDPT3: version 3.1
%% Copyright (c) 1997 by
%% K.C. Toh, M.J. Todd, R.H. Tutuncu
%% Last Modified: 16 Sep 2004
%%*******************************************************************... |
github | xyza11808/MATLAB-master | symqmr.m | .m | MATLAB-master/ca_source_extraction-master/cvx/sdpt3/Solver/symqmr.m | 3,957 | utf_8 | bf28cb72305cb0378a7b572d42f39ff6 | %%*************************************************************************
%% symqmr: symmetric QMR with left (symmetric) preconditioner.
%% The preconditioner used is based on the analytical
%% expression of inv(A).
%%
%% [x,resnrm,solve_ok] = symqmr(A,b,L,tol,maxit)
%%
%% child function: linsysolvefu... |
github | xyza11808/MATLAB-master | validate_startpoint.m | .m | MATLAB-master/ca_source_extraction-master/cvx/sdpt3/Solver/validate_startpoint.m | 3,067 | utf_8 | 572146bf8639c3d5066b6a790bca3ba8 | %%***********************************************************************
%% validate_startpoint: validate_startpoint starting point X0,y0,Z0
%%
%%
%% SDPT3: version 3.1
%% Copyright (c) 1997 by
%% K.C. Toh, M.J. Todd, R.H. Tutuncu
%% Last Modified: 16 Sep 2004
%%********************************************************... |
github | xyza11808/MATLAB-master | Atyfun.m | .m | MATLAB-master/ca_source_extraction-master/cvx/sdpt3/Solver/Atyfun.m | 1,471 | utf_8 | 5af173811d5528ab49ca2a48bd4748ce | %%*********************************************************
%% Atyfun: compute sum_{k=1}^m yk*Ak.
%%
%% Q = Atyfun(blk,At,permA,isspAy,y);
%%
%% Note: permA and isspAy may be set to [].
%%
%% SDPT3: version 3.1
%% Copyright (c) 1997 by
%% K.C. Toh, M.J. Todd, R.H. Tutuncu
%% Last Modified: 16 Sep 2004
%%**************... |
github | xyza11808/MATLAB-master | blkcholfun.m | .m | MATLAB-master/ca_source_extraction-master/cvx/sdpt3/Solver/blkcholfun.m | 1,247 | utf_8 | 6d78842d748fad818d79a003e1238916 | %%******************************************************************
%% blkcholfun: compute Cholesky factorization of X.
%%
%% [Xchol,indef] = blkcholfun(blk,X,permX);
%%
%% X = Xchol'*Xchol;
%%
%% SDPT3: version 3.1
%% Copyright (c) 1997 by
%% K.C. Toh, M.J. Todd, R.H. Tutuncu
%% Last Modified: 16 Sep 2004
%%*******... |
github | xyza11808/MATLAB-master | smat.m | .m | MATLAB-master/ca_source_extraction-master/cvx/sdpt3/Solver/smat.m | 880 | utf_8 | 184f4081013cebeae6150a22b224ebf9 | %%*********************************************************
%% smat: compute the matrix smat(x).
%%
%% M = smat(blk,x,isspM);
%%
%% SDPT3: version 3.1
%% Copyright (c) 1997 by
%% K.C. Toh, M.J. Todd, R.H. Tutuncu
%% Last Modified: 16 Sep 2004
%%**********************************************************
function M = ... |
github | xyza11808/MATLAB-master | sqlpcheckconvg.m | .m | MATLAB-master/ca_source_extraction-master/cvx/sdpt3/Solver/sqlpcheckconvg.m | 8,298 | utf_8 | 6acb41aefb05d5a53dbd501dabab2b33 | %%*****************************************************************************
%% sqlpcheckconvg: check convergence.
%%
%% SDPT3: version 3.1
%% Copyright (c) 1997 by
%% K.C. Toh, M.J. Todd, R.H. Tutuncu
%% Last Modified: 16 Sep 2004
%%*****************************************************************************
func... |
github | xyza11808/MATLAB-master | SDPT3soln_SEDUMIsoln.m | .m | MATLAB-master/ca_source_extraction-master/cvx/sdpt3/Solver/SDPT3soln_SEDUMIsoln.m | 2,743 | utf_8 | 1f7236a38116d782e7084afc40e90a10 | %%**********************************************************
%% SDPT3soln_SEDUMIsoln: convert SQLP solution in SDPT3 format to
%% SeDuMi format
%%
%% [xx,yy,zz] = SDPT3soln_SEDUMIsoln(blk,X,y,Z,perm);
%%
%% usage: load SEDUMI_data_file (containing say, A,b,c,K)
%% [blk,At,C,b,perm] = read_s... |
github | xyza11808/MATLAB-master | detect_ublk.m | .m | MATLAB-master/ca_source_extraction-master/cvx/sdpt3/Solver/detect_ublk.m | 2,815 | utf_8 | 819f087d73a97e1717b952ca2f3a407d | %%*******************************************************************
%% detect_ublk: search for implied free variables in linear
%% block.
%% [blk2,At2,C2,ublkinfo] = detect_ublk(blk,At,C);
%%
%% i1,i2: indices corresponding to splitting of unrestricted varaibles
%% i3 : remaining indices in the linear ... |
github | xyza11808/MATLAB-master | combine_blk.m | .m | MATLAB-master/ca_source_extraction-master/cvx/sdpt3/Solver/combine_blk.m | 2,358 | utf_8 | 205279faec8f7b11c04bc75707a6eb77 | %%*******************************************************************
%% combine_blk: combine small SDP blocks together,
%% combine all SOCP blocks together, etc
%%
%% [blk2,At2,C2,blkinfo] = combine_blk(blk,At,C);
%%
%%
%% SDPT3: version 3.1
%% Copyright (c) 1997 by
%% K.C. Toh, M.J. Todd, R.H. Tutuncu
%%... |
github | xyza11808/MATLAB-master | Prod2.m | .m | MATLAB-master/ca_source_extraction-master/cvx/sdpt3/Solver/Prod2.m | 1,882 | utf_8 | b291dcf07608872ed75bd82e48ff0b54 | %%*******************************************************************
%% Prod2: compute the block diagonal matrix A*B
%%
%% C = Prod2(blk,A,B,options);
%%
%% INPUT: blk = a cell array describing the block structure of A and B
%% A,B = square matrices or column vectors.
%%
%% options = 0 if no special str... |
github | xyza11808/MATLAB-master | NTdirfun.m | .m | MATLAB-master/ca_source_extraction-master/cvx/sdpt3/Solver/NTdirfun.m | 1,614 | utf_8 | a236e4d45e59db8824375b14ed6090a1 | %%*******************************************************************
%% NTdirfun: compute (dX,dZ), given dy, for the NT direction.
%%
%% SDPT3: version 3.1
%% Copyright (c) 1997 by
%% K.C. Toh, M.J. Todd, R.H. Tutuncu
%% Last Modified: 16 Sep 2004
%%*******************************************************************
... |
github | xyza11808/MATLAB-master | make.m | .m | MATLAB-master/ca_source_extraction-master/cvx/examples/make.m | 23,079 | utf_8 | 8b04233b872cb2ab50851644ae0e486a | function make( varargin )
%
% Determine the base path
%
odir = pwd;
base = mfilename('fullpath');
base = fileparts( base );
%
% Check the force and runonly flags
%
args = varargin;
is_octave = exist( 'OCTAVE_VERSION', 'builtin' );
if is_octave,
force = true;
runonly = true;
indexonly = false;
page_o... |
github | xyza11808/MATLAB-master | cantilever_beam_plot.m | .m | MATLAB-master/ca_source_extraction-master/cvx/examples/cvxbook/Ch04_cvx_opt_probs/cantilever_beam_plot.m | 1,050 | utf_8 | e8c8c9e1b601e4102f96e0436649d132 | % Plots a cantilever beam as a 3D figure.
% This is a helper function for the optimal cantilever beam example.
%
% Inputs:
% values: an array of heights and widths of each segment
% [h1 h2 ... hN w1 w2 ... wN]
%
% Almir Mutapcic 01/25/06
function cantilever_beam_plot(values)
N = length(values)/2;
for k ... |
github | xyza11808/MATLAB-master | simple_step.m | .m | MATLAB-master/ca_source_extraction-master/cvx/examples/circuit_design/simple_step.m | 235 | utf_8 | b8043326fe5966f9432b69b584891e0f | % Computes the step response of a linear system
function X = simple_step(A,B,DT,N)
n = size(A,1);
Ad = expm( full( A * DT ) );
Bd = ( Ad - eye(n) ) * B;
Bd = A \ Bd;
X = zeros(n,N);
for k = 2 : N,
X(:,k) = Ad*X(:,k-1)+Bd;
end
|
github | xyza11808/MATLAB-master | spectral_fact.m | .m | MATLAB-master/ca_source_extraction-master/cvx/examples/filter_design/spectral_fact.m | 1,292 | utf_8 | 014eebfa2dfbbd038c1383ff2ef97b0e | % Spectral factorization using Kolmogorov 1939 approach.
% (code follows pp. 232-233, Signal Analysis, by A. Papoulis)
%
% Computes the minimum-phase impulse response which satisfies
% given auto-correlation.
%
% Input:
% r: top-half of the auto-correlation coefficients
% starts from 0th element to end of the au... |
github | xyza11808/MATLAB-master | polar_plot_ant.m | .m | MATLAB-master/ca_source_extraction-master/cvx/examples/antenna_array_design/polar_plot_ant.m | 1,149 | utf_8 | 34a08a3bc75c474d61e01ea58b16e54e | % Plot a polar plot of an antenna array sensitivity
% with lines denoting the target direction and beamwidth.
% This is a helper function used in the broadband antenna examples.
%
% Inputs:
% X: an array of abs(y(theta)) where y is the antenna array pattern
% theta0: target direction
% bw: total beamw... |
github | xyza11808/MATLAB-master | spectral_fact.m | .m | MATLAB-master/ca_source_extraction-master/cvx/examples/antenna_array_design/spectral_fact.m | 1,385 | utf_8 | 570e7ae2165d19abd477494c52e609f8 | % Spectral factorization using Kolmogorov 1939 approach
% (code follows pp. 232-233, Signal Analysis, by A. Papoulis)
%
% Computes the minimum-phase impulse response which satisfies
% given auto-correlation.
%
% Input:
% r: top-half of the auto-correlation coefficients
% starts from 0th element to end of the aut... |
github | xyza11808/MATLAB-master | plotgraph.m | .m | MATLAB-master/ca_source_extraction-master/cvx/examples/graph_laplacian/plotgraph.m | 3,172 | utf_8 | a46b1d761798c492e96a5b9504aea9aa | function plotgraph(A,xy,weights)
% Plots a graph with each edge width proportional to its weight.
%
% Edges with positive weights are drawn in blue; negative weights in red.
%
% Input parameters:
% A --- incidence matrix of the graph (size is n x m)
% (n is the number of nodes and m is the number of e... |
github | xyza11808/MATLAB-master | disp.m | .m | MATLAB-master/ca_source_extraction-master/cvx/lib/@cvxprob/disp.m | 5,405 | utf_8 | 308868023e62c32fac37cc6621ed8af5 | function disp( prob, prefix )
if nargin < 2, prefix = ''; end
global cvx___
p = cvx___.problems( prob.index_ );
if isempty( p.variables ),
nvars = 0;
else
nvars = length( fieldnames( p.variables ) );
end
if isempty( p.duals ),
nduls = 0;
else
nduls = length( fieldnames( p.duals ) );
end
neqns = ( len... |
github | xyza11808/MATLAB-master | apply.m | .m | MATLAB-master/ca_source_extraction-master/cvx/lib/@cvxtuple/apply.m | 505 | utf_8 | b8d18946eb97e640bab87ef5e3256e8c | function y = apply( func, x )
y = do_apply( func, x.value_ );
function y = do_apply( func, x )
switch class( x ),
case 'struct',
y = cell2struct( do_apply( func, struct2cell( x ) ), fieldnames( x ), 1 );
case 'cell',
y = cellfun( func, x, 'UniformOutput', false );
otherwise,
y = fev... |
github | xyza11808/MATLAB-master | cvx_setdual.m | .m | MATLAB-master/ca_source_extraction-master/cvx/lib/@cvxtuple/cvx_setdual.m | 954 | utf_8 | f7aebcdf404f92b69aeb57a379454249 | function x = setdual( x, y )
x.dual_ = y;
x.value_ = do_setdual( x.value_, y );
function x = do_setdual( x, y )
switch class( x ),
case 'struct',
nx = numel( x );
if nx > 1,
error( 'Dual variables may not be attached to struct arrays.' );
end
f = fieldnames(x);
y... |
github | xyza11808/MATLAB-master | testall.m | .m | MATLAB-master/ca_source_extraction-master/cvx/lib/@cvxtuple/testall.m | 452 | utf_8 | a576b02def941cd1a47e7117b3e8bf82 | function y = testall( func, x )
y = do_test( func, x.value_ );
function y = do_test( func, x )
switch class( x ),
case 'struct',
y = do_test( func, struct2cell( x ) );
case 'cell',
y = all( cellfun( func, x ) );
otherwise,
y = feval( func, x );
end
% Copyright 2005-2014 CVX Researc... |
github | xyza11808/MATLAB-master | disp.m | .m | MATLAB-master/ca_source_extraction-master/cvx/lib/@cvxtuple/disp.m | 1,366 | utf_8 | 3a4d5bcb53c9621413fb3d692ab7e328 | function disp( x, prefix )
if nargin < 2,
prefix = '';
end
disp( [ prefix, 'cvx tuple object: ' ] );
prefix = [ prefix, ' ' ];
do_disp( x.value_, {}, prefix, prefix, '' );
if ~isempty( x.dual_ ),
dn = cvx_subs2str( x.dual_ );
disp( [ prefix, 'dual variable: ', dn(2:end) ] );
end
function do_disp( x, f, f... |
github | xyza11808/MATLAB-master | sparsify.m | .m | MATLAB-master/ca_source_extraction-master/cvx/lib/@cvx/sparsify.m | 4,031 | utf_8 | 2be6203e258210fdf364daff44f812ad | function x = sparsify( x, mode )
global cvx___
error( nargchk( 2, 2, nargin ) );
persistent remap
%
% Check mode argument
%
if ~ischar( mode ) || size( mode, 1 ) ~= 1,
error( 'Second arugment must be a string.' );
end
isobj = strcmp( mode, 'objective' );
pr = cvx___.problems( end );
touch( pr.self, x );
bz = x.... |
github | xyza11808/MATLAB-master | prelp.m | .m | MATLAB-master/ca_source_extraction-master/cvx/sedumi/conversion/prelp.m | 3,887 | utf_8 | 4d1e23d094e3f1b35ec666df11a34003 | % PRELP Loads and preprocesses LP from an MPS file.
%
% > [A,b,c,lenx,lbounds] = PRELP('problemname')
% The above command results in an LP in standard form,
% - Instead of specifying the problemname, you can also use PRELP([]), to
% get the problem from the file /tmp/default.mat.
% - Also, you may type PRE... |
github | xyza11808/MATLAB-master | feasreal.m | .m | MATLAB-master/ca_source_extraction-master/cvx/sedumi/conversion/feasreal.m | 4,144 | utf_8 | 454dcb6c42c0642ed5c5a524e84bec58 | % FEASREAL Generates a random sparse optimization problem with
% linear, quadratic and semi-definite constraints. Output
% can be used by SEDUMI. All data will be real-valued.
%
% The following two lines are typical:
% > [AT,B,C,K] = FEASREAL;
% > [X,Y,INFO] = SEDUMI(AT,B,C,K);
%
% An extended version is:
% > [... |
github | xyza11808/MATLAB-master | sdpa2vec.m | .m | MATLAB-master/ca_source_extraction-master/cvx/sedumi/conversion/sdpa2vec.m | 2,352 | utf_8 | f055b4df357f6cf3b426ce27869bc738 | % x = sdpavec(E,K)
% Takes an SDPA type sparse data description E, i.e.
% E(1,:) = block, E(2,:) = row, E(3,:) = column, E(4,:) = entry,
% and transforms it into a "long" vector, with vectorized matrices for
% each block stacked under each other. The size of each matrix block
% is given in the field K.s.
% **********... |
github | xyza11808/MATLAB-master | blk2vec.m | .m | MATLAB-master/ca_source_extraction-master/cvx/sedumi/conversion/blk2vec.m | 1,653 | utf_8 | 0d48b96f66e746fce480e7a3e9c271a5 | % x = blk2vec(X,nL)
%
% Converts a block diagonal matrix into a vector.
%
% ********** INTERNAL FUNCTION OF FROMPACK **********
function x = blk2vec(X,nL)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Copyright (C) 2005 McMaster University, Hamilton, CANADA (since 1.1)
%
% Copyright (C)... |
github | xyza11808/MATLAB-master | writesdp.m | .m | MATLAB-master/ca_source_extraction-master/cvx/sedumi/conversion/writesdp.m | 4,708 | utf_8 | 31f196bca4c11b9610c98de8e4d7b107 | % This function takes a problem in SeDuMi MATLAB format and writes it out
% in SDPpack format.
%
% Usage:
%
% writesdp(fname,A,b,c,K)
%
% fname Name of SDPpack file, in quotes
% A,b,c,K Problem in SeDuMi form
%
% Notes:
%
% Problems with complex data are not allowed.
%
% ... |
github | xyza11808/MATLAB-master | frompack.m | .m | MATLAB-master/ca_source_extraction-master/cvx/sedumi/conversion/frompack.m | 2,509 | utf_8 | a4730dcb4ec069944953dce753da973d | % FROMPACK Converts a cone problem in SDPPACK format to SEDUMI format.
%
% [At,c] = frompack(A,b,C,blk) Given a problem (A,b,C,blk) in the
% SDPPACK-0.9-beta format, this produces At and c for use with
% SeDuMi. This lets you execute
%
% [x,y,info] = SEDUMI(At,b,c,blk);
%
% IMPORTANT: this function assumes that th... |
github | xyza11808/MATLAB-master | feascpx.m | .m | MATLAB-master/ca_source_extraction-master/cvx/sedumi/conversion/feascpx.m | 4,385 | utf_8 | c48c6cf336cdb94ad12b04e1efd2417b | % FEASCPX Generates a random sparse optimization problem with
% linear, quadratic and semi-definite constraints. Output
% can be used by SEDUMI. Includes complex-valued data.
%
% The following two lines are typical:
% > [AT,B,C,K] = FEASCPX;
% > [X,Y,INFO] = SEDUMI(AT,B,C,K);
%
% An extended version is:
% > [AT... |
github | xyza11808/MATLAB-master | cvx_glpk.m | .m | MATLAB-master/ca_source_extraction-master/cvx/shims/cvx_glpk.m | 4,344 | utf_8 | 2a1ccba01ab8cc7e099853c4bbfe81b1 | function shim = cvx_glpk( shim )
% CVX_SOLVER_SHIM GLPK interface for CVX.
% This procedure returns a 'shim': a structure containing the necessary
% information CVX needs to use this solver in its modeling framework.
if ~isempty( shim.solve ),
return
end
if isempty( shim.name ),
fname = 'glpk.m';
ps =... |
github | xyza11808/MATLAB-master | cvx_sedumi.m | .m | MATLAB-master/ca_source_extraction-master/cvx/shims/cvx_sedumi.m | 10,740 | utf_8 | fb45695a2c0dd7b2bd1dd9884504f6fb | function shim = cvx_sedumi( shim )
% CVX_SOLVER_SHIM SeDuMi interface for CVX.
% This procedure returns a 'shim': a structure containing the necessary
% information CVX needs to use this solver in its modeling framework.
global cvx___
if ~isempty( shim.solve ),
return
end
if isempty( shim.name ),
fname = ... |
github | xyza11808/MATLAB-master | cvx_sdpt3.m | .m | MATLAB-master/ca_source_extraction-master/cvx/shims/cvx_sdpt3.m | 12,657 | utf_8 | 508f2ab7f97c915f8b3d4d479b38aa53 | function shim = cvx_sdpt3( shim )
% CVX_SOLVER_SHIM SDPT3 interface for CVX.
% This procedure returns a 'shim': a structure containing the necessary
% information CVX needs to use this solver in its modeling framework.
global cvx___
if ~isempty( shim.solve ),
return
end
if isempty( shim.name ),
fname = 's... |
github | xyza11808/MATLAB-master | getAllenStructureList.m | .m | MATLAB-master/AllenBrainAPI-master/getAllenStructureList.m | 10,449 | utf_8 | f29169e397532e8f7f86891385774ed4 | function [ARA_table,tableRowInds] = getAllenStructureList(varargin)
% Download the list of adult mouse structures from the Allen API.
%
% function ARA_table = getAllenStructureList('param1',val1,...)
%
%
% Purpose
% Make an API query to read in the Allen Reference Atlas (ARA) brain area
% list. All areas and data are ... |
github | xyza11808/MATLAB-master | thalamus.m | .m | MATLAB-master/AllenBrainAPI-master/examples/thalamus.m | 3,125 | utf_8 | fba8cdfc984fa67f9305a3dac6f5c7dc | function thalamus
% make a projection density plot
%
% This is the MATLAB version of the R example found at
% http://api.brain-map.org/examples/doc/thalamus/thalamus.R.html
%
% We have some more robust MATLAB functions that encapsulate
% some operations that were performed in-line in the R example.
% These standalon... |
github | xyza11808/MATLAB-master | qpsolng.m | .m | MATLAB-master/glpkmex-master/qpsolng.m | 2,447 | utf_8 | 4b2e7f7c92565cb039eed9907693651d | % Core QP Solver. Use qpng.m instead.
%
% This routine solves the following optimization problem:
%
% min_x .5x' H x + q' x
% s.t. Aeq x = beq
% Ain x <= bin
%
% note that x0 is a feasible starting point.
%
% (C) Nicolo Giorgetti, 2006.
function [x, lam, k, status]=qpsolng(H, q, Aeq, beq, Ain, bin, x0)
nmax=2... |
github | xyza11808/MATLAB-master | qpng.m | .m | MATLAB-master/glpkmex-master/qpng.m | 8,266 | utf_8 | a76ee167df8e11072eea16b6f9407482 | % Quadratic programming solver using a null-space active-set method.
%
% [x, obj, lambda, info] = qpng (H, q, A, b, ctype, lb, ub, x0)
%
% Solve the general quadratic program
%
% min 0.5 x'*H*x + q'*x
% x
%
% subject to
% A*x [ "=" | "<=" | ">=" ] b
% lb <= x <= ub
%
% and given x0 as initial gues... |
github | xyza11808/MATLAB-master | glpk.m | .m | MATLAB-master/glpkmex-master/glpk.m | 20,164 | utf_8 | 3c541f0648fce343fe6b9048f643e11a | % Matlab MEX interface for the GLPK library
%
% [xopt, fmin, status, extra] = glpk (c, a, b, lb, ub, ctype, vartype,
% sense, param)
%
% Solve an LP/MILP problem using the GNU GLPK library. Given three
% arguments, glpk solves the following standard LP:
%
% min C'*x subject to A*x <= b
%
% but may also solve problems... |
github | xyza11808/MATLAB-master | MJLM_MJLMselectROIs.m | .m | MATLAB-master/Acquisition2P_class-master/personal/Matthias/MJLM_MJLMselectROIs.m | 29,879 | utf_8 | 0628c1c8d512c2d233c786a85d7d9d18 | function MJLMselectROIs(obj, img, sliceNum, channelNum, smoothWindow, excludeFrames)
%selectROIs(obj,img,sliceNum,channelNum,smoothWindow)
%all inputs except acquisition object are optional
%
%GUI for sorting through seeds / pixel-pixel correlation matrices to select
%appropriate ROIs for an acquisition. Requires preca... |
github | xyza11808/MATLAB-master | mjlmInitialization.m | .m | MATLAB-master/Acquisition2P_class-master/personal/Matthias/mjlmInitialization.m | 4,032 | utf_8 | b0339e7f259eff57ff0173060e902491 | function acq = mjlmInitialization(acqId, rawFileLocation, acqName)
% acq = mjlmInitialization(acqId, rawFileLocation, acqName)
%
% acqId (formerly fileId) is some fragment of the file name of the current
% acquisition that is unique to the current acquisition.
%
% rawFileLocation is where the tiff files are located. Th... |
github | xyza11808/MATLAB-master | getBaseline_ransac_demo.m | .m | MATLAB-master/Acquisition2P_class-master/personal/Matthias/getBaseline_ransac_demo.m | 6,141 | utf_8 | f3a32ca2349cbddd3b11fb6ed4130cf4 | function getBaseline_ransac_demo(sel)
% Load cell body and neuropil fluorescence
mov = sel.movMap.Data.mov;
fBodyRaw = mean(mov(:, sel.acq.mat2binInd(sel.nh2movInd(sel.disp.indBody))), 2)';
fNpRaw = mean(mov(:, sel.acq.mat2binInd(sel.nh2movInd(sel.disp.indNeuropil))), 2)';
f = fBodyRaw - fNpRaw*sel.disp.neuropilCoef(2... |
github | xyza11808/MATLAB-master | MJLMselectROIs.m | .m | MATLAB-master/Acquisition2P_class-master/personal/Matthias/MJLMselectROIs.m | 39,571 | utf_8 | 602948e5c50c963096aea409bfeae4ce | function MJLMselectROIs(obj,img,sliceNum,channelNum,smoothWindow)
%selectROIs(obj,img,sliceNum,channelNum,smoothWindow)
%all inputs except acquisition object are optional
%
%GUI for sorting through seeds / pixel-pixel correlation matrices to select
%appropriate ROIs for an acquisition. Requires precalculated pixel
%cov... |
github | xyza11808/MATLAB-master | createAcquisitionObjects.m | .m | MATLAB-master/Acquisition2P_class-master/personal/Ari/createAcquisitionObjects.m | 5,148 | utf_8 | f7d03924e48bdbaa7744981aa10103b1 | function createAcquisitionObjects(folder,forceOverwrite)
%createAcquisitionObjects.m Looks through folder and creates acquisition
%objects to be processed
%
%INPUTS
%folder - folder to look through
%
%ASM 11/14
if nargin < 2 || isempty(forceOverwrite)
forceOverwrite = false;
end
if nargin < 1 || isempty(folder)
... |
github | xyza11808/MATLAB-master | addSIMetaData.m | .m | MATLAB-master/Acquisition2P_class-master/personal/Ari/addSIMetaData.m | 2,343 | utf_8 | 2241f3b9a985a0064d41124c17cd3363 | function addSIMetaData(folder)
%addSIMetaData.m Looks through folder and adds metadata to all objects
%
%INPUTS
%folder - folder to look through
%
%ASM 12/14
if nargin < 1 || isempty(folder)
folder = '\\research.files.med.harvard.edu\Neurobio\HarveyLab\Ari\2P Data\ResScan';
end
%get subdirectories which match mo... |
github | xyza11808/MATLAB-master | am2PInit.m | .m | MATLAB-master/Acquisition2P_class-master/personal/Ari/am2PInit.m | 4,973 | utf_8 | fa5644f92713df74eab3e28a37f75707 | function am2PInit(obj,movPath)
%Example of an Acq2P Initialization Function. Allows user selection of
%movies to form acquisition, sorts alphabetically, assigns an acquisition
%name and default directory, and assigns the object to a workspace variable
%named after the acquisition name
if nargin < 2 || isempty(movPath... |
github | xyza11808/MATLAB-master | playMov.m | .m | MATLAB-master/Acquisition2P_class-master/common/playMov.m | 3,206 | utf_8 | 935698ab5935ce2d5353a321e507ed64 | function playMov(mov)
% playMov(mov) displays a H-by-W-by-nFrames array as a movie, similar to
% ImageJ. Clicking any spot in the image jumps to the frame at which the
% clicked point is brightest.
%
% To do:
% - Implement play button
% - align activity trace to slider.
mov = downsampleWithAvg(mov, 10);
% Display fi... |
github | xyza11808/MATLAB-master | calcActivityOverviewImg.m | .m | MATLAB-master/Acquisition2P_class-master/common/calcActivityOverviewImg.m | 1,570 | utf_8 | f9fc915d8511a0ca1aefa959424c3116 | function actImg = calcActivityOverviewImg(pixCov, diags, h, w)
% actImg = calcActivityOverviewImg(pixCov, diags, h, w) calculates an image
% displaying the variance of the correlation of a pixel with its neighbors,
% which gives a visual impression of where active cells are.
C = corrcovDiag(pixCov, diags);
actStd = st... |
github | xyza11808/MATLAB-master | track_subpixel_wholeframe_motion_fft_forloop.m | .m | MATLAB-master/Acquisition2P_class-master/common/Motion Correction Files/track_subpixel_wholeframe_motion_fft_forloop.m | 7,576 | utf_8 | 9af16e4816b00b625b624ce891d020ce | function [xshifts, yshifts] = track_subpixel_wholeframe_motion_fft_forloop(movref, refframe)
%save the size of the movie
z = size(movref, 3);
xshifts=zeros(1,z);
yshifts=zeros(1,z);
% It is safer to use the square root of the fluorescence intensities to
% minimize the effect of bright calcium transients. Not necessa... |
github | xyza11808/MATLAB-master | correct_translation_singleframe.m | .m | MATLAB-master/Acquisition2P_class-master/common/Motion Correction Files/correct_translation_singleframe.m | 7,775 | utf_8 | e5294bc7a656ec48fe9f199710e26824 | function [corrected, xshift, yshift] = correct_translation_singleframe(moving, ref, isRefPrecalcd, movingFullSize)
% Translate a single frame to match a reference, using subpixel FFT
% registration.
if nargin < 4
movingFullSize = moving;
end
% Find shifts:
if nargin<3 || ~isRefPrecalcd
ref_fft = zeros(size(re... |
github | xyza11808/MATLAB-master | lucasKanade_plus_nonrigid.m | .m | MATLAB-master/Acquisition2P_class-master/common/Motion Correction Files/lucasKanade_plus_nonrigid.m | 12,013 | utf_8 | 01de239d8d170cd885710f552c6bbf70 | function movStruct = lucasKanade_plus_nonrigid(...
obj, movStruct, scanImageMetadata, movNum, opMode)
% movStruct = withinFile_withinFrame_lucasKanade(obj, movStruct, scanImageMetadata, movNum, opMode)
% finds/corrects in-frame motion with an algorithm that takes into account
% that images are acquired by raster sc... |
github | xyza11808/MATLAB-master | withinFile_withinFrame_lucasKanade.m | .m | MATLAB-master/Acquisition2P_class-master/common/Motion Correction Files/withinFile_withinFrame_lucasKanade.m | 10,325 | utf_8 | 8a16b3a35213675aeb1c619446a46e4c | function movStruct = withinFile_withinFrame_lucasKanade(...
obj, movStruct, scanImageMetadata, movNum, opMode)
% movStruct = withinFile_withinFrame_lucasKanade(obj, movStruct, scanImageMetadata, movNum, opMode)
% finds/corrects in-frame motion with an algorithm that takes into account
% that images are acquired by ... |
github | xyza11808/MATLAB-master | lucasKanade_plus_nonrigid_memMap.m | .m | MATLAB-master/Acquisition2P_class-master/common/Motion Correction Files/lucasKanade_plus_nonrigid_memMap.m | 13,611 | utf_8 | caebc79bf9d63e72b51917acb8a174d5 | function movStruct = lucasKanade_plus_nonrigid_memMap(...
obj, movStruct, scanImageMetadata, movNum, opMode)
% movStruct = withinFile_withinFrame_lucasKanade(obj, movStruct, scanImageMetadata, movNum, opMode)
% finds/corrects in-frame motion with an algorithm that takes into account
% that images are acquired by ra... |
github | xyza11808/MATLAB-master | lKFast_affineSlow_memMap.m | .m | MATLAB-master/Acquisition2P_class-master/common/Motion Correction Files/lKFast_affineSlow_memMap.m | 9,351 | utf_8 | 1d385bff5b26f12d35d0937e38b71e16 | function movStruct = lKFast_affineSlow_memMap(...
obj, movStruct, scanImageMetadata, movNum, opMode)
% movStruct = withinFile_withinFrame_lucasKanade(obj, movStruct, scanImageMetadata, movNum, opMode)
% finds/corrects in-frame motion with an algorithm that takes into account
% that images are acquired by raster sca... |
github | xyza11808/MATLAB-master | lucasKanade_affineReg.m | .m | MATLAB-master/Acquisition2P_class-master/common/Motion Correction Files/lucasKanade_affineReg.m | 9,459 | utf_8 | 57289a8cd347c8cdb10b68b0914f3c68 | function movStruct = lucasKanade_affineReg(...
obj, movStruct, scanImageMetadata, movNum, opMode)
% movStruct = withinFile_withinFrame_lucasKanade(obj, movStruct, scanImageMetadata, movNum, opMode)
% finds/corrects in-frame motion with an algorithm that takes into account
% that images are acquired by raster scanni... |
github | xyza11808/MATLAB-master | doLucasKanadeSPMD.m | .m | MATLAB-master/Acquisition2P_class-master/common/Motion Correction Files/lucas-kanade/doLucasKanadeSPMD.m | 8,588 | utf_8 | 0385c08f0bd736ca4f44844eec07f84c | function [aligned, dpxAl, dpyAl, B] = doLucasKanadeSPMD(stackFull, ref, isGpu)
% Parts of the Lucas Kanade motion correction code were obtained from
% https://xcorr.net/2014/08/02/non-rigid-deformation-for-calcium-imaging-frame-alignment/
% and/or are originally based on the method published in:
% Greenberg, David S.... |
github | xyza11808/MATLAB-master | doLucasKanade.m | .m | MATLAB-master/Acquisition2P_class-master/common/Motion Correction Files/lucas-kanade/doLucasKanade.m | 3,960 | utf_8 | 664a8071193324512129f99b3a604e79 | function [Id,dpx,dpy, B] = doLucasKanade(T,I,dpx,dpy)
% Parts of the Lucas Kanade motion correction code were obtained from
% https://xcorr.net/2014/08/02/non-rigid-deformation-for-calcium-imaging-frame-alignment/
% and/or are originally based on the method published in:
% Greenberg, David S., and Jason N.D. Kerr. “A... |
github | xyza11808/MATLAB-master | correct_scanned_imaging.m | .m | MATLAB-master/Acquisition2P_class-master/common/Motion Correction Files/lucas-kanade/correct_scanned_imaging.m | 29,196 | utf_8 | 1f87def806ab018ab2e033b73e6c3954 | function [p, iter_used, corr, failed, settings, xpixelposition, ypixelposition, data_corrected, template_sampled] = ...
correct_scanned_imaging(data,template_image,subrec,data_extra_channels,frame_list,settings,isbidirec,est_p,pregauss,leftexclude)
%correct_scanned_imaging
%
%Corrects horizontal motion artifacts in... |
github | xyza11808/MATLAB-master | fastBSpline.m | .m | MATLAB-master/Acquisition2P_class-master/common/Motion Correction Files/lucas-kanade/fastBSpline/fastBSpline.m | 12,261 | utf_8 | 7d2bf580f952c5472a4b2caa99166323 | classdef fastBSpline
%fastBSpline - A fast, lightweight class that implements
%non-uniform B splines of any order
%
%Matlab's spline functions are very general. This generality comes at
%the price of speed. For large-scale applications, including model
%fitting where some components of the mode... |
github | xyza11808/MATLAB-master | setFigDockGroup.m | .m | MATLAB-master/Acquisition2P_class-master/helperFunctions-master/setFigDockGroup.m | 13,845 | utf_8 | 8727d9249bb6aa509120268db82167b8 | function hGroupContainer = setFigDockGroup(varargin)
% setFigDockGroup Sets a figure's docking group container
%
% Syntax:
% hGroupContainer = setFigDockGroup(hFig, group)
% hButton = setFigDockGroup(hFig, hButton)
%
% Description:
% setFigDockGroup sets a figure's (or list of figures') docking group
%... |
github | xyza11808/MATLAB-master | getBaseline_customWeightFun.m | .m | MATLAB-master/Acquisition2P_class-master/helperFunctions-master/getBaseline_customWeightFun.m | 1,214 | utf_8 | 78f00649fdfeaf3374530f55d697f706 | function [f_, stats] = getBaseline_customWeightFun(f)
% To do:
% - do binning instead of smoothing to speed up calculations
% - change code to deal with different frame rates, rather than having
% hard-coded time windows etc...
x = linspace(-1, 1, length(f));
xExp = exp(-x);
function w = wfun(r)
% Get rough estim... |
github | xyza11808/MATLAB-master | pdftops.m | .m | MATLAB-master/Acquisition2P_class-master/helperFunctions-master/export_fig/pdftops.m | 3,077 | utf_8 | 8dff856e4b450072050d8aa571d1a08e | function varargout = pdftops(cmd)
%PDFTOPS Calls a local pdftops executable with the input command
%
% Example:
% [status result] = pdftops(cmd)
%
% Attempts to locate a pdftops executable, finally asking the user to
% specify the directory pdftops was installed into. The resulting path is
% stored for future refere... |
github | xyza11808/MATLAB-master | crop_borders.m | .m | MATLAB-master/Acquisition2P_class-master/helperFunctions-master/export_fig/crop_borders.m | 1,669 | utf_8 | 725f526e7270a9b417300035d8748a9c | %CROP_BORDERS Crop the borders of an image or stack of images
%
% [B, v] = crop_borders(A, bcol, [padding])
%
%IN:
% A - HxWxCxN stack of images.
% bcol - Cx1 background colour vector.
% padding - scalar indicating how many pixels padding to have. Default: 0.
%
%OUT:
% B - JxKxCxN cropped stack of images.
% ... |
github | xyza11808/MATLAB-master | isolate_axes.m | .m | MATLAB-master/Acquisition2P_class-master/helperFunctions-master/export_fig/isolate_axes.m | 3,668 | utf_8 | e2dce471e433886fcb87f9dcb284a2cb | %ISOLATE_AXES Isolate the specified axes in a figure on their own
%
% Examples:
% fh = isolate_axes(ah)
% fh = isolate_axes(ah, vis)
%
% This function will create a new figure containing the axes/uipanels
% specified, and also their associated legends and colorbars. The objects
% specified must all be in the same f... |
github | xyza11808/MATLAB-master | im2gif.m | .m | MATLAB-master/Acquisition2P_class-master/helperFunctions-master/export_fig/im2gif.m | 6,048 | utf_8 | 5a7437140f8d013158a195de1e372737 | %IM2GIF Convert a multiframe image to an animated GIF file
%
% Examples:
% im2gif infile
% im2gif infile outfile
% im2gif(A, outfile)
% im2gif(..., '-nocrop')
% im2gif(..., '-nodither')
% im2gif(..., '-ncolors', n)
% im2gif(..., '-loops', n)
% im2gif(..., '-delay', n)
%
% This function converts a mu... |
github | xyza11808/MATLAB-master | read_write_entire_textfile.m | .m | MATLAB-master/Acquisition2P_class-master/helperFunctions-master/export_fig/read_write_entire_textfile.m | 924 | utf_8 | 779e56972f5d9778c40dee98ddbd677e | %READ_WRITE_ENTIRE_TEXTFILE Read or write a whole text file to/from memory
%
% Read or write an entire text file to/from memory, without leaving the
% file open if an error occurs.
%
% Reading:
% fstrm = read_write_entire_textfile(fname)
% Writing:
% read_write_entire_textfile(fname, fstrm)
%
%IN:
% fname - Pathn... |
github | xyza11808/MATLAB-master | pdf2eps.m | .m | MATLAB-master/Acquisition2P_class-master/helperFunctions-master/export_fig/pdf2eps.m | 1,471 | utf_8 | a1f41f0c7713c73886a2323e53ed982b | %PDF2EPS Convert a pdf file to eps format using pdftops
%
% Examples:
% pdf2eps source dest
%
% This function converts a pdf file to eps format.
%
% This function requires that you have pdftops, from the Xpdf suite of
% functions, installed on your system. This can be downloaded from:
% http://www.foolabs.com/xpdf ... |
github | xyza11808/MATLAB-master | print2array.m | .m | MATLAB-master/Acquisition2P_class-master/helperFunctions-master/export_fig/print2array.m | 6,273 | utf_8 | c2feb752d8836426a74edd9357f1ff17 | %PRINT2ARRAY Exports a figure to an image array
%
% Examples:
% A = print2array
% A = print2array(figure_handle)
% A = print2array(figure_handle, resolution)
% A = print2array(figure_handle, resolution, renderer)
% [A bcol] = print2array(...)
%
% This function outputs a bitmap image of the given figure, at t... |
github | xyza11808/MATLAB-master | append_pdfs.m | .m | MATLAB-master/Acquisition2P_class-master/helperFunctions-master/export_fig/append_pdfs.m | 2,010 | utf_8 | 1034abde9642693c404671ff1c693a22 | %APPEND_PDFS Appends/concatenates multiple PDF files
%
% Example:
% append_pdfs(output, input1, input2, ...)
% append_pdfs(output, input_list{:})
% append_pdfs test.pdf temp1.pdf temp2.pdf
%
% This function appends multiple PDF files to an existing PDF file, or
% concatenates them into a PDF file if the output fi... |
github | xyza11808/MATLAB-master | using_hg2.m | .m | MATLAB-master/Acquisition2P_class-master/helperFunctions-master/export_fig/using_hg2.m | 365 | utf_8 | 6a7f56042fda1873d8225eb3ec1cc197 | %USING_HG2 Determine if the HG2 graphics pipeline is used
%
% tf = using_hg2(fig)
%
%IN:
% fig - handle to the figure in question.
%
%OUT:
% tf - boolean indicating whether the HG2 graphics pipeline is being used
% (true) or not (false).
function tf = using_hg2(fig)
try
tf = ~graphicsversion(fig, 'han... |
github | xyza11808/MATLAB-master | eps2pdf.m | .m | MATLAB-master/Acquisition2P_class-master/helperFunctions-master/export_fig/eps2pdf.m | 5,009 | utf_8 | 5658b3d96232e138be7fd49693d88453 | %EPS2PDF Convert an eps file to pdf format using ghostscript
%
% Examples:
% eps2pdf source dest
% eps2pdf(source, dest, crop)
% eps2pdf(source, dest, crop, append)
% eps2pdf(source, dest, crop, append, gray)
% eps2pdf(source, dest, crop, append, gray, quality)
%
% This function converts an eps file to pdf f... |
github | xyza11808/MATLAB-master | copyfig.m | .m | MATLAB-master/Acquisition2P_class-master/helperFunctions-master/export_fig/copyfig.m | 812 | utf_8 | b6b1fa9a9351df33ae0d42056c3df40a | %COPYFIG Create a copy of a figure, without changing the figure
%
% Examples:
% fh_new = copyfig(fh_old)
%
% This function will create a copy of a figure, but not change the figure,
% as copyobj sometimes does, e.g. by changing legends.
%
% IN:
% fh_old - The handle of the figure to be copied. Default: gcf.
%
% OU... |
github | xyza11808/MATLAB-master | user_string.m | .m | MATLAB-master/Acquisition2P_class-master/helperFunctions-master/export_fig/user_string.m | 2,460 | utf_8 | e8aa836a5140410546fceccb4cca47aa | %USER_STRING Get/set a user specific string
%
% Examples:
% string = user_string(string_name)
% saved = user_string(string_name, new_string)
%
% Function to get and set a string in a system or user specific file. This
% enables, for example, system specific paths to binaries to be saved.
%
% IN:
% string_name - ... |
github | xyza11808/MATLAB-master | export_fig.m | .m | MATLAB-master/Acquisition2P_class-master/helperFunctions-master/export_fig/export_fig.m | 29,720 | utf_8 | 923dcc1ad89f1381ee70abbf422b20a5 | %EXPORT_FIG Exports figures suitable for publication
%
% Examples:
% im = export_fig
% [im alpha] = export_fig
% export_fig filename
% export_fig filename -format1 -format2
% export_fig ... -nocrop
% export_fig ... -transparent
% export_fig ... -native
% export_fig ... -m<val>
% export_fig ... -r<val... |
github | xyza11808/MATLAB-master | ghostscript.m | .m | MATLAB-master/Acquisition2P_class-master/helperFunctions-master/export_fig/ghostscript.m | 5,009 | utf_8 | e93de4034ac6e4ac154729dc2c12f725 | %GHOSTSCRIPT Calls a local GhostScript executable with the input command
%
% Example:
% [status result] = ghostscript(cmd)
%
% Attempts to locate a ghostscript executable, finally asking the user to
% specify the directory ghostcript was installed into. The resulting path
% is stored for future reference.
%
% Once ... |
github | xyza11808/MATLAB-master | fix_lines.m | .m | MATLAB-master/Acquisition2P_class-master/helperFunctions-master/export_fig/fix_lines.m | 5,759 | utf_8 | 3338572f35c4669b79cc3265892d35de | %FIX_LINES Improves the line style of eps files generated by print
%
% Examples:
% fix_lines fname
% fix_lines fname fname2
% fstrm_out = fixlines(fstrm_in)
%
% This function improves the style of lines in eps files generated by
% MATLAB's print function, making them more similar to those seen on
% screen. Grid ... |
github | xyza11808/MATLAB-master | motionCorrect.m | .m | MATLAB-master/Acquisition2P_class-master/classes/@Acquisition2P/motionCorrect.m | 5,504 | utf_8 | cc0664bec45b376c5f65e3c0071b93ed | function motionCorrect(obj,writeDir,movieOrder,motionCorrectionFunction,namingFunction)
%Wrapper function managing motion correction of an acquisition object
%
%motionCorrect(obj,writeDir,motionCorrectionFunction,namingFunction)
%
%writeDir is an optional argument specifying location to write motion
% corrected data ... |
github | xyza11808/MATLAB-master | indexMovie.m | .m | MATLAB-master/Acquisition2P_class-master/classes/@Acquisition2P/indexMovie.m | 5,150 | utf_8 | 269e8e9d6c7bda942756964dc623e102 | function indexMovie(obj, nSlice, nChannel, writeDir)
%Function for creating a single large binary file containing an entire
%movie for a given slice/channel, allowing rapid, indexed access to pixel
%values. Needed to view ROI traces online within selectROIs GUI.
%
%indexMovie(obj,nSlice,nChannel,writeDir)
%
%writeDir i... |
github | xyza11808/MATLAB-master | processCurrentAcq.m | .m | MATLAB-master/Acquisition2P_class-master/classes/@acq2pJobProcessor/processCurrentAcq.m | 5,025 | utf_8 | c94f6fe27392fa1801c892dcaba4f30f | function processCurrentAcq(ajp)
% Performs all processing of currently loaded acquisition.
%create cleanup obj
cleanupObj = onCleanup(@() moveBackToUnproc(ajp));
if ajp.debug
ajp.log('Skipping all processing because debug mode is on.');
return
end
% Ensure that default dir exists:
if ~exist(ajp.currentAcq.de... |
github | xyza11808/MATLAB-master | createGui.m | .m | MATLAB-master/Acquisition2P_class-master/classes/@selectRoisGui/createGui.m | 9,805 | utf_8 | 2b0222fef6c35af74424871612e97def | function createGui(sel, acq, img, sliceNum, channelNum, smoothWindow, excludeFrames)
% Constructor method for the selectRoisGui class. See selectROIs.m for
% usage.
%% For debugging:
% assignin('base', 'sel', sel);
%% Create GUI data structure:
% Initialize properties:
sel.acq = acq;
sel.slice = sliceNum;
% Set up r... |
github | xyza11808/MATLAB-master | doSubTracePlot.m | .m | MATLAB-master/Acquisition2P_class-master/classes/@selectRoisGui/doSubTracePlot.m | 1,277 | utf_8 | f7391a3fca32fdf2b2f17324ab045a7d | function doSubTracePlot(sel,~,~)
if ~isfield(sel.disp,'fBody')
return;
end
% Calculate corrected dF and plot
dF = sel.disp.fBody-sel.disp.fNeuropil*sel.disp.neuropilCoef(2);
dF = dF/sel.disp.f0Body;
dF = dF - median(dF);
movSizes = [sel.acq.correctedMovies.slice.channel.size];
nFramesComplete = sum(movSizes(:, 3... |
github | xyza11808/MATLAB-master | load_open_ephys_data_faster.m | .m | MATLAB-master/analysis-tools-master/load_open_ephys_data_faster.m | 8,056 | utf_8 | 749de308143a6917f8ad6d058df140f4 | function [data, timestamps, info] = load_open_ephys_data_faster(filename, varargin)
%
% [data, timestamps, info] = load_open_ephys_data(filename, [outputFormat])
%
% Loads continuous, event, or spike data files into Matlab.
%
% Inputs:
%
% filename: path to file
% outputFormat: (optional) If omitted, contin... |
github | xyza11808/MATLAB-master | load_open_ephys_data.m | .m | MATLAB-master/analysis-tools-master/load_open_ephys_data.m | 14,460 | utf_8 | d3d69f876d818192e20b200eca3bfd9a | function [data, timestamps, info] = load_open_ephys_data(filename)
%
% [data, timestamps, info] = load_open_ephys_data(filename)
%
% Loads continuous, event, or spike data files into Matlab.
%
% Inputs:
%
% filename: path to file
%
%
% Outputs:
%
% data: either an array continuous samples (in microvolts)... |
github | xyza11808/MATLAB-master | getEphysInfo.m | .m | MATLAB-master/analysis-tools-master/ephys2plx/getEphysInfo.m | 4,957 | utf_8 | 5375a6396f026521c96a21e9413475aa | %=================================================================================
% From open-ephys / analysis-tools
% https://github.com/open-ephys/analysis-tools/blob/master/get_session_info.m
%=================================================================================
function info = getEphysInfo(directory)... |
github | xyza11808/MATLAB-master | ephysGetPlxName.m | .m | MATLAB-master/analysis-tools-master/ephys2plx/ephysGetPlxName.m | 416 | utf_8 | ce938b5b0b2de78dbc6a7795bd906a3a | % To generate plexon file name
% V1.0 July 22, 2014 - GL
function PlxName = ephysGetPlxName(pathName)
if ispc
indexFolder = find(pathName=='\');
elseif ismac
indexFolder = find(pathName=='/');
else
error('Unknown Operating System');
end
CSM2Name = pathName(indexFolder(end-1... |
github | xyza11808/MATLAB-master | getFileHeader.m | .m | MATLAB-master/analysis-tools-master/ephys2plx/getFileHeader.m | 186 | utf_8 | 05f70b81e860e498219e58433a16604b | % Ver 1.0 Guangxing Li Jan 24 2014
function Header=getFileHeader(FileName)
fid = fopen(FileName);
hdr = fread(fid, 1024, 'char*1');
eval(char(hdr'));
Header=header;
end |
github | xyza11808/MATLAB-master | loadawobj.m | .m | MATLAB-master/BrainMesh-master/functions/loadawobj.m | 12,046 | utf_8 | 8699049dc95a656fa0db446fb5a8f6f2 | function [V,F3,F4]=loadawobj(modelname,opts)
% LOADAWOBJ Load a Wavefront/Alias obj style model.
% [v,f3,f4]=LOADAWOBJ(modelname) returns three matrices, a
% vertices matrix, and two matrices defining 3 edge and 4 edge polygons
% s=LOADAWOBJ(modelname) returns a structure with additional information.
% The only op... |
github | xyza11808/MATLAB-master | rda.m | .m | MATLAB-master/libra-master/rda.m | 22,345 | utf_8 | 6f815d0b6c5ac3c0c7786e583355dbce | function result=rda(x,group,varargin)
%RDA performs linear and quadratic robust discriminant analysis
% on the data matrix x with known group structure. It is based on the
% MCD estimator (see mcdcov.m), hence it has to be applied to
% low-dimensional data.
%
% The Robust Discriminant method is described in: ... |
github | xyza11808/MATLAB-master | cdq.m | .m | MATLAB-master/libra-master/cdq.m | 10,752 | utf_8 | f1ac5f2c77d5c05d3858836ba2002401 | function result = cdq(x,y,c,varargin)
%CDQ computes Censored Depth Quantiles for regression, as described in
%
% Debruyne, M., Hubert, M., Portnoy, S., Vanden Branden, K. (2008),
% "Censored depth quantiles",
% Computational Statistics and Data Analysis, 52, 1604-1614.
%
% Required input arguments:
% x : Data matri... |
github | xyza11808/MATLAB-master | daplot.m | .m | MATLAB-master/libra-master/daplot.m | 2,696 | utf_8 | fd3de5133836cca03893e1f9b53ae51f | function daplot(x,group,center,covar,classic,method)
%DAPLOT plots 97.5% tolerances ellipses of the bivariate data set x, which
% consists of several groups defined by the input argument 'group'.
% Center and covar are estimates of the center and covariance matrix of each group,
% obtained with a classical ('CDA') o... |
github | xyza11808/MATLAB-master | madc.m | .m | MATLAB-master/libra-master/madc.m | 1,550 | utf_8 | a862be31e42af6b984a749b81ff1318f | function result=madc(x)
%MADC is a scale estimator given by the Median Absolute Deviation
% with finite sample correction factor.
% It is defined as
% mad(x)= b_n 1.4826 med(|x_i - med(x)|)
% with b_n a small sample correction factor to make the mad unbiased at the
% normal distribution. It can resist 50% ... |
github | xyza11808/MATLAB-master | rstep.m | .m | MATLAB-master/libra-master/rstep.m | 3,363 | utf_8 | 2d01b8c1e79cf4b4fc51ceda617d61e8 | function [S,P,t,kmax,med]= rstep(X,k,center,r);
%RSTEP is an auxiliary function for 'rapca.m'.
%
% This function is part of LIBRA: the Matlab Library for Robust Analysis,
% available at:
% http://wis.kuleuven.be/stat/robust.html
%
% Created by Sabine Verboven and Mia Hubert (October 2000)
% Part of the ... |
github | xyza11808/MATLAB-master | cellmap.m | .m | MATLAB-master/libra-master/cellmap.m | 8,873 | utf_8 | 92fa2b03f40bfdb689df2749ef318b73 | function [hImage, hText, hXText] = cellmap(D, R, indCells, indRows, varargin)
%
% CELLMAP displays a ddc result as a heatmap image.
%
% USAGE:
% [hImage, hText, hTick] = cellmap(D, R, indCells, indRows, labelsx, labelsy, varargin)
%
% Required input argument:
%
% D : the data matrix
% R : The matr... |
github | xyza11808/MATLAB-master | mcdcov.m | .m | MATLAB-master/libra-master/mcdcov.m | 65,075 | utf_8 | e93793e2355cfb0ce7321c047d5a246c | function [rew,raw]=mcdcov(x,varargin)
%MCDCOV computes the MCD estimator of a multivariate data set. This
% estimator is given by the subset of h observations with smallest covariance
% determinant. The MCD location estimate is then the mean of those h points,
% and the MCD scatter estimate is their covariance matri... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.