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 | ssketch/motorControl-master | qblkmul.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/sedumi/1.3/maci64/sedumi_1_3_maci64/qblkmul.m | 1,896 | utf_8 | 22ce6e66d900889019bc1b7c003b3fa6 | % y = qblkmul(mu,d,blkstart)
% QBLKMUL yields length(y)=blkstart(end)-blkstart(1) vector with
% y[k] = mu(k) * d[k]; the blocks d[k] are partitioned by blkstart.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function y = qblkmul(mu... |
github | ssketch/motorControl-master | psdjmul.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/sedumi/1.3/maci64/sedumi_1_3_maci64/psdjmul.m | 1,930 | utf_8 | e17e0699b98b824d8f759e9d3ece4e16 | % z = psdmul(x,y, K)
% PSDMUL for full x,y. Computes (XY+YX)/2
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function z = psdjmul(x,y, K)
%
% This file is part of SeDuMi 1.3 by Imre Polik
% Copyright (C) 2005 McMaster University... |
github | ssketch/motorControl-master | widelen.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/sedumi/1.3/maci64/sedumi_1_3_maci64/widelen.m | 4,664 | utf_8 | 85ca6ba0a63cb73f61d19a3d78279cfe | % [t,wr,w] = widelen(xc,zc,y0, dx,dz,dy0,d2y0, maxt,pars,K)
%
% WIDELEN Computes approximate wide-region neighborhood step length.
% Does extensive line search only if it pays, that is the resulting
% rate will be at most twice the best possible rate, and the step-length
% at least half of the best p... |
github | ssketch/motorControl-master | psdeig.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/sedumi/1.3/maci64/sedumi_1_3_maci64/psdeig.m | 2,612 | utf_8 | c9b9e8ce67175c165dfac971f67a23a5 | % [lab,q] = psdeig(x,K)
% PSDEIG Computes spectral coefficients of x w.r.t. K
% Arguments "q" is optional - without it's considerably faster.
% FLOPS indication: 1.3 nk^3 versus 9.0 nk^3 for nk=500,
% 1.5 nk^3 9.8 nk^3 for nk=50.
%
% *... |
github | ssketch/motorControl-master | sdfactor.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/sedumi/1.3/maci64/sedumi_1_3_maci64/sdfactor.m | 2,689 | utf_8 | 709222cac79973f9bc08b1f2f0ccdbbf | % [Lsd,Rscl] = sdfactor(L,Lden, dense,DAt, d,v,y, At,K,R,y0,pars)
% SDFACTOR Factor self-dual embedding
%
% ******************** INTERNAL FUNCTION OF SEDUMI ********************
%
% See also sedumi
function Lsd = sdfactor(L,Lden, dense,DAt, d,v,y, At,c,K,R,y0,pars)
%
% This file is part of SeDuMi 1.1 by... |
github | ssketch/motorControl-master | maxstep.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/sedumi/1.3/maci64/sedumi_1_3_maci64/maxstep.m | 2,720 | utf_8 | d29347fc1532f4e8df8358fd237ecb9b | % tp = maxstep(dx,x,auxx,K)
% MAXSTEP Computes maximal step length to the boundary of the cone K.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function tp = maxstep(dx,x,auxx,K)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr R... |
github | ssketch/motorControl-master | getada3.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/sedumi/1.3/maci64/sedumi_1_3_maci64/getada3.m | 2,105 | utf_8 | 11ceb2c4517a6a6e4b9e5ea48eb7c955 | % [ADA,absd] = getada3(ADA, A,Ajc1,Aord, udsqr,K)
% GETADA3 Compute ADA(i,j) = (D(d^2)*A.t(:,i))' *A.t(:,j),
% and exploit sparsity as much as possible.
% absd - length m output vector, containing
% absd(i) = abs((D(d^2)*A.t(:,i))' *abs(A.t(:,i)).
% Hence, diag(ADA)./absd gi... |
github | ssketch/motorControl-master | mat.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/sedumi/1.3/maci64/sedumi_1_3_maci64/mat.m | 1,829 | utf_8 | a1a316630e44574ed78920f5612b3e6d | % Y = MAT(x,n) or Y = MAT(x) (the 2nd argument is optional)
% Given a vector of length n^2, this produces the n x n matrix
% Y such that x = vec(Y). In other words, x contains the columns of the
% matrix Y, stacked below each other.
%
% See also vec.
function X = mat(x,n)
%
% This file is par... |
github | ssketch/motorControl-master | blkchol.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/sedumi/1.3/maci64/sedumi_1_3_maci64/blkchol.m | 2,605 | utf_8 | da4d2517ae14a82752904f11f6cbc84e | % [L.L, L.d, L.skip, L.add] = blkchol(L,X,pars,absd)
% BLKCHOL Fast block sparse Cholesky factorization.
% The sparse Cholesky factor will be placed in the fields L.L, L.d;
% the symbolic factorization fields remain unchanged.
% On input, L should be the symbolic factori... |
github | ssketch/motorControl-master | psdfactor.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/sedumi/1.3/maci64/sedumi_1_3_maci64/psdfactor.m | 2,456 | utf_8 | 96443c1466de8fa756ed03d2d6cecf4e | % [ux,ispos] = psdfactor(x,K)
% PSDFACTOR UX'*UX Cholesky factorization
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function [ux,ispos] = psdfactor(x,K)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Copyright... |
github | ssketch/motorControl-master | adendotd.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/sedumi/1.3/maci64/sedumi_1_3_maci64/adendotd.m | 1,876 | utf_8 | 6485f3519ff8aa417135217d11492b65 | % Ad = Adendotd(dense, d, sparAd, Ablk, blkstart)
% ADENDOTD Computes d[k]'*Aj[k] for Lorentz blocks that are to be factored
% by dpr1fact.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function Ad = Adendotd(dense, d, sparAd, Ablk, blkstart)
%
% This... |
github | ssketch/motorControl-master | qjmul.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/sedumi/1.3/maci64/sedumi_1_3_maci64/qjmul.m | 2,538 | utf_8 | a1df3f1c1085dda5f3432444681c0e74 | % z = qjmul(x,y,K)
% QJMUL Implements Jordan product for Lorentz cones
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function z = qjmul(x,y,K)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Copyright (C) ... |
github | ssketch/motorControl-master | wregion.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/sedumi/1.3/maci64/sedumi_1_3_maci64/wregion.m | 8,078 | utf_8 | ce92b33341db85f802e7d9e5cd2a69d7 | % [xscl,y,zscl,y0, w,relt, dxmdz,err, wr] = wregion(L,Lden,Lsd,...
% d,v,vfrm,A,DAt,dense, R,K,y,y0,b, pars, wr)
% WREGION Implements Sturm-Zhang Wide-region Interior Point Method.
%
% ******************** INTERNAL FUNCTION OF SEDUMI ********************
%
% See also sedumi
function... |
github | ssketch/motorControl-master | ddot.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/sedumi/1.3/maci64/sedumi_1_3_maci64/ddot.m | 2,082 | utf_8 | c709cf41a873a49728a71063ac1b11e7 | % ddotX = ddot(d,X,blkstart [, Xblkjc])
% DDOT Given N x m matrix X, creates (blkstart(end)-blkstart(1)) x m matrix
% ddotX, having entries d[i]'* xj[i] for each (Lorentz norm bound) block
% blkstart(i):blkstart(i+1)-1. If X is sparse, then Xblkjc(:,2:3) should
% point to first... |
github | ssketch/motorControl-master | getdense.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/sedumi/1.3/maci64/sedumi_1_3_maci64/getdense.m | 4,850 | utf_8 | 23575ea33e5467f2687071aae09dcada | % [dense,Adotdden] = getdense(At,Ablkjc,K,pars)
% GETDENSE Creates dense.{l,cols,q}.
% Try to find small proportion of the cone primitives that appear
% in a large proportion of the primal constraints.
%
% ******************** INTERNAL FUNCTION OF SEDUMI ********************
%
% ... |
github | ssketch/motorControl-master | givensrot.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/sedumi/1.3/maci64/sedumi_1_3_maci64/givensrot.m | 1,768 | utf_8 | c06e2ebf2373bf05293d82dfbba507a1 | % y = givensrot(gjc,g,x,K)
% GIVENSROT
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function y = givensrot(gjc,g,x,K)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Copyright (C) 2005 McMaster University, H... |
github | ssketch/motorControl-master | sparbwslv.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/sedumi/1.3/maci64/sedumi_1_3_maci64/sparbwslv.m | 2,035 | utf_8 | 0549765090e0d9f6f70449eb65e4c1fb | % SPARBWSLV Solves block sparse upper-triangular system.
% y = sparbwslv(L,b) yields the same result as
% y(L.perm,:) = L.L'\b
% However, SPARBWSLV is faster than the built-in operator "\",
% because it uses dense linear algebra and loop-unrolling on
% supernodes.
%
% Typical use, wit... |
github | ssketch/motorControl-master | cellK.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/sedumi/1.3/maci64/sedumi_1_3_maci64/cellK.m | 3,587 | utf_8 | 16c58714b6e3f669c6a2647fbfa79272 | % xcell = cellK(x,K)
% CELLK Stores SeDuMi cone K-vector in cell-array format.
%
% On output xcell.f and xcell.l are the free and >=0 components,
% xcell.q{k}, xcell.r{k} and xcell.s{k} contain the Lorentz,
% Rotated Lorentz, and PSD-components, resp.
% xc... |
github | ssketch/motorControl-master | fwdKin.m | .m | motorControl-master/MPC/@arm_4DOF/fwdKin.m | 1,614 | utf_8 | 2e88ff5b0a896bd12586ed23ef7c3cd8 | % This function translates a given arm state from joint space to task
% space, taking joint limits (i.e., can that state be reached?) and
% handedness into account. It assumes that the shoulder is at (0,0), the
% default for any 'arm' object. It also outputs elbow position for
% plotting. If no state is specified as in... |
github | ssketch/motorControl-master | draw.m | .m | motorControl-master/MPC/@arm_4DOF/draw.m | 1,266 | utf_8 | 0fb2deaaa731d0a86a62250da5b88110 | % This function draws the arm in its current configuration, outputting a
% frame. It assumes that the shoulder is at (0,0), the default for any
% 'arm' object.
function M = draw(arm, x)
% if no state is specified, use current arm state
if nargin < 2
x = arm.x.val;
end
% Run forwad kinematics just to be sure
[ y, ... |
github | ssketch/motorControl-master | invKin.m | .m | motorControl-master/MPC/@arm_4DOF/invKin.m | 1,567 | utf_8 | 1d3a2800d116ca9426908bda222ea536 | % This function translates a given arm state from task space to joint
% space, taking arm mechanics/joint limits (i.e., can that state be
% reached?) and handedness into account. It assumes that the elbow cannot
% hyperextend (i.e., have a negative joint angle) and that the shoulder is
% at (0,0), the default for any '... |
github | ssketch/motorControl-master | jacobian.m | .m | motorControl-master/MPC/@arm_4DOF/jacobian.m | 1,684 | utf_8 | c3b8b1cfb46fa530898589443ee1b7db | % This function returns the Jacobian for the arm in a given state, taking
% handedness into account. If no state is specified as input, the function
% computes the Jacobian for the current state of the 'arm' object.
function J = jacobian(arm, x)
% if no state specified, use current state of arm
if nargin < 2
x = a... |
github | ssketch/motorControl-master | jacobianDeriv.m | .m | motorControl-master/MPC/@arm_4DOF/jacobianDeriv.m | 4,919 | utf_8 | 1fc9033be2bee531553725ac3952c3ac | % This function returns the derivative of the Jacobian for the arm in a
% given state, taking handedness into account. If no state is specified as
% input, the function computes the derivative for the current state of the
% 'arm' object.
function J_dot = jacobianDeriv(arm, x)
% if no state specified, use current state... |
github | ssketch/motorControl-master | dynamics.m | .m | motorControl-master/MPC/@arm_4DOF/dynamics.m | 12,683 | utf_8 | f1ac897227f437a5f946ecd4bf656519 | % This function returns the exuation of motion for the arm in its current
% state, represented in either joint or task space. In joint space, it is
% of the form x_dot = f(x,u) where u is the vector of joint torxues. In
% task space, it is of the form x_dot = f(x,u) where u is the vector of
% hand forces.
function f = ... |
github | ssketch/motorControl-master | withinLimits.m | .m | motorControl-master/MPC/@arm_4DOF/withinLimits.m | 260 | utf_8 | 0c77264c72fe88b63cef6ef0f1d4ec72 | % This function checks that a given arm state, in joint space, does not
% violate joint limits.
function flag = withinLimits(arm, x)
if nargin < 2
x = arm.x.val;
end
flag = false;
if all( x >= arm.x.min ) && all( x <= arm.x.max )
flag = true;
end |
github | peterkty/pnpush-master | ikTrajServer_internal.m | .m | pnpush-master/software/planning/ik_server/ikTrajServer_internal.m | 3,737 | utf_8 | 9a5fa5ae61613f0297f936806ff84e4d |
function ret_json = ikTrajServer_internal(r, data_json, options)
data = JSON.parse(data_json);
% 1. Get hand target pose
q0 = cell2mat(data.q0)';
target_hand_pos = [];
target_hand_ori = [];
if isfield(data, 'target_hand_pos')
target_hand_pos = cell2mat(data.target_hand_pos)'... |
github | peterkty/pnpush-master | savejson.m | .m | pnpush-master/software/externals/jsonlab-1.0/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | peterkty/pnpush-master | loadjson.m | .m | pnpush-master/software/externals/jsonlab-1.0/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | peterkty/pnpush-master | loadubjson.m | .m | pnpush-master/software/externals/jsonlab-1.0/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | peterkty/pnpush-master | saveubjson.m | .m | pnpush-master/software/externals/jsonlab-1.0/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | peterkty/pnpush-master | savejson.m | .m | pnpush-master/catkin_ws/src/pnpush_planning/src/analyze/matlab/Json/fsroot/jsonlab/savejson.m | 17,893 | utf_8 | e6ce3747006d07076995e00a8b14623a | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | peterkty/pnpush-master | loadjson.m | .m | pnpush-master/catkin_ws/src/pnpush_planning/src/analyze/matlab/Json/fsroot/jsonlab/loadjson.m | 16,170 | ibm852 | 2fc3bbe9aed7b4b05de8b391f0f744b3 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | peterkty/pnpush-master | loadubjson.m | .m | pnpush-master/catkin_ws/src/pnpush_planning/src/analyze/matlab/Json/fsroot/jsonlab/loadubjson.m | 13,346 | utf_8 | 4f30b406868398bdc5d594a6ae042e6b | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 492 2015-06-... |
github | peterkty/pnpush-master | saveubjson.m | .m | pnpush-master/catkin_ws/src/pnpush_planning/src/analyze/matlab/Json/fsroot/jsonlab/saveubjson.m | 16,440 | utf_8 | 4bf8d44968ce0b316dbc21afe2d446f9 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | WU-CPSL/WCPSv3-master | EKFsfun.m | .m | WCPSv3-master/LinearSystemWCPS_publish/EKFsfun.m | 1,743 | utf_8 | 67883ce47d0f98951cc17257c4ce0361 | function [sys,x0,str,ts,simStateCompliance] = EKFsfun(t,x,u,flag,A,B,C,T,delta_t)
switch flag,
case 0,
[sys,x0,str,ts,simStateCompliance]=mdlInitializeSizes();
case 1,
sys=mdlDerivatives();
case 2,
sys=mdlUpdate(t,x,u,A,B,C,T,delta_t);
case 3,
sys=mdlOutputs(t,x,u);
case 4,
sys=mdlGe... |
github | WU-CPSL/WCPSv3-master | buffsfun.m | .m | WCPSv3-master/LinearSystemWCPS_publish/buffsfun.m | 1,746 | utf_8 | 0cef0fb4d8be97725fb9bd5de7693c02 | function [sys,x0,str,ts,simStateCompliance] = buffsfun(t,x,u,flag)
switch flag,
case 0,
[sys,x0,str,ts,simStateCompliance]=mdlInitializeSizes();
case 1,
sys=mdlDerivatives(t,x,u);
case 2,
sys=mdlUpdate(t,x,u);
case 3,
sys=mdlOutputs(t,x,u);
case 4,
sys=mdlGetTimeOfNextVarHit(t,x,u);
... |
github | WU-CPSL/WCPSv3-master | MPCControllersfun.m | .m | WCPSv3-master/LinearSystemWCPS_publish/MPCControllersfun.m | 3,977 | utf_8 | f77a9d560588f3d63cbcb6b3a501161c | function [sys,x0,str,ts,simStateCompliance] = MPCControllersfun(t,x,u,flag,A,B,C,T,uini,Xsp,delta_t)
switch flag,
case 0,
[sys,x0,str,ts,simStateCompliance]=mdlInitializeSizes(uini);
case 1,
sys=mdlDerivatives(t,x,u);
case 2,
sys=mdlUpdate(t,x,u,A,B,C,T,Xsp,delta_t);
case 3,
sys=mdlOutputs(... |
github | WU-CPSL/WCPSv3-master | LinearModelSfun.m | .m | WCPSv3-master/LinearSystemWCPS_publish/LinearModelSfun.m | 1,330 | utf_8 | 9cdde310612a66d7825ed9174253caea | function [sys,x0,str,ts,simStateCompliance] = LinearModelSfun(t,x,u,flag,A,B,C,T,Xini)
switch flag,
case 0,
[sys,x0,str,ts,simStateCompliance]=mdlInitializeSizes(Xini);
case 1,
sys=mdlDerivatives(t,x,u,A,B,C,T);
case 2,
sys=mdlUpdate(t,x,u);
case 3,
sys=mdlOutputs(t,x,u,C,T);
case 4,
... |
github | WU-CPSL/WCPSv3-master | FQDecode.m | .m | WCPSv3-master/TinyOS-2.x-jhu/opt/tinyos-2.x-contrib/usc/senzip/SenZip_v1.0/SenZipReconstruct/FQDecode.m | 1,029 | utf_8 | 462ea203ada72595d14cc2daf9d85f38 | % decoding fixed quantization
% author: Sundeep Pattem
% December 18, 2009
function decodedSeq = FQDecode(encodedSeq, bitWidth, bitAllocation, low, high)
numElems = length(encodedSeq);
quantizationFactor = (high-low+1)/(2^bitAllocation);
bitRatio = floor(bitWidth/bitAllocation);
remainder = 0;
offset = 0;
k = 1;
for ... |
github | WU-CPSL/WCPSv3-master | TreeReconstruct.m | .m | WCPSv3-master/TinyOS-2.x-jhu/opt/tinyos-2.x-contrib/usc/senzip/SenZip_v1.0/SenZipReconstruct/TreeReconstruct.m | 348 | utf_8 | 4e22bcb29f5f4d012ef6a42aec3711f0 | % Tree reconstruction for SenZip compression
% author: Sundeep Pattem, ANRG, USC
function [hopInfo] = TreeReconstruct(parentInfo, I, hopInfo, hopCount)
for idx = 1:length(I)
sI = find(parentInfo == I(idx));
if (sI);
hopInfo(sI) = hopCount + 1;
hopInfo = TreeReconstruct(parentInfo, sI, hopInfo,... |
github | juchong/ADIS16448-Arduino-Teensy-master | crc16adis.m | .m | ADIS16448-Arduino-Teensy-master/crc/crc16adis.m | 2,232 | utf_8 | 14a4e026af8e18b22cb448455c090b5a | %%
% December 2017
% Author: Juan Jose Chong <juan.chong@analog.com>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% crc16adis.m
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% This function calculates a CRC16 check on data generated from an... |
github | juchong/ADIS16448-Arduino-Teensy-master | crc16adis_table.m | .m | ADIS16448-Arduino-Teensy-master/crc/crc16adis_table.m | 3,612 | utf_8 | 6b0f8ef038cb7640719308a3d5b618cc | %%
% December 2017
% Author: Juan Jose Chong <juan.chong@analog.com>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% crc16adis_table.m
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% This function calculates a CRC16 check using a look-up tab... |
github | bdairobot/Px4DataResolve-master | Px4DataResolve.m | .m | Px4DataResolve-master/src/Px4DataResolve.m | 47,656 | utf_8 | e201e4726090cb10b8dfc6a9ab99ea70 | function varargout = Px4DataResolve(varargin)
% px4dataresolve MATLAB code for Px4DataResolve.fig
% px4dataresolve, by itself, creates a new px4dataresolve or raises the existing
% singleton*.
%
% H = px4dataresolve returns the handle to a new px4dataresolve or the handle to
% the existing singleton... |
github | portfolio-optimization-hx/portfolio_optimization-master | calc_portfolio_return.m | .m | portfolio_optimization-master/functions/calc_portfolio_return.m | 11,517 | utf_8 | f9463c88b2c4b43674987bed5cd83b84 | function pfdata = calc_portfolio_return(asdata,date_range,w,inschedule,varargin)
% calculate portfolio return, value given asset data, date range, asset
% weights, and investment schedule
%
% investment schedule is a two column matrix with the first column
% as investment date and second column... |
github | portfolio-optimization-hx/portfolio_optimization-master | ascsv_to_asdata.m | .m | portfolio_optimization-master/functions/ascsv_to_asdata.m | 5,532 | utf_8 | 385dad9fb19791a20cefecae289dd4cd | function asdata = ascsv_to_asdata(csv_fpaths)
asdata = [];
pa_ndays = 255*2; % preallocate 255 trading days * 20 years
timestamp = (today-pa_ndays+1:today)'; % ascending order
price = zeros(pa_ndays,numel(csv_fpaths)); % close price
price_adjusted = zeros(pa_ndays... |
github | aalto-ics-kepaco/MKC-master | UpdateLincomb_GD_kernel.m | .m | MKC-master/UpdateLincomb_GD_kernel.m | 1,511 | utf_8 | 3f695b5e11fdaacaf40a351dbc42bbe5 | function [A] = UpdateLincomb_GD_kernel(A,K,S,para,Obs)
% function solve min C1\sum_m \|Km-AmKmAm\|+ C2\|AmKmAm -\sum_lSlAlKlAl\|^2 + C3 \|A\|2_1
% A(i,:,m) : linear component for i th point in m th view
%
% Input:
%
M=size(A,3);
for m=1:1:M
[A,rtime(m),iteration(m)] = GD_kernel(A,K,S,m,para,Obs);
end
end
functi... |
github | aalto-ics-kepaco/MKC-master | UpdateLincomb_GD_emdbht.m | .m | MKC-master/UpdateLincomb_GD_emdbht.m | 1,571 | utf_8 | c4e0603de8829cdfb97b377f31511082 | function [A] = UpdateLincomb_GD_emdbht(A,K,S,para,Obs)
% function solve min C1\sum_m \|Km-AmKmAm\|+ C2\|Am -\sum_lSlAl\|^2 + C3 \|A\|2_1
% A(i,:,m) : linear component for i th point in m th view
%
% Input:
%
M=size(A,3);
for m=1:1:M
[A,rtime(m),iteration(m)] = GD_emdbht(A,K,S,m,para,Obs);
end
end
functio... |
github | aalto-ics-kepaco/MKC-master | gkernel.m | .m | MKC-master/gkernel.m | 4,690 | utf_8 | 45918190ae0cc94b511f0e5b215dfa65 |
function [grad] = gmvt_inter(A,K,S,m,para,Obs)
grad=zeros(size(A,1),size(A,2));
eps=1E-10;
M=size(K,3);
N=size(K,2);
for l =1:1:M
temp(l).D=A(:,:,l)*K(:,:,l);
temp(l).hatk=temp(l).D*A(:,:,l)';
end
temp(m).B=K(:,:,m)-temp(m).hatk;
temp(m).E=temp(m).B(:,Obs(m).id)*temp(m).D(Obs(m).id,:);
for l=1:1:M
temp(l).C=ze... |
github | aalto-ics-kepaco/MKC-master | run_MVT_allpara_emdbht.m | .m | MKC-master/run_MVT_allpara_emdbht.m | 744 | utf_8 | 7c132a98f1e373a382da5c9ad047c858 |
function run_MVT_allpara_emdbht(c,name)
%load(['../Toyresult/rmse_MFEAT_small2.mat'],'rmse','para');
%count=size(para,1)
%str=count +1;
count=0;
str=count+1;
%for num=[1,10]
for i=[1000]
c1=i;
for j=[1, 10]
c2=j; %relevence
for k=[ 0.0001 0.001 0.01 0.1 1 10 ]
c3=k; %l21
... |
github | aalto-ics-kepaco/MKC-master | run_MVT_allpara_kernel.m | .m | MKC-master/run_MVT_allpara_kernel.m | 744 | utf_8 | 29e1b1d45b0efa3c1135d0885ef3cb5f |
function run_MVT_allpara_kernel(c,name)
%load(['../Toyresult/rmse_MFEAT_small2.mat'],'rmse','para');
%count=size(para,1)
%str=count +1;
count=0;
str=count+1;
%for num=[1,10]
for i=[1000]
c1=i;
for j=[1, 10]
c2=j; %relevence
for k=[ 0.0001 0.001 0.01 0.1 1 10 ]
c3=k; %l21
... |
github | taylordr/Temporal_Eigenvector_Centrality-master | reduce_to_GC.m | .m | Temporal_Eigenvector_Centrality-master/Temporal_Eigenvector_Centrality/reduce_to_GC.m | 1,121 | utf_8 | a41e8b077b985b9573fe9265476971f0 | %%
function GC_network_data_filename = reduce_to_GC(network_data_filename)
GC_network_data_filename = [network_data_filename(1:(end-4)),'_GC.mat'];
if ~exist(GC_network_data_filename)
load(network_data_filename);%load struct 'net'
net2 = net;
net.A={};
net.N=[];
%aggregate ... |
github | taylordr/Temporal_Eigenvector_Centrality-master | build_network.m | .m | Temporal_Eigenvector_Centrality-master/Temporal_Eigenvector_Centrality/build_network.m | 1,060 | utf_8 | ac051f39ccdd776ca22d6fc34561e991 |
function net_filename = build_network(edge_list_filename,node_labels_filename)
net_filename = [edge_list_filename(1:(end-4)),'_net_data.mat'];
if ~exist(net_filename)
data = load(edge_list_filename);
from = data(:,1);
to = data(:,2);
weight = data(:,3);
time = data(:,4);
... |
github | taylordr/Temporal_Eigenvector_Centrality-master | compute_TA_centrality_and_FOM_scores.m | .m | Temporal_Eigenvector_Centrality-master/Temporal_Eigenvector_Centrality/compute_TA_centrality_and_FOM_scores.m | 2,451 | utf_8 | 15e7e2a573a5675d8a6ab731cf13f05c | %%
function TA_centrality_and_FOM_scores_datafile = compute_TA_centrality_and_FOM_scores(GC_network_data_filename,w_centrality_datafile)
TA_centrality_and_FOM_scores_datafile = [w_centrality_datafile(1:(end-4)),'_TA_centrality_and_FOM_scores.mat'];
if ~exist(TA_centrality_and_FOM_scores_datafile)
... |
github | taylordr/Temporal_Eigenvector_Centrality-master | compute_w_centrality.m | .m | Temporal_Eigenvector_Centrality-master/Temporal_Eigenvector_Centrality/compute_w_centrality.m | 1,432 | utf_8 | 87f5b0b4377693164a79081aad039374 | %%
function [w_centrality_datafile] = compute_w_centrality(GC_network_data_filename,multilayer_centrality)
w_centrality_datafile = [GC_network_data_filename(1:(end-4)),'_',num2str(multilayer_centrality.centrality_name)];
w_centrality_datafile = [w_centrality_datafile,'.mat']
if ~exist(w_centrality_dat... |
github | JensReimann/RTKLIB-master | plotlexion.m | .m | RTKLIB-master/util/testlex/plotlexion.m | 1,593 | utf_8 | 1333e9ae36ebce0dfcb9da8ab7972734 | function plotlexion(file,index)
%
% plot lex ionosphere correction error
%
% 2010/12/09 0.1 new
%
if nargin<1, file='LEXION_20101204'; end
if nargin<2, index=2; end
eval(file);
td=caltomjd(epoch);
time=time(index);
ep=mjdtocal(td+(time+0.5)/86400);
ts=sprintf('%04.0f/%02.0f/%02.0f %02.0f:%02.0f',ep(1:5));
% plot le... |
github | JensReimann/RTKLIB-master | testionex.m | .m | RTKLIB-master/test/utest/testionex.m | 326,974 | utf_8 | e8fe871f5e28acb961451acf230d028f | function testionex
[tec,rms]=testdata1;
range=0:0.01:10;
figure
[c,h]=contourf(0:2:360,90:-2:-90,tec,range);
set(h,'edgecolor','none');
caxis(range([1,end]));
title('vertical iono delay');
figure
[c,h]=contourf(0:2:360,90:-2:-90,sqrt(rms),range);
set(h,'edgecolor','none');
caxis(range([1,end]));
title('vertical ion... |
github | JensReimann/RTKLIB-master | testionppp.m | .m | RTKLIB-master/test/utest/testionppp.m | 1,136 | utf_8 | 7023ec339e81fd7fa267d573c3d2d588 | function testionppp
%
% test RTCA/DO229C bug (A.4.4.10.1 A-22,23)
%
az=0:0.1:360;
figure, axes, hold on, box on, grid on;
pos=[80,0];
for i=1:length(az), posp(i,:)=ionppp(pos,[az(i),0]); end
plot(posp(:,2),posp(:,1),'.');
pos=[-75,170];
for i=1:length(az), posp(i,:)=ionppp(pos,[az(i),0]); end
plot(posp(:,2),posp(:,... |
github | JensReimann/RTKLIB-master | plotigp.m | .m | RTKLIB-master/test/utest/plotigp.m | 1,278 | utf_8 | bf7bb7d90d3221bbc76f008e0c03363f | function plotigp
figure
mesh=readmesh;
gmt('mmap','proj','eq','cent',[135,35],'scale',10,'pos',[0,0,1,1]);
gmt('mcoast');
gmt('mgrid','gint',2,'lint',10,'color',[.5 .5 .5]);
for i=1:size(mesh,1)
gmt('mplot',mesh(i,1),mesh(i,2),'r','marker','.','markersize',10);
end
plotarea([36,138],15);
% plot ipp area ------... |
github | Ojami/BiKEGG-master | ArrowheadProcess.m | .m | BiKEGG-master/ArrowheadProcess.m | 13,954 | utf_8 | 695eeaed513a6a63fce0549bb3fbbb91 | function [ArX,ArY,Cntrs,Director] = ArrowheadProcess(Xin1,Yin1,min_x,min_y,...
idx,basemap,JumpData,RefOverlapData,ID,flx_idx)
% ArrowheadProcess
% is a subfunction of NetDraw for identifiying the
% appropriate coordinates for drawing arrowheads on metabolic maps.
% Inputs:
% Xin1, Yin1: Reaction coordinates
... |
github | Ojami/BiKEGG-master | Bigg2KeggRestricted.m | .m | BiKEGG-master/Bigg2KeggRestricted.m | 10,906 | utf_8 | 9029fcd276e4a432b10978fd38f4277a | function [BiGGID,AllRxn] = Bigg2KeggRestricted(D,Metkegg,rxnData,cpds,cpd2rxn)
% Bigg2KeggRestricted
% is a subfunction of Bigg2Kegg and employs restricted
% conditions for identifying reaction correspondences.
% Full documentation is available in the user manual.
%
% O. Jamialahmadi
% TMU, Chem. Eng. Dept., B... |
github | Ojami/BiKEGG-master | Bigg2KeggTable.m | .m | BiKEGG-master/Bigg2KeggTable.m | 3,994 | utf_8 | 498ed40f50d1001b7f3c68b4d3e9a85a | function varargout = Bigg2KeggTable(varargin)
% BIGG2KEGGTABLE MATLAB code for Bigg2KeggTable.fig
% BIGG2KEGGTABLE, by itself, creates a new BIGG2KEGGTABLE or raises the existing
% singleton*.
%
% H = BIGG2KEGGTABLE returns the handle to a new BIGG2KEGGTABLE or the handle to
% the existing singleton... |
github | Ojami/BiKEGG-master | VisualProp.m | .m | BiKEGG-master/VisualProp.m | 4,108 | utf_8 | 682a3a7edf30511c7117097f4388d825 | function varargout = VisualProp(varargin)
% VisualProp(GUI)
% Customizing color properties for KeggDraw maps.
%
% O. Jamialahmadi
% TMU, Chem. Eng. Dept., Biotech. Group
% Mar. 2015
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui... |
github | Ojami/BiKEGG-master | interparc.m | .m | BiKEGG-master/interparc.m | 17,309 | utf_8 | 1f0091a116a5dac28dde5d68f6d6fcc4 | function [pt,dudt,fofthandle] = interparc(t,px,py,varargin)
% interparc (Copyright (c) 2012, John D'Errico): interpolate points along a curve in 2 or more dimensions
% usage: pt = interparc(t,px,py) % a 2-d curve
% usage: pt = interparc(t,px,py,pz) % a 3-d curve
% usage: pt = interparc(t,px,py,pz,pw,...) % a 4-d or... |
github | Ojami/BiKEGG-master | Bigg2Kegg.m | .m | BiKEGG-master/Bigg2Kegg.m | 30,633 | utf_8 | e553f8bba5fb09d7d6502b9f551fba35 | function Bigg2Kegg(Idfier)
% BiKEGG
% generates corresponding reactions in KEGG and BiGG/HMR
% databases and saves the output as a *.mat file in BiGG2KEGG folder.
% Input:
% - Idfier : a string of either 'bigg' or 'hmr'
% Full documentation can be found in the user manual
%
% O. Jamialahmadi
% TMU, Chem. ... |
github | Ojami/BiKEGG-master | SaveImgs.m | .m | BiKEGG-master/SaveImgs.m | 4,776 | utf_8 | 89fa60feb2e11c23ecb8051fb3c51d69 | function varargout = SaveImgs(varargin)
% SaveImgs(GUI)
% A GUI tool for SaveFlxImgs getting the user defined information
%(format,resolution,...) for exporting images created by NetDraw|KeggDraw
%
% O. Jamialahmadi
% TMU, Chem. Eng. Dept., Biotech. Group
% June 2016
% Begin initialization code - DO NOT EDIT
gui_Sing... |
github | Ojami/BiKEGG-master | NetDraw.m | .m | BiKEGG-master/NetDraw.m | 37,324 | utf_8 | afdbbd96ddfe73b7685acbd06d8e7680 | function NetDraw (Outflx,RxnCds,MapChoice,InOpts)
% NetDraw
% uses KGML file of global metabolic pathway of KEGG (map01100)
% to extract KEGG rxn IDs and their corresponding coordinates.
% The overall structure of NetDraw is similar to that of KeggDraw
% with minor modifications on subfunctions. Further details c... |
github | Ojami/BiKEGG-master | MultiRxnsLib.m | .m | BiKEGG-master/MultiRxnsLib.m | 2,036 | utf_8 | 624ea1ba78bc29712f25cf4689917208 | function MultiRxnsLib
% MultiRxnsLib
% generates shared multi-step reactions among all models saved
% in Bigg2Kegg folder. This list is used in both function UniModel and
% MultiRxns
%
% O. Jamialahmadi
% TMU, Chem. Eng. Dept., Biotech. Group
% Jan. 2015
Pth1 = which ('Bigg2Kegg.m');
tind = find(Pth1=='\'... |
github | Ojami/BiKEGG-master | UpdateDBase.m | .m | BiKEGG-master/UpdateDBase.m | 11,470 | utf_8 | 44a328f47d481972aad28e133b1e50d0 | function varargout = UpdateDBase(varargin)
% UpdateDBase(GUI)
% Updating the local database of BiKEGG for offline use.
%
% O. Jamialahmadi
% TMU, Chem. Eng. Dept., Biotech. Group
% Mar. 2015
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
... |
github | Ojami/BiKEGG-master | MultiRxns.m | .m | BiKEGG-master/MultiRxns.m | 5,517 | utf_8 | 744c59580ff3708dec418ad99fc444da | function [Po,Hout1] = MultiRxns(K)
% MultiRxns
% gets a set of reactions and based on data provided in KEGG
% database for each reaction, searches for multi-step reactions and saves
% each multi-step reaction along with all of its single-step reactions
% (Child reactions).
% Inputs:
% K = A cell array of KEGG re... |
github | Ojami/BiKEGG-master | KEGG2BiGGMets.m | .m | BiKEGG-master/KEGG2BiGGMets.m | 5,076 | utf_8 | bec4d2d16d0a10337ca5ee430e3a16a7 | function [Metkegg,Metbigg] = KEGG2BiGGMets(D,CbModel)
% KEGG2BiGGMets
% is a subfunction of MapAdjuster for displaying compound's
% data on created customized metabolic map by NetDraw. The function
% extracts all metabolite correspondences between KEGG and BiGG based on
% the current COBRA model and data in BiGG A... |
github | Ojami/BiKEGG-master | KeggDraw.m | .m | BiKEGG-master/KeggDraw.m | 29,824 | utf_8 | d8b3685c88b517188f9c6696398702f0 | function KeggDraw (Outflx,RxnCds,MapChoice,flxType,InOpts)
% KeggDraw
% uses KGML files to extract KEGG rxn IDs and their
% corresponding coordinates on each map image (extracted from
% rest.kegg.jp). Based on reactions in each map, a comparison between
% current map reactions and input reaction codes is performed... |
github | Ojami/BiKEGG-master | TimeUnit.m | .m | BiKEGG-master/TimeUnit.m | 2,402 | utf_8 | cc565bf0b957dd18bea61f6831270d77 | function varargout = TimeUnit(varargin)
% TimeUnit(GUI)
% is prompted for each visualization task in KeggDraw
% to determine the time-serie unit of input data (in dynamic conditions).
% O. Jamialahmadi
% TMU, Chem. Eng. Dept., Biotech. Group
% Mar. 2015
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilena... |
github | Ojami/BiKEGG-master | GetKeggTable.m | .m | BiKEGG-master/GetKeggTable.m | 3,744 | utf_8 | ae874b63e0d6b57bfa52f5116e6ed1a6 | function varargout = GetKeggTable(varargin)
% GetKeggTable (GUI)
% Identifies missed (unknown) reaction correspondences for the input BiGG model.
% Part of GetKEGG
% O. Jamialahmadi
% TMU, Chem. Eng. Dept., Biotech. Group
% Nov. 2015
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui... |
github | Ojami/BiKEGG-master | GetKeggMaps.m | .m | BiKEGG-master/GetKeggMaps.m | 4,037 | utf_8 | b1fa3f937d94463e36e4dcb5af9c3b68 | function varargout = GetKeggMaps(varargin)
% GetKeggMaps (GUI)
% Gets selected KEGG pathways of interest for the visualization purpose.
%
% O. Jamialahmadi
% TMU, Chem. Eng. Dept., Biotech. Group
% Nov. 2015
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, .... |
github | Ojami/BiKEGG-master | KeggDrawTable.m | .m | BiKEGG-master/KeggDrawTable.m | 7,459 | utf_8 | 8d17f42691e3c6f76dee71b00c49f1ef | function varargout = KeggDrawTable(varargin)
% KeggDrawTable(GUI)
%
% O. Jamialahmadi
% TMU, Chem. Eng. Dept., Biotech. Group
% Nov. 2015
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
... |
github | Ojami/BiKEGG-master | MapAdjuster.m | .m | BiKEGG-master/MapAdjuster.m | 13,722 | utf_8 | 2247f42bf169e221ac1489f3c7b75b03 | function varargout = MapAdjuster(varargin)
% MapAdjuster(GUI)
% Post-processing the created customized metabolic maps by NetDraw
%
% O. Jamialahmadi
% TMU, Chem. Eng. Dept., Biotech. Group
% June 2016
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
... |
github | Ojami/BiKEGG-master | PreconsMethod.m | .m | BiKEGG-master/PreCons/PreconsMethod.m | 10,821 | utf_8 | 60e724f5c1154b37848d2ef79e7ab60a | function PreconsMethod(handles)
% PreconsMethod
% Employs Precons GUI tool for building reaction correspondences based on
% KEGG genome annotations. Output is a MS Excel spreadsheet containing
% gene entries (KEGG), KEGG reaction identifier, BiGG reaction abbr., and
% associated pathways (KEGG).
% A MATLAB bio... |
github | Ojami/BiKEGG-master | Precons.m | .m | BiKEGG-master/PreCons/Precons.m | 9,111 | utf_8 | ea2cdc6f0c79e918702e917e5e59d47c | function varargout = Precons(varargin)
% Precons(GUI)
% A GUI for PreconsMethod
%
% O. Jamialahmadi
% TMU, Chem. Eng. Dept., Biotech. Group
% Match 2016
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ... |
github | mathieulagrange/paperRelevanceBasedSimilarity-master | unsupervised.m | .m | paperRelevanceBasedSimilarity-master/experiment/unsupervised.m | 39,767 | utf_8 | 75aaa9ab62fc096b52d6356f5bfa4986 | function taslpStruct2016_unsupervised(varargin) ... |
github | mathieulagrange/paperRelevanceBasedSimilarity-master | metrop.m | .m | paperRelevanceBasedSimilarity-master/experiment/boflib/netlab - put in path/metrop.m | 4,976 | utf_8 | 53e05637fbfd2fcd95efaadd86e97ce9 | function [samples, energies, diagn] = metrop(f, x, options, gradf, varargin)
%METROP Markov Chain Monte Carlo sampling with Metropolis algorithm.
%
% Description
% SAMPLES = METROP(F, X, OPTIONS) uses the Metropolis algorithm to
% sample from the distribution P ~ EXP(-F), where F is the first
% argument to METROP. T... |
github | mathieulagrange/paperRelevanceBasedSimilarity-master | hmc.m | .m | paperRelevanceBasedSimilarity-master/experiment/boflib/netlab - put in path/hmc.m | 7,683 | utf_8 | 64c15e958297afe69787b8617dc1a56a | function [samples, energies, diagn] = hmc(f, x, options, gradf, varargin)
%HMC Hybrid Monte Carlo sampling.
%
% Description
% SAMPLES = HMC(F, X, OPTIONS, GRADF) uses a hybrid Monte Carlo
% algorithm to sample from the distribution P ~ EXP(-F), where F is the
% first argument to HMC. The Markov chain starts at the poi... |
github | mathieulagrange/paperRelevanceBasedSimilarity-master | gtminit.m | .m | paperRelevanceBasedSimilarity-master/experiment/boflib/netlab - put in path/gtminit.m | 5,204 | utf_8 | ab76f6114a7e85375ade5e5889d5f6a7 | function net = gtminit(net, options, data, samp_type, varargin)
%GTMINIT Initialise the weights and latent sample in a GTM.
%
% Description
% NET = GTMINIT(NET, OPTIONS, DATA, SAMPTYPE) takes a GTM NET and
% generates a sample of latent data points and sets the centres (and
% widths if appropriate) of NET.RBFNET.
%
% I... |
github | mathieulagrange/paperRelevanceBasedSimilarity-master | mlphess.m | .m | paperRelevanceBasedSimilarity-master/experiment/boflib/netlab - put in path/mlphess.m | 1,633 | utf_8 | b91a15ca11b4886de6c1671c33a735d3 | function [h, hdata] = mlphess(net, x, t, hdata)
%MLPHESS Evaluate the Hessian matrix for a multi-layer perceptron network.
%
% Description
% H = MLPHESS(NET, X, T) takes an MLP network data structure NET, a
% matrix X of input values, and a matrix T of target values and returns
% the full Hessian matrix H corresponding... |
github | mathieulagrange/paperRelevanceBasedSimilarity-master | glmhess.m | .m | paperRelevanceBasedSimilarity-master/experiment/boflib/netlab - put in path/glmhess.m | 4,024 | utf_8 | 2d706b82d25cb35ff9467fe8837ef26f | function [h, hdata] = glmhess(net, x, t, hdata)
%GLMHESS Evaluate the Hessian matrix for a generalised linear model.
%
% Description
% H = GLMHESS(NET, X, T) takes a GLM network data structure NET, a
% matrix X of input values, and a matrix T of target values and returns
% the full Hessian matrix H corresponding to t... |
github | mathieulagrange/paperRelevanceBasedSimilarity-master | rbfhess.m | .m | paperRelevanceBasedSimilarity-master/experiment/boflib/netlab - put in path/rbfhess.m | 3,138 | utf_8 | 0a6ef29c8be32e9991cacfe42bdfa0b3 | function [h, hdata] = rbfhess(net, x, t, hdata)
%RBFHESS Evaluate the Hessian matrix for RBF network.
%
% Description
% H = RBFHESS(NET, X, T) takes an RBF network data structure NET, a
% matrix X of input values, and a matrix T of target values and returns
% the full Hessian matrix H corresponding to the second deriva... |
github | mathieulagrange/paperRelevanceBasedSimilarity-master | sceneSvm.m | .m | paperRelevanceBasedSimilarity-master/experiment/deprecated/sceneSvm/sceneSvm.m | 39,767 | utf_8 | ce9496bf7bda8c8fb0808cdd54f1091b | function sceneSvm(varargin) ... |
github | mathieulagrange/paperRelevanceBasedSimilarity-master | make.m | .m | paperRelevanceBasedSimilarity-master/experiment/deprecated/sceneSvm/libsvm-3.21/matlab/make.m | 888 | utf_8 | 4a2ad69e765736f8cca8e3b721fb7ebd | % This make.m is for MATLAB and OCTAVE under Windows, Mac, and Unix
function make()
try
% This part is for OCTAVE
if (exist ('OCTAVE_VERSION', 'builtin'))
mex libsvmread.c
mex libsvmwrite.c
mex -I.. svmtrain.c ../svm.cpp svm_model_matlab.c
mex -I.. svmpredict.c ../svm.cpp svm_model_matlab.c
% This part is fo... |
github | mathieulagrange/paperRelevanceBasedSimilarity-master | fft2barkmx.m | .m | paperRelevanceBasedSimilarity-master/experiment/deprecated/experiment_code/lib/rastamat/fft2barkmx.m | 1,484 | utf_8 | d883b1f28f1f118eca09c08291bd7c3a | function wts = fft2barkmx(nfft, sr, nfilts, width, minfreq, maxfreq)
% wts = fft2barkmx(nfft, sr, nfilts, width, minfreq, maxfreq)
% Generate a matrix of weights to combine FFT bins into Bark
% bins. nfft defines the source FFT size at sampling rate sr.
% Optional nfilts specifies the number of output b... |
github | mathieulagrange/paperRelevanceBasedSimilarity-master | process_options.m | .m | paperRelevanceBasedSimilarity-master/experiment/deprecated/experiment_code/lib/rastamat/process_options.m | 5,168 | utf_8 | 48c1f0411ce12896ae4b7b06bb654407 | % PROCESS_OPTIONS - Processes options passed to a Matlab function.
% This function provides a simple means of
% parsing attribute-value options. Each option is
% named by a unique string and is given a default
% value.
%
% Usage: [var1, var... |
github | mathieulagrange/paperRelevanceBasedSimilarity-master | fft2melmx.m | .m | paperRelevanceBasedSimilarity-master/experiment/deprecated/experiment_code/lib/rastamat/fft2melmx.m | 4,994 | utf_8 | 8f51153c85c0960044bfd717864ef396 | function [wts,binfrqs] = fft2melmx(nfft, sr, nfilts, width, minfrq, maxfrq, htkmel, constamp)
% [wts,frqs] = fft2melmx(nfft, sr, nfilts, width, minfrq, maxfrq, htkmel, constamp)
% Generate a matrix of weights to combine FFT bins into Mel
% bins. nfft defines the source FFT size at sampling rate sr.
% Op... |
github | mathieulagrange/paperRelevanceBasedSimilarity-master | make.m | .m | paperRelevanceBasedSimilarity-master/experiment/deprecated/experiment_code/lib/libsvm-3.21/matlab/make.m | 888 | utf_8 | 4a2ad69e765736f8cca8e3b721fb7ebd | % This make.m is for MATLAB and OCTAVE under Windows, Mac, and Unix
function make()
try
% This part is for OCTAVE
if (exist ('OCTAVE_VERSION', 'builtin'))
mex libsvmread.c
mex libsvmwrite.c
mex -I.. svmtrain.c ../svm.cpp svm_model_matlab.c
mex -I.. svmpredict.c ../svm.cpp svm_model_matlab.c
% This part is fo... |
github | mathieulagrange/paperRelevanceBasedSimilarity-master | unsupervised.m | .m | paperRelevanceBasedSimilarity-master/experiment/deprecated/unsupervised/unsupervised.m | 39,767 | utf_8 | 75aaa9ab62fc096b52d6356f5bfa4986 | function taslpStruct2016_unsupervised(varargin) ... |
github | mathieulagrange/paperRelevanceBasedSimilarity-master | supervised.m | .m | paperRelevanceBasedSimilarity-master/experiment/deprecated/supervised/supervised.m | 39,741 | utf_8 | 3327ea29e3f528201766e949ba2cd747 | function supervised(varargin) ... |
github | jwmneu/PO_CR-master | RegressorSM3D.m | .m | PO_CR-master/RegressorSM3D.m | 12,358 | utf_8 | 39a8e10a56783d8c041b3ccce864b8d1 | function [] = RegressorSM3D()
% chosed shape model of KTorresani = 10, energy = 0.8, KNonrigid = 5
clear;
global VERSIONCHECK;
VERSIONCHECK = 'SM_3D_1';
Kpi = 10;
T = 1;
ridge_param = 0;
smallsize = 0;
use_5_lms = 1;
outputDir = 'Results/';
% Setup_createDir(outputDir, 0);
datasetDir = '../dataset/';
te... |
github | jwmneu/PO_CR-master | Evaluate_3D_validation.m | .m | PO_CR-master/Evaluate_3D_validation.m | 2,794 | utf_8 | 187aa5cbdda7ecd16d7394f16cd514a4 | function [] = Evaluate_3D_validation(InitializationTestingDir, SIFT_scale, Kpi, smallsize, use_5_lms, outputDir, plot)
% InitializationTestingDir = ['../PertInit_testing_SM_3D_0.35_all_param/'];
n1 = 330;
n2 = 223;
gtParamDir = 'TR_params/';
load([gtParamDir 'TR_testing.mat']);
% update testing p and eva... |
github | jwmneu/PO_CR-master | mini_debug.m | .m | PO_CR-master/mini_debug.m | 564 | utf_8 | 2fc1ca9227b840d73014dbf30d322091 | function [] = mini_debug()
clear;
Kpi = 10;
KNonrigid = 7;
load('debug_ridge/mini.mat');
jp = ( delta_p \ b)';
jp = jp(:, 2:6);
H = jp' * jp;
Risk = H \ jp';
[p_updated, learned_delta_p] = update_p(Risk, p, features, Kpi, A0, KNonrigid);
diff_p = p - p_updated;
d = learned_delta_p * 0.5 - delta_p;
end
fu... |
github | jwmneu/PO_CR-master | SM_shape_model.m | .m | PO_CR-master/SM_shape_model.m | 4,869 | utf_8 | 0baa3f7ec1ebcce998430dc43e8cb079 | function [myShape] = SM_shape_model()
%% initialization
addpath('functions/');
modelDir = 'matfiles/';
shape = load([modelDir 'shape_model.mat']);
shape = shape.shape;
datasetDir = '../dataset/';
testsetDir = '../test_data/';
CLMDir = './';
folder1 = [datasetDir 'helen/trainset/'];
what1 = 'jpg';
folder2 = ... |
github | jwmneu/PO_CR-master | RegressorSM.m | .m | PO_CR-master/RegressorSM.m | 26,434 | utf_8 | d8c59ebccea90636b6504db0b20aee17 | function [] = RegressorSM()
% clear;
global VERSIONCHECK;
VERSIONCHECK = 'SM_1';
Kpi = 10;
T = 1;
ridge_param = 0;
smallsize = 0;
use_5_lms = 1;
outputDir = 'Results/';
Setup_createDir(outputDir, 0);
datasetDir = '../dataset/';
testsetDir = '../test_data/';
gtParamDir = 'TR_params/';
CLMDir = './';
n... |
github | jwmneu/PO_CR-master | face_det_stat.m | .m | PO_CR-master/face_det_stat.m | 5,740 | utf_8 | a6ff496c270f8290b61bf90482c04f44 | % function that comptues statistics of face detection initialization
function [fd_stat] = face_det_stat()
%% initialization
addpath('functions/');
addpath('matfiles/');
load shape_model;
load myShape;
datasetDir = '../dataset/';
testsetDir = '../test_data/';
CLMDir = './';
folder1 = [datasetDir 'helen/trains... |
github | jwmneu/PO_CR-master | RegressorLM3D.m | .m | PO_CR-master/RegressorLM3D.m | 12,205 | utf_8 | 8a241ffa18d10b59ac6d025c7be9a5fa | function [] = RegressorLM3D(t, debugchoice, sc_rigid, sc_nonrigid, regu_lambda)
% chosed shape model of KTorresani = 25, energy = 0.95, KNonrigid = 17
t = 5; debugchoice = 'all'; sc_rigid = 0.05; sc_nonrigid = 0.05; regu_lambda = 0;
debug_ch = debugchoice
disp(['iteration is ' num2str(t)]);
iter = t;
global VERS... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.