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 | zhoupc/OASIS_matlab-master | schurmat_qblk.m | .m | OASIS_matlab-master/packages/cvx/sdpt3/Solver/schurmat_qblk.m | 3,205 | utf_8 | d154ddca57828c83c43efd37fbe64829 | %%*******************************************************************
%% schurmat_qblk: compute schur matrix corresponding to SOCP blocks.
%%
%% HKM direction: output = schur + Ax*Ae' + Ae*Ax' - Ad*Ad'
%% NT direction: output = schur + Ae*Ae' - Ad*Ad'
%%
%% where schur = A*D*A', and Ad is the modification to ADA'
%% s... |
github | zhoupc/OASIS_matlab-master | ops.m | .m | OASIS_matlab-master/packages/cvx/sdpt3/Solver/ops.m | 11,548 | utf_8 | 0931c97ce9eb7f01a28fac581153ca1c | %%******************************************************************
%% ops:
%%
%% Z = ops(X,operand,Y,alpha);
%%
%% INPUT: X = a matrix or a scalar
%% or a CELL ARRAY consisting only of matrices
%% operand = sym, transpose, triu, tril,
%% real, imag, sqrt, abs, ... |
github | zhoupc/OASIS_matlab-master | schurmat_lblk.m | .m | OASIS_matlab-master/packages/cvx/sdpt3/Solver/schurmat_lblk.m | 1,010 | utf_8 | 11b66919604e457c631f5ed67225fc45 | %%*******************************************************************
%% schurmat_lblk: compute A*D*A'
%%
%% SDPT3: version 3.1
%% Copyright (c) 1997 by
%% K.C. Toh, M.J. Todd, R.H. Tutuncu
%% Last Modified: 16 Sep 2004
%%*******************************************************************
function [schur,UU,EE] = schu... |
github | zhoupc/OASIS_matlab-master | sqlpmisc.m | .m | OASIS_matlab-master/packages/cvx/sdpt3/Solver/sqlpmisc.m | 4,078 | utf_8 | 1dc032b6e1fd72eb26f2f3e519a746dd | %%*****************************************************************************
%% sqlpmisc:
%% unscale and produce infeasibility certificates if appropriate
%%
%% SDPT3: version 3.1
%% Copyright (c) 1997 by
%% K.C. Toh, M.J. Todd, R.H. Tutuncu
%% Last Modified: 16 Sep 2004.
%%******************************************... |
github | zhoupc/OASIS_matlab-master | checkdense.m | .m | OASIS_matlab-master/packages/cvx/sdpt3/Solver/checkdense.m | 730 | utf_8 | 6d44b41643ef16f78b42927e1fc03dd8 | %%********************************************************************
%% checkdense : identify the dense columns of a matrix
%%
%% SDPT3: version 3.1
%% Copyright (c) 1997 by
%% K.C. Toh, M.J. Todd, R.H. Tutuncu
%% Last Modified: 16 Sep 2004
%%********************************************************************
funct... |
github | zhoupc/OASIS_matlab-master | NTrhsfun.m | .m | OASIS_matlab-master/packages/cvx/sdpt3/Solver/NTrhsfun.m | 4,253 | utf_8 | 51c74223afc232c456def8488b51aa3f | %%*******************************************************************
%% NTrhsfun: compute the right-hand side vector of the
%% Schur complement equation 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 | zhoupc/OASIS_matlab-master | SDPvalBounds.m | .m | OASIS_matlab-master/packages/cvx/sdpt3/Solver/SDPvalBounds.m | 1,843 | utf_8 | fa3af856805cc15685c38e69218a8ffb | %%*****************************************************************
%% compute lower and upper bounds for the exact primal
%% optimal value.
%%
%% LB <= true optimal dual value = true optimal primal value <= UB.
%%
%%*****************************************************************
function [LB,UB] = SDPvalBo... |
github | zhoupc/OASIS_matlab-master | NTscaling.m | .m | OASIS_matlab-master/packages/cvx/sdpt3/Solver/NTscaling.m | 1,847 | utf_8 | 82a266e8bf9cf33993f0bff10650c15c | %%**********************************************************************
%% NTscaling: Compute NT scaling matrix
%%
%% compute SVD of Xchol*Zchol via eigenvalue decompostion of
%% Zchol * X * Zchol' = V * diag(sv2) * V'.
%% compute W satisfying W*Z*W = X.
%% W = G'*G, where G = diag(sqrt(sv)) * (invZchol*V)'
%... |
github | zhoupc/OASIS_matlab-master | linsysolvefun.m | .m | OASIS_matlab-master/packages/cvx/sdpt3/Solver/linsysolvefun.m | 1,276 | utf_8 | 7ca4a2896ad33a210a95d53138f0676f | %%*************************************************************************
%% linsysolvefun: Solve H*x = b
%%
%% x = linsysolvefun(L,b)
%% where L contains the triangular factors of H.
%%
%% SDPT3: version 3.1
%% Copyright (c) 1997 by
%% K.C. Toh, M.J. Todd, R.H. Tutuncu
%% Last Modified: 16 Sep 2004
%%***************... |
github | zhoupc/OASIS_matlab-master | sqlpdemo.m | .m | OASIS_matlab-master/packages/cvx/sdpt3/Solver/sqlpdemo.m | 6,011 | utf_8 | 793deabad8688259781993ce346cea24 | %%*****************************************************************
%% Examples of SQLP.
%%
%% this is an illustration on how to use our SQLP solvers
%% coded in sqlp.m
%%
%% feas = 1 if want feasible initial iterate
%% = 0 otherwise
%%
%% SDPT3: version 3.1
%% Copyright (c) 1997 by
%% K.C. Toh, M.J. Todd, R.H. Tu... |
github | zhoupc/OASIS_matlab-master | gpcomp.m | .m | OASIS_matlab-master/packages/cvx/sdpt3/Solver/gpcomp.m | 5,268 | utf_8 | 0e3f81e97b731bf8646b4ffd7e894f03 | %%*********************************************************************
%% gpcomp: Compute tp=1/gp in Proposition 2 of the paper:
%%
%% R.M. Freund, F. Ordonez, and K.C. Toh,
%% Behavioral measures and their correlation with IPM iteration counts
%% on semi-definite programming problems,
%% Mathematical Programmin... |
github | zhoupc/OASIS_matlab-master | sqlparameters.m | .m | OASIS_matlab-master/packages/cvx/sdpt3/Solver/sqlparameters.m | 5,137 | utf_8 | 76bbd09e284250f7770836baabcc95e5 | %%*************************************************************************
%% parameters.m: set OPTIONS structure to specify default
%% parameters for sqlp.m
%%
%% OPTIONS.vers : version of direction to use.
%% 1 for HKM direction
%% 2 for NT direction
%... |
github | zhoupc/OASIS_matlab-master | convertcmpsdp.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | sqlpsummary.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | checkdepconstr.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | convertRcone.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | qops.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | HKMdirfun.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | symqmr.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | validate_startpoint.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | Atyfun.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | blkcholfun.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | smat.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | sqlpcheckconvg.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | SDPT3soln_SEDUMIsoln.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | detect_ublk.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | combine_blk.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | Prod2.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | NTdirfun.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | make.m | .m | OASIS_matlab-master/packages/cvx/examples/make.m | 23,756 | utf_8 | c82aef30a6a97533a232e958096b146f | 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 = ... |
github | zhoupc/OASIS_matlab-master | cantilever_beam_plot.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | simple_step.m | .m | OASIS_matlab-master/packages/cvx/examples/circuit_design/simple_step.m | 248 | utf_8 | ce47b4b6778bdb78f1098a2f2dc06205 | % 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 | zhoupc/OASIS_matlab-master | spectral_fact.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | polar_plot_ant.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | spectral_fact.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | plotgraph.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | disp.m | .m | OASIS_matlab-master/packages/cvx/lib/@cvxprob/disp.m | 5,405 | utf_8 | c8f4506efcff564b81f1f3cc1dbb8a9c | 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 | zhoupc/OASIS_matlab-master | apply.m | .m | OASIS_matlab-master/packages/cvx/lib/@cvxtuple/apply.m | 505 | utf_8 | f59f25021974462a358e5189ea5415e8 | 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 | zhoupc/OASIS_matlab-master | cvx_setdual.m | .m | OASIS_matlab-master/packages/cvx/lib/@cvxtuple/cvx_setdual.m | 954 | utf_8 | b6deb370985cc299023b091bbba5dfd6 | 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 | zhoupc/OASIS_matlab-master | testall.m | .m | OASIS_matlab-master/packages/cvx/lib/@cvxtuple/testall.m | 452 | utf_8 | be9d0553e0e560f2c73fdb02a37b08b6 | 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-2016 CVX Researc... |
github | zhoupc/OASIS_matlab-master | disp.m | .m | OASIS_matlab-master/packages/cvx/lib/@cvxtuple/disp.m | 1,366 | utf_8 | ed9c53cbe23c1f5ab4440b5d9a10cbfd | 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 | zhoupc/OASIS_matlab-master | sparsify.m | .m | OASIS_matlab-master/packages/cvx/lib/@cvx/sparsify.m | 4,175 | utf_8 | e9aa36c05b7361d3fa57c279820ce018 | function x = sparsify( x, mode )
global cvx___
narginchk(2,2);
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.b... |
github | zhoupc/OASIS_matlab-master | prelp.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | feasreal.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | sdpa2vec.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | blk2vec.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | writesdp.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | frompack.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | feascpx.m | .m | OASIS_matlab-master/packages/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 | zhoupc/OASIS_matlab-master | cvx_glpk.m | .m | OASIS_matlab-master/packages/cvx/shims/cvx_glpk.m | 4,344 | utf_8 | fc695a24b6757c72ebcc0c9422e98dca | 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 | zhoupc/OASIS_matlab-master | cvx_sedumi.m | .m | OASIS_matlab-master/packages/cvx/shims/cvx_sedumi.m | 10,740 | utf_8 | 42324556d877c6a43224d410f1a12290 | 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 | zhoupc/OASIS_matlab-master | cvx_sdpt3.m | .m | OASIS_matlab-master/packages/cvx/shims/cvx_sdpt3.m | 12,657 | utf_8 | b42871a1a82cd274121bc52919caa778 | 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 | zhoupc/OASIS_matlab-master | foopsi_kernel.m | .m | OASIS_matlab-master/examples/foopsi_kernel.m | 5,080 | utf_8 | 357b489226243ef943010317cb587a2c | function [c, s, b, g, active_set] = foopsi_oasisAR1(y, g, lam, optimize_b,...
optimize_g, decimate, maxIter)
%% Infer the most likely discretized spike train underlying an AR(1) fluorescence trace
% Solves the sparse non-negative deconvolution problem
% min 1/2|c-y|^2 + lam |s|_1 subject to s_t = c_t-g c_{t-1} >= ... |
github | zhoupc/OASIS_matlab-master | fig2_demo_deconvolveAR1.m | .m | OASIS_matlab-master/examples/Paper/scripts/fig2_demo_deconvolveAR1.m | 6,136 | utf_8 | d645403e7adf9cac783900e479c967f8 | function c = fig2_demo_deconvolveAR1(y, g, lam, video, trueSpikes)
%% extract neural activity from a fluorescence trace using an active set
% method for sparse nonnegative deconvolution
%% inputs:
% y: T*1 vector, raw fluorescence trace
% g: scalar, AR(1) coefficient
% lam: scalar, tuning parameter for sparsi... |
github | bstemper/db-summer-challenge-2016-master | cell2csv.m | .m | db-summer-challenge-2016-master/cell2csv/cell2csv.m | 2,830 | utf_8 | 69d845851d9c9930b9f2d94e219bf8a0 | function cell2csv(fileName, cellArray, separator, excelYear, decimal)
% % Writes cell array content into a *.csv file.
% %
% % CELL2CSV(fileName, cellArray[, separator, excelYear, decimal])
% %
% % fileName = Name of the file to save. [ e.g. 'text.csv' ]
% % cellArray = Name of the Cell Array where the data is ... |
github | aliakbarpa/Correlation_Power_Analysis-master | Key_GUI.m | .m | Correlation_Power_Analysis-master/Key/Key_GUI.m | 26,502 | utf_8 | 80df0734edaa84c6b734a80143defe03 | function varargout = Key_GUI(varargin)
% KEY_GUI MATLAB code for Key_GUI.fig
% KEY_GUI, by itself, creates a new KEY_GUI or raises the existing
% singleton*.
%
% H = KEY_GUI returns the handle to a new KEY_GUI or the handle to
% the existing singleton*.
%
% KEY_GUI('CALLBACK',hObject,eventData,... |
github | ssketch/motorControl-master | estimate.m | .m | motorControl-master/MPC/estimate.m | 2,597 | utf_8 | 2f66dc2fb7226077fa00ed95fe1c5277 | % This function uses a model of the arm, a copy of the command sent to the
% actual arm, and sensory feedback to update an estimate of the arm's
% state, as well as this estimate's uncertainty. The estimation is
% performed with an unscented Kalman filter, using the fully nonlinear
% dynamics with state augmented to ac... |
github | ssketch/motorControl-master | actuate.m | .m | motorControl-master/MPC/actuate.m | 2,923 | utf_8 | 2605b20019d4486e3f42a4449ec5ecfe | % This function solves the nonlinear equations of motion for an arm (over
% a single time step) using MATLAB's variable-step-size numerical
% integrator 'ode45'.
%
% ___________ _____________________________
% | | u* | | x
% | Control |___________... |
github | ssketch/motorControl-master | control.m | .m | motorControl-master/MPC/control.m | 3,315 | utf_8 | e438c3e9f1b2a5a0c267ef83d9689e46 | % This function computes the MPC control output for a model of the arm
% tracking a reference state in joint, task (Cartesian), or force space. It
% employs the Multi-Parametric Toolbox MPT3. The MPT model is created by
% first linearizing the arm model (both dynamics and output) about its
% current state estimate... |
github | ssketch/motorControl-master | tsErr2jsErr.m | .m | motorControl-master/MPC/resources/proprioception/tsErr2jsErr.m | 456 | utf_8 | bb59b336feafd23daf036cfba51b0d7d | % This function translates a task-space error data into joint space values
% using RR inverse kinematics.
function [Th_targ,dTh_bias,dTh_nois] = tsErr2jsErr(X_targ,X_cent,X_maj,L1,L2)
% convert task-space error data into joint space
Th_targ = inv_kin(X_targ,L1,L2);
Th_cent = inv_kin(X_cent,L1,L2);
Th_maj = inv_kin(X_m... |
github | ssketch/motorControl-master | inv_kin.m | .m | motorControl-master/MPC/resources/proprioception/inv_kin.m | 508 | utf_8 | 9d1c0ecb1bd7942db8ae38e32639baa8 | % This function assumes that the shoulder is at (0,0) in Cartesian space.
function th = inv_kin(p,L1,L2)
x = p(1);
y = p(2);
c2 = (x^2 + y^2 - L1^2 - L2^2)/(2*L1*L2);
if c2 > 1
c2 = 1; % to avoid imaginary number error below (NOTE: "unreachable" signal should be ON)
end
s2 = sqrt(1 - c2^2);
% choose between two ... |
github | ssketch/motorControl-master | fwdKin.m | .m | motorControl-master/MPC/@arm_2DOF/fwdKin.m | 1,735 | utf_8 | b4882369579c20f90fe1034431c44440 | % This function translates a given arm state from joint space to Cartesian
% space, taking joint limits (i.e., can that state be reached?) and
% handedness into account. It also outputs elbow position for plotting. If
% no state is specified as input, the function performs forward kinematics
% on the current state of t... |
github | ssketch/motorControl-master | draw.m | .m | motorControl-master/MPC/@arm_2DOF/draw.m | 1,204 | utf_8 | 32d4c5ad92d31d6231545e927f704abf | % This function draws the arm in state x, outputting a frame. If no state
% is specified as input, the function draws the current state of the '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 forward kinematics to guarantee correspo... |
github | ssketch/motorControl-master | invKin.m | .m | motorControl-master/MPC/@arm_2DOF/invKin.m | 1,887 | utf_8 | df7dc61dff6974d132288da756aa4b02 | % This function translates a given arm state from Cartesian 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). It also outputs elbow
% position for plotting. If no... |
github | ssketch/motorControl-master | jacobian.m | .m | motorControl-master/MPC/@arm_2DOF/jacobian.m | 794 | utf_8 | 8fa7666b0c00f3d4c901b08be73e3e17 | % 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 arm state
if nargin < 2
x = arm.... |
github | ssketch/motorControl-master | jacobianDeriv.m | .m | motorControl-master/MPC/@arm_2DOF/jacobianDeriv.m | 1,002 | utf_8 | a8942f4e1dab30f786b22f2eb505aab6 | % 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 arm s... |
github | ssketch/motorControl-master | dynamics.m | .m | motorControl-master/MPC/@arm_2DOF/dynamics.m | 1,813 | utf_8 | d294150679f3b42c46d5448a60e9d97c | % This function returns the (joint-space) equation of motion for the arm in
% state x, given input u. If no state is specified as input, the function
% computes the equation for the current state of the 'arm' object. The
% function also saves the reflexive torques to the input arm object.
% NOTE: Although the arm's cur... |
github | ssketch/motorControl-master | withinLimits.m | .m | motorControl-master/MPC/@arm_2DOF/withinLimits.m | 674 | utf_8 | 0564d52b35cdeaf022e4c44d623f22de | % This function checks that a given arm state, in joint space, does not
% violate joint limits. If no state is specified as input, the function
% checks the current state of the 'arm' object.
function flag = withinLimits(arm, x)
% if no state specified, use current arm state
if nargin < 2
x = arm.x.val;
end
% che... |
github | ssketch/motorControl-master | defineSpasticity.m | .m | motorControl-master/MPC/include/defineSpasticity.m | 1,038 | utf_8 | 05006412afd9b00b3a8e9f1b2f2cb963 | % This function takes a subject's score on the Modified Ashworth scale and
% outputs arm parameters related to tone and spasticity (gamma = static
% reflex threshold, mu = slope of line defining dynamic reflex threshold, k
% = reflex stiffness, b = reflex damping).
function [gamma, mu, k, b] = defineSpasticity(MAS, dat... |
github | ssketch/motorControl-master | ukf.m | .m | motorControl-master/MPC/include/ukf.m | 2,778 | utf_8 | 370f1cbe1b16207aecd96c9d00475056 | % This function uses sensory feedback in concert with the nonlinear arm
% model to estimate the arm's state, as well as this estimate's
% uncertainty. The unscented Kalman filter algorithm is based on Julier,
% S.J. and Uhlmann, J.K., Unscented Filtering and Nonlinear Estimation,
% Proceedings of the IEEE, Vol. 92,... |
github | ssketch/motorControl-master | linearize.m | .m | motorControl-master/MPC/include/linearize.m | 3,012 | utf_8 | 03ab6e9a4ec326d065d46a97de371958 | % This function linearizes the dynamics and output equation for an arm
% model. It computes the 1st-order Taylor series approximation of
% dynamics dx/dt = f(x,u) and output (e.g., forward kinematics) y = g(x,u)
% about the current state estimate and most recent control. The dynamics
% will take the (affine) form dx/dt... |
github | ssketch/motorControl-master | fitData.m | .m | motorControl-master/MPC/include/fitData.m | 205 | utf_8 | 5be0b171bd36af15b6052d562717106f | % This function fits a least-squares line to X-Y data, outputting the slope
% and intercept of the fit.
function [slope, intercept] = fitData(X, Y)
P = polyfit(X,Y,1);
slope = P(1);
intercept = P(2);
end |
github | ssketch/motorControl-master | plotResults.m | .m | motorControl-master/MPC/include/plotResults.m | 3,097 | utf_8 | d75f45c19f28eeff5611d04603715294 | % This function displays the results of simulation. It creates a movie of
% the arm movement, plots position/velocity in joint/Cartesian space, and
% plots joint torques over time. The 'planar' parameter views 3D
% Cartesian plots in the top-down 2D plane. All figures are saved in EPS
% format.
function plotResults(arm... |
github | ssketch/motorControl-master | discretize.m | .m | motorControl-master/MPC/include/discretize.m | 595 | utf_8 | 32d9d3dcc8f47f06f019826d6107ab3b | % This function discretizes a linear (or affine) dynamical system using a
% zero-order hold approximation. The derivation for an affine system is as
% follows:
%
% dx/dt = Ax + Bu + c
% (x+ - x)/Ts = Ax + Bu + c
% x+ = (Ax + Bu + c)*Ts + x
% x+ = (A*Ts+I)x + (B*Ts)u + (c*Ts)
% x+ = Ad*x + Bd*u + cd
%
% The fi... |
github | ssketch/motorControl-master | computeReflex.m | .m | motorControl-master/MPC/include/computeReflex.m | 1,090 | utf_8 | ec8cd3326ee89aea502afabcae38d577 | % Given an arm state in joint space, this function checks which joints are
% in the "reflex zone" and, if necessary, computes reflex torques. 'R' is a
% selector matrix, able to extract the appropriate reflex parameters for
% each joint (e.g., the gamma for flexion if the joint is in flexion). If
% no state is specifie... |
github | ssketch/motorControl-master | computeBias.m | .m | motorControl-master/MPC/include/computeBias.m | 241 | utf_8 | b6a845b77f9402328719265b6710e4cb | % This function computes bias in joint angle for the current arm state,
% assuming that bias varies linearly with joint angle.
function bias = computeBias(arm)
m = arm.sensBias.slope;
b = arm.sensBias.inter;
bias = m .* arm.q.val + b;
end |
github | ssketch/motorControl-master | defineBiasFunc.m | .m | motorControl-master/MPC/include/defineBiasFunc.m | 386 | utf_8 | af19eba57d94ba92638d61bf0d31d1fd | % This function takes joint-wise bias data (joint angle vs. bias at that
% angle) and outputs the affine function fit (slope and intercept) for each
% joint.
function func = defineBiasFunc(data)
nJoints = size(data,3);
func.slope = zeros(nJoints,1);
func.inter = zeros(nJoints,1);
for i = 1:size(data,3)
[func.slop... |
github | ssketch/motorControl-master | pdftops.m | .m | motorControl-master/MPC/include/export_fig/pdftops.m | 3,687 | utf_8 | 43c139e49fce63cb78060895bd13137a | 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 futur... |
github | ssketch/motorControl-master | crop_borders.m | .m | motorControl-master/MPC/include/export_fig/crop_borders.m | 3,791 | utf_8 | 2c8fc83f142f1d5b28b99080556c791e | function [A, vA, vB, bb_rel] = crop_borders(A, bcol, padding)
%CROP_BORDERS Crop the borders of an image or stack of images
%
% [B, vA, vB, bb_rel] = crop_borders(A, bcol, [padding])
%
%IN:
% A - HxWxCxN stack of images.
% bcol - Cx1 background colour vector.
% padding - scalar indicating how much paddi... |
github | ssketch/motorControl-master | isolate_axes.m | .m | motorControl-master/MPC/include/export_fig/isolate_axes.m | 4,851 | utf_8 | 611d9727e84ad6ba76dcb3543434d0ce | function fh = isolate_axes(ah, vis)
%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 o... |
github | ssketch/motorControl-master | im2gif.m | .m | motorControl-master/MPC/include/export_fig/im2gif.m | 6,234 | utf_8 | 8ee74d7d94e524410788276aa41dd5f1 | %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 c... |
github | ssketch/motorControl-master | read_write_entire_textfile.m | .m | motorControl-master/MPC/include/export_fig/read_write_entire_textfile.m | 961 | utf_8 | 775aa1f538c76516c7fb406a4f129320 | %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:
% fn... |
github | ssketch/motorControl-master | pdf2eps.m | .m | motorControl-master/MPC/include/export_fig/pdf2eps.m | 1,522 | utf_8 | 4c8f0603619234278ed413670d24bdb6 | %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.c... |
github | ssketch/motorControl-master | print2array.m | .m | motorControl-master/MPC/include/export_fig/print2array.m | 9,613 | utf_8 | e398a6296734121e6e1983a45298549a | function [A, bcol] = print2array(fig, res, renderer, gs_options)
%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 = print2array(figur... |
github | ssketch/motorControl-master | append_pdfs.m | .m | motorControl-master/MPC/include/export_fig/append_pdfs.m | 2,759 | utf_8 | 9b52be41aff48bea6f27992396900640 | %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 o... |
github | ssketch/motorControl-master | using_hg2.m | .m | motorControl-master/MPC/include/export_fig/using_hg2.m | 1,037 | utf_8 | 3303caab5694b040103ccb6b689387bf | %USING_HG2 Determine if the HG2 graphics engine is used
%
% tf = using_hg2(fig)
%
%IN:
% fig - handle to the figure in question.
%
%OUT:
% tf - boolean indicating whether the HG2 graphics engine is being used
% (true) or not (false).
% 19/06/2015 - Suppress warning in R2015b; cache result for i... |
github | ssketch/motorControl-master | eps2pdf.m | .m | motorControl-master/MPC/include/export_fig/eps2pdf.m | 8,543 | utf_8 | a63a364925b89dac21030d36b0dd29a3 | function eps2pdf(source, dest, crop, append, gray, quality, gs_options)
%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, de... |
github | ssketch/motorControl-master | ghostscript.m | .m | motorControl-master/MPC/include/export_fig/ghostscript.m | 7,902 | utf_8 | ff62a40d651197dbea5d3c39998b3bad | function varargout = ghostscript(cmd)
%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... |
github | ssketch/motorControl-master | fix_lines.m | .m | motorControl-master/MPC/include/export_fig/fix_lines.m | 6,441 | utf_8 | ffda929ebad8144b1e72d528fa5d9460 | %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
% scre... |
github | ssketch/motorControl-master | tbxmanager.m | .m | motorControl-master/MPC/include/tbxmanager/tbxmanager.m | 38,000 | utf_8 | bea2788ccd06251df7fbf4f33ea436e2 | function cmdout = tbxmanager(command, varargin)
% Toolbox manager
%
% Supported commands:
% tbxmanager install package1 package2 ...
% tbxmanager show enabled
% tbxmanager show installed
% tbxmanager show available
% tbxmanager show sources
% tbxmanager update
% tbxmanager update package1 package2 ...
% ... |
github | ssketch/motorControl-master | mpt_nlrs.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/mpt/3.1.2/all/mpt3-3_1_2/mpt/utils/mpt_nlrs.m | 13,102 | utf_8 | a85f4352bb2fe4b650455167b5ae90b4 | function [V,R,H,K] = mpt_nlrs(method,VP,Options)
%MPT_LRS Matlab implementation of the LRS algorithm
%
% [V,R] = mpt_nlrs(method, VP, Options)
%
% ---------------------------------------------------------------------------
% DESCRIPTION
% ---------------------------------------------------------------------------
% enu... |
github | ssketch/motorControl-master | contains.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/mpt/3.1.2/all/mpt3-3_1_2/mpt/modules/geometry/sets/@Polyhedron/contains.m | 11,370 | utf_8 | 495351bb999a8d6f5fb5aa271031ef62 | function tf = contains(P, x, fastbreak)
%
% CONTAINS: Test if a polyhedron/point is contained inside polyhedron.
% =====================================================================
%
%
% SYNTAX
% ------
%
% tf = P.contains(S)
% tf = P.contains(S, fastbreak)
% tf = contains(P, S, fastbre... |
github | ssketch/motorControl-master | mldivide.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/mpt/3.1.2/all/mpt3-3_1_2/mpt/modules/geometry/sets/@Polyhedron/mldivide.m | 8,785 | utf_8 | c417d86c8864a4be90c624d7565cc988 | function res = mldivide(P,Pn,noconstruction)
%
% MLDIVIDE: Set difference between polyhedra
% ===========================================
%
%
% SYNTAX
% ------
%
% R = P \ Q
% R = mldivide(P,Q)
%
%
% DESCRIPTION
% -----------
% Function computes the set difference between polyhedron ... |
github | ssketch/motorControl-master | toMatlab.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/mpt/3.1.2/all/mpt3-3_1_2/mpt/modules/geometry/unions/@BinTreePolyUnion/toMatlab.m | 5,397 | utf_8 | a10d583ff07a8cbe2df4067763a96aa6 | function toMatlab(obj, filename, function_to_export, varargin)
% Generates pure Matlab code for evaluation of a particular function
%
% Syntax:
% ---
%
% obj.toMatlab(filename, function)
%
% Inputs:
% ---
%
% obj: single BinTreePolyUnion object
% filename: name of exported file (the '.m' extension will be adde... |
github | ssketch/motorControl-master | toPython.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/mpt/3.1.2/all/mpt3-3_1_2/mpt/modules/geometry/unions/@PolyUnion/toPython.m | 9,058 | utf_8 | 575694d3e05e728e36febb59f5f24da5 | function toPython(obj, filename, function_to_export, tiebreak)
% Generates Python code for evaluation of a particular function
%
% Syntax:
% ---
%
% obj.toPython(filename, function, tiebreak)
%
% Inputs:
% ---
%
% obj: single PolyUnion or an array thereof
% filename: name of exported file (the '.m' extension w... |
github | ssketch/motorControl-master | toC.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/mpt/3.1.2/all/mpt3-3_1_2/mpt/modules/geometry/unions/@PolyUnion/toC.m | 27,453 | utf_8 | f0f4d8a36bc1d64b404c9e2155c386eb | function toC(obj, function_name, file_name, tie_break_fcn)
%
% TOC: Export of PWA/PWQ function to C-code
% ==========================================
%
%
% SYNTAX
% ------
%
% controller.toC('function')
% controller.toC('function','filename')
% controller.toC('function','filename','tie_brea... |
github | ssketch/motorControl-master | locatePoint.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/mpt/3.1.2/all/mpt3-3_1_2/mpt/modules/geometry/unions/@PolyUnion/locatePoint.m | 7,974 | utf_8 | 5b90e563f20e5752ba5e79c89beeaeab | function [index, details] = locatePoint(U,x)
%
% LOCATEPOINT: Implementation of a graph search algorithm for a point location
% ============================================================================
% problem.
% =========
%
%
% SYNTAX
% ------
%
% [index, details] = locatePoint(U,x)
%
% ... |
github | ssketch/motorControl-master | toMatlab.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/mpt/3.1.2/all/mpt3-3_1_2/mpt/modules/geometry/unions/@PolyUnion/toMatlab.m | 8,376 | utf_8 | d465e9840156788caa49996461732886 | function toMatlab(obj, filename, function_to_export, tiebreak)
% Generates pure Matlab code for evaluation of a particular function
%
% Syntax:
% ---
%
% obj.toMatlab(filename, function, tiebreak)
%
% Inputs:
% ---
%
% obj: single PolyUnion or an array thereof
% filename: name of exported file (the '.m' extens... |
github | ssketch/motorControl-master | merge.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/mpt/3.1.2/all/mpt3-3_1_2/mpt/modules/geometry/unions/@PolyUnion/merge.m | 10,223 | utf_8 | 0daa63c7047c8815aed5031cdee55b5f | function U = merge(obj, function_name, optimal, optimal_merging)
%
% MERGE: Greedy merging of polyhedra
% ===================================
%
%
% SYNTAX
% ------
%
% U.merge
% merge(U)
%
%
% DESCRIPTION
% -----------
% Simplifies the union of polyhedra by merging the neighboring po... |
github | ssketch/motorControl-master | isConnected.m | .m | motorControl-master/MPC/include/tbxmanager/toolboxes/mpt/3.1.2/all/mpt3-3_1_2/mpt/modules/geometry/unions/@PolyUnion/isConnected.m | 5,147 | utf_8 | 4e04c800cfc0ea4ae898b68fae4b79c6 | function ts = isConnected(obj)
%
% ISCONNECTED: Test if the union of polyhedra form a connected union.
% ====================================================================
%
%
% SYNTAX
% ------
%
% ts = U.isConnected
% ts = isConnected(U)
%
%
% DESCRIPTION
% -----------
% Return tr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.