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 | AlonLabWIS/ParTI-master | extractA.m | .m | ParTI-master/SeDuMi_1_3/extractA.m | 2,236 | utf_8 | 931300071e3c261cefec875eb0a86600 | % Apart = extractA(At,Ajc,blk0,blk1,blkstart[,blkstart2])
% EXTRACTA Fast alternative to
% Apart = At(blkstart(1):blkstart(2)-1,:).
% Instead of blkstart(2), it takes "blkstart2" (if supplied) or
% size(At,1)+1 (if neither blkstart(2) nor blkstart2) are available.
%
% Extract submatrix of
% A ... |
github | AlonLabWIS/ParTI-master | veccomplex.m | .m | ParTI-master/SeDuMi_1_3/veccomplex.m | 3,079 | utf_8 | ba07f0641a238be5b9726d1798d6b8ae | % z = veccomplex(x,cpx,K)
% ********** INTERNAL FUNCTION OF SEDUMI **********
function z = veccomplex(x,cpx,K)
%
% 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) 2001 Jos F. Sturm (up to 1.05R5)
%... |
github | AlonLabWIS/ParTI-master | vec.m | .m | ParTI-master/SeDuMi_1_3/vec.m | 1,606 | utf_8 | 5478f392e563f694b197e427626d7462 | % Y = VEC(x) Given an m x n matrix x, this produces the vector Y of length
% m*n that contains the columns of the matrix x, stacked below each other.
%
% See also mat.
function x = vec(X)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Copyright (C) 2005 McMaster University, Hami... |
github | AlonLabWIS/ParTI-master | sdinit.m | .m | ParTI-master/SeDuMi_1_3/sdinit.m | 4,613 | utf_8 | c23c6956e3a8fe19e16dfdd700b278eb | % [d, v,vfrm,y,y0, R] = sdinit(At,b,c,dense,K,pars)
% SDINIT Initialize with identity solution, for self-dual model.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function [d, v,vfrm,y,y0, R] = sdinit(At,b,c,dense,K,pars)
%
% This file is part of SeD... |
github | AlonLabWIS/ParTI-master | psdscale.m | .m | ParTI-master/SeDuMi_1_3/psdscale.m | 6,304 | utf_8 | 3cf74e984e9d00ce8d8ed7aff240230d | % y = psdscale(ud,x,K [,transp])
% PSDSCALE Computes length lenud (=sum(K.s.^2)) vector y.
% !transp (default) then y[k] = vec(Ldk' * Xk * Ldk)
% transp == 1 then y[k] = vec(Udk' * Xk * Udk)
% Uses pivot ordering ud.perm if available and nonempty.
%
% ********** I... |
github | AlonLabWIS/ParTI-master | checkpars.m | .m | ParTI-master/SeDuMi_1_3/checkpars.m | 6,176 | utf_8 | 971e0b44a6edc0150d639e30dc50a98f | % pars = checkpars(pars,lponly)
% CHECKPARS Fills in defaults for missing fields in "pars" structure.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function pars = checkpars(pars,lponly)
%
% This file is part of SeDuMi 1.1 by Imre Polik ... |
github | AlonLabWIS/ParTI-master | optstep.m | .m | ParTI-master/SeDuMi_1_3/optstep.m | 6,443 | utf_8 | 21b6cc713b5ef56473e77a8612c28512 | % [x,y] = optstep(A,b,c, y0,y,d,v,dxmdz, K,L,symLden,...
% dense,Ablkjc,Aord,ADA,DAt, feasratio, R,pars)
% OPTSTEP Implements Mehrotra-Ye type optimality projection for
% IPM-LP solver.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function [x,y... |
github | AlonLabWIS/ParTI-master | pretransfo.m | .m | ParTI-master/SeDuMi_1_3/pretransfo.m | 12,688 | utf_8 | 881fbde15f9b3cf52ac3365f952ef57d | % [At,b,c,K,prep] = pretransfo(At,b,c,K)
% PRETRANSFO Checks data and then transforms into internal SeDuMi format.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function [At,b,c,K,prep,origcoeff] = pretransfo(At,b,c,K,pars)
% This file is par... |
github | AlonLabWIS/ParTI-master | deninfac.m | .m | ParTI-master/SeDuMi_1_3/deninfac.m | 4,011 | utf_8 | ef6c9ab0007f59ec3cc9de9b7eb0650e | % [Lden, Ld] = deninfac(symLden, L,dense,DAt, d, absd, qblkstart,pars)
% DENINFAC
% Uses pars.maxuden as max. allowable |L(i,k)|. Otherwise num. reordering.
%
% ******************** INTERNAL FUNCTION OF SEDUMI ********************
%
% See also sedumi
function [Lden, Ld] = deninfac(symLden, L,dense,D... |
github | AlonLabWIS/ParTI-master | eigK.m | .m | ParTI-master/SeDuMi_1_3/eigK.m | 4,483 | utf_8 | f86d12675232384fa726b4e514ad8514 | % [lab,q,f] = eigK(x,K)
%
% EIGK Computes the spectral values ("eigenvalues") or even the complete
% spectral decomposition of a vector x with respect to a self-dual
% homogeneous cone K.
%
% > LAB = EIGK(x,K) This yield the spectral values of x wi... |
github | AlonLabWIS/ParTI-master | wrapPcg.m | .m | ParTI-master/SeDuMi_1_3/wrapPcg.m | 4,793 | utf_8 | 12cfcfe6ab49a7c989c04b51258c4c84 | % [y,r,k, DAy] = normeqPcg(L,Lden,At,dense,d, DAt,K, b, cgpars, y0,rhs)
%
% WRAPPCG Solve y from AP(d)A' * y = b
% using PCG-method and Cholesky L as conditioner.
% If L is sufficiently accurate, then only 1 CG-step is needed.
% In general, proceeds until ||DAy - DA'(AD^2A')^{-1}b||
% has converged (to zero).... |
github | AlonLabWIS/ParTI-master | tdet.m | .m | ParTI-master/SeDuMi_1_3/tdet.m | 1,737 | utf_8 | c2287c26212e36d77c3c07278bbe72c1 | % tdetx = tdet(x,K)
% TDET Computes twice determinant for Lorentz block
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function tdetx = tdet(x,K)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Copyright (C) 2005... |
github | AlonLabWIS/ParTI-master | ordmmdmex.m | .m | ParTI-master/SeDuMi_1_3/ordmmdmex.m | 1,303 | utf_8 | 278c6d7ec0838f828ff3a5a213d3894f | % perm = ordmmdmex(adjncy)
% Computes multiple-minimum-degree permutation, for sparse
% Cholesky. Adjncy is a sparse symmetric matrix; its diagonal
% is irrelevant.
%
% Invokes SPARSPAK-A Release III.
%
% ********** INTERNAL FUNCTION OF CHOLTOOL **********
function perm = ordmmdmex(adjncy)
%
% ... |
github | AlonLabWIS/ParTI-master | quadadd.m | .m | ParTI-master/SeDuMi_1_3/quadadd.m | 1,863 | utf_8 | 7e4b4c6944a4b6b3afac416b8f6b4b46 | % [zhi,zlo] = quadadd(xhi,xlo,y)
% QUADADD Compute (zhi+zlo) = (xhi+xlo) + y.
% x an z are in double-double format (quad precision)
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function [zhi,zlo] = quadadd(xhi,xlo,y)
%
% This file is part... |
github | AlonLabWIS/ParTI-master | vectril.m | .m | ParTI-master/SeDuMi_1_3/vectril.m | 1,805 | utf_8 | bc3bc920887126a83dc9c3a369bb1f0c | % y = vectril(x,K)
% VECTRIL converts "PSD" blocks to lower triangular form.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function y = vectril(x,K)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Copy... |
github | AlonLabWIS/ParTI-master | partitA.m | .m | ParTI-master/SeDuMi_1_3/partitA.m | 1,862 | utf_8 | 6e9917c47220d7d6d6b9dcafe9064061 | % Ablkjc = partitA(At,blkstart)
% PARTITA Partition columns of A according to the subscripts listed in blkstart.
%
% ******************** INTERNAL FUNCTION OF SEDUMI ********************
%
% See also sedumi
function Ablkjc = partitA(At,blkstart)
%
% This file is part ... |
github | AlonLabWIS/ParTI-master | psdinvjmul.m | .m | ParTI-master/SeDuMi_1_3/psdinvjmul.m | 1,828 | utf_8 | 6bf22ae1d0d7d4c2d248639e79ffa700 | % z = psdinvjmul(xlab,xfrm, y, K)
% PSDINVJMUL solves x jmul z = y, with x = XFRM*diag(xlab)*XFRM'
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function z = psdinvjmul(xlab,xfrm, y, K)
%
% This file is part of SeDuMi 1.1 by Imre Polik and... |
github | AlonLabWIS/ParTI-master | getDAt.m | .m | ParTI-master/SeDuMi_1_3/getDAt.m | 2,090 | utf_8 | c93d1c5b0d98bbdd2581fc2766541947 | % [DAtq, DAts] = getDAt(At,Ablk,colsel, d,ud,K)
%
%Creates
% DAt.s full nnz x 1 vector, containing nonzeroblocks(T) with T a
% sparse N x length(colsel) matrix, with Ablk.s(:,colsel) block struct.
% NOTE: only triu(.) stored per block, with redundant 0's in tril.
% So triu(Ud*Aik*Ud') in nonzero bloc... |
github | AlonLabWIS/ParTI-master | bwdpr1.m | .m | ParTI-master/SeDuMi_1_3/bwdpr1.m | 1,877 | utf_8 | cb69691e8826f9a16bde0d47405b98f7 | % y = bwdpr1(Lden, b)
% BWDPR1 Solves "PROD_k L(pk,betak)' * y = b", where
% L(p,beta) = eye(n) + tril(p*beta',-1).
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi, dpr1fact, fwdpr1
function y = bwdpr1(Lden, b)
%
% Thi... |
github | AlonLabWIS/ParTI-master | frameit.m | .m | ParTI-master/SeDuMi_1_3/frameit.m | 1,638 | utf_8 | ff75edc1c04664ac0c62b57b1eb1661e | % x = frameit(lab,frmq,frms,K)
% FRAMEIT
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function x = frameit(lab,frmq,frms,K)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Copyright (C) 2005 McMaster Univer... |
github | AlonLabWIS/ParTI-master | getada1.m | .m | ParTI-master/SeDuMi_1_3/getada1.m | 2,396 | utf_8 | 206486ca5437a093fb9a1fdd855ff1f2 | % ADA = getada1(ADA, A,Ajc2,perm, d, blkstart)
% GETADA1 Compute ADA(i,j) = (D(d^2; LP,Lorentz)*A.t(:,i))' *A.t(:,j),
% and exploit sparsity as much as possible.
% Ajc2 points just beyond LP/Lorentz nonzeros for each column
% blkstart = K.qblkstart partitions into Lorentz bloc... |
github | AlonLabWIS/ParTI-master | sddir.m | .m | ParTI-master/SeDuMi_1_3/sddir.m | 3,345 | utf_8 | 00ebfa573895fcf59bc790b35a0eb489 | % [dx,dy,dz,dy0, err] = sddir(L,Lden,Lsd,p,...
% d,v,vfrm,At,DAt,dense, R,K,y,y0,b, pars)
% SDDIR Direction decomposition for Ye-Todd-Mizuno self-dual embedding.
% Here, p is the direction p = dx+dz. If p=[], then assume p=-v,
% the "affine scalin... |
github | AlonLabWIS/ParTI-master | bwblkslv.m | .m | ParTI-master/SeDuMi_1_3/bwblkslv.m | 1,585 | utf_8 | 7aab88b5b2c5bbc0b8395d1d2a21f1ec | % BWBLKSLV Solves block sparse upper-triangular system.
% y = bwblkslv(L,b) yields the same result as
% y(L.perm,:) = L.L'\b
% However, BWBLKSLV is faster than the built-in operator "\",
% because it uses dense linear algebra and loop-unrolling on
% supernodes.
%
% Typical use, with X... |
github | AlonLabWIS/ParTI-master | sqrtinv.m | .m | ParTI-master/SeDuMi_1_3/sqrtinv.m | 1,862 | utf_8 | 5b37f7048bfd0cdc7f02dad339241051 | % y = sqrtinv(q,vlab,K)
% SQRTINV Computes for PSD-cone, y = (Q / diag(sqrt(vlab)))', so that
% Y'*Y = inv(Q * diag(vlab) * Q').
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function y = sqrtinv(q,vlab,K)
%
% This file is part ... |
github | AlonLabWIS/ParTI-master | vecsym.m | .m | ParTI-master/SeDuMi_1_3/vecsym.m | 1,811 | utf_8 | 7f48e3da88265c01b5f864c6904b2c46 | % y = vecsym(x,K)
% VECSYM For the PSD submatrices, we let Yk = (Xk+Xk')/2
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function y = vecsym(x,K)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
... |
github | AlonLabWIS/ParTI-master | makereal.m | .m | ParTI-master/SeDuMi_1_3/makereal.m | 1,854 | utf_8 | 12d68656c3562650dcde9762b1a0032e | % y = makereal(x,K,cpx)
% MAKEREAL Converts matrix in MATLAB-complex format to internal
% SeDuMi format.
%
% ******************** INTERNAL FUNCTION OF SEDUMI ********************
%
% See also sedumi
function y = makereal(x,K,cpx)
%
% This file is part of SeDuM... |
github | AlonLabWIS/ParTI-master | Amul.m | .m | ParTI-master/SeDuMi_1_3/Amul.m | 2,073 | utf_8 | a40d098552f610081ae070716fcd38d0 | % y = Amul(At,dense,x,transp)
% AMUL Computes A*x (transp=0) or A'*x (transp=1), taking care of dense.A.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function y = Amul(At,dense,x,transp)
%
% This file is part of SeDuMi 1.1 by Imre P... |
github | AlonLabWIS/ParTI-master | stepdif.m | .m | ParTI-master/SeDuMi_1_3/stepdif.m | 7,011 | utf_8 | c1865ed77c9842ad9ab6fcaab21d3913 | % [t,rcdx] = stepdif(d,R,y0,x,y,z,dy0,dx,dy,dz,b,mint,tpmtd)
% STEPDIF Implements Primal-Dual Step-Differentiation for self-dual model
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function [t,rcdx] = stepdif(d,R,y0,x,y,z,dy0,dx,dy,dz,b,mint,tpmtd)
%
% This file i... |
github | AlonLabWIS/ParTI-master | qblkmul.m | .m | ParTI-master/SeDuMi_1_3/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 | AlonLabWIS/ParTI-master | psdjmul.m | .m | ParTI-master/SeDuMi_1_3/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 | AlonLabWIS/ParTI-master | widelen.m | .m | ParTI-master/SeDuMi_1_3/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 | AlonLabWIS/ParTI-master | psdeig.m | .m | ParTI-master/SeDuMi_1_3/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 | AlonLabWIS/ParTI-master | sdfactor.m | .m | ParTI-master/SeDuMi_1_3/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 | AlonLabWIS/ParTI-master | maxstep.m | .m | ParTI-master/SeDuMi_1_3/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 | AlonLabWIS/ParTI-master | getada3.m | .m | ParTI-master/SeDuMi_1_3/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 | AlonLabWIS/ParTI-master | mat.m | .m | ParTI-master/SeDuMi_1_3/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 | AlonLabWIS/ParTI-master | blkchol.m | .m | ParTI-master/SeDuMi_1_3/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 | AlonLabWIS/ParTI-master | psdfactor.m | .m | ParTI-master/SeDuMi_1_3/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 | AlonLabWIS/ParTI-master | adendotd.m | .m | ParTI-master/SeDuMi_1_3/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 | AlonLabWIS/ParTI-master | qjmul.m | .m | ParTI-master/SeDuMi_1_3/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 | AlonLabWIS/ParTI-master | wregion.m | .m | ParTI-master/SeDuMi_1_3/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 | AlonLabWIS/ParTI-master | ddot.m | .m | ParTI-master/SeDuMi_1_3/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 | AlonLabWIS/ParTI-master | getdense.m | .m | ParTI-master/SeDuMi_1_3/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 | AlonLabWIS/ParTI-master | givensrot.m | .m | ParTI-master/SeDuMi_1_3/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 | AlonLabWIS/ParTI-master | sparbwslv.m | .m | ParTI-master/SeDuMi_1_3/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 | AlonLabWIS/ParTI-master | cellK.m | .m | ParTI-master/SeDuMi_1_3/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 | AlonLabWIS/ParTI-master | prelp.m | .m | ParTI-master/SeDuMi_1_3/conversion/prelp.m | 3,887 | utf_8 | 8c7e67b2e1d395fd955562d7f31a033d | % 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 ty... |
github | AlonLabWIS/ParTI-master | feasreal.m | .m | ParTI-master/SeDuMi_1_3/conversion/feasreal.m | 4,269 | utf_8 | 696a3a72691eca524fa51b16e3d66676 | % 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 i... |
github | AlonLabWIS/ParTI-master | sdpa2vec.m | .m | ParTI-master/SeDuMi_1_3/conversion/sdpa2vec.m | 2,413 | utf_8 | f31450c6f37447ae7b4723b129db9d4f | % 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 | AlonLabWIS/ParTI-master | blk2vec.m | .m | ParTI-master/SeDuMi_1_3/conversion/blk2vec.m | 1,699 | utf_8 | 75235ffac1810910d18fb37b99a3223a | % 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)
%
% C... |
github | AlonLabWIS/ParTI-master | writesdp.m | .m | ParTI-master/SeDuMi_1_3/conversion/writesdp.m | 4,988 | utf_8 | 6377c90a7877157dfb9ec61ed8005def | % 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 | AlonLabWIS/ParTI-master | frompack.m | .m | ParTI-master/SeDuMi_1_3/conversion/frompack.m | 2,583 | utf_8 | 76beec126c8e1d01e6d87f189e024662 | % 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... |
github | AlonLabWIS/ParTI-master | feascpx.m | .m | ParTI-master/SeDuMi_1_3/conversion/feascpx.m | 4,513 | utf_8 | 4de33ab70c8cb03bdda2f32a1796fe05 | % 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:... |
github | AlonLabWIS/ParTI-master | VCA.m | .m | ParTI-master/mvsa_demo/VCA.m | 6,902 | utf_8 | 9a6dbc371d8802fabaa638ad49228eb9 | function [Ae, indice, Rp] = VCA(R,varargin)
% Vertex Component Analysis
%
% [Ae, indice, Rp ]= vca(R,'Endmembers',p,'SNR',r,'verbose',v)
%
% ------- Input variables -------------
% R - matrix with dimensions L(channels) x N(pixels)
% each pixel is a linear mixture of p endmembers
% signatures R = M... |
github | AlonLabWIS/ParTI-master | VCA.m | .m | ParTI-master/sisal_demo/VCA.m | 6,901 | utf_8 | 199e5f4efaea0fa3496f9329ad174010 | function [Ae, indice, Rp] = VCA(R,varargin)
% Vertex Component Analysis
%
% [Ae, indice, Rp ]= vca(R,'Endmembers',p,'SNR',r,'verbose',v)
%
% ------- Input variables -------------
% R - matrix with dimensions L(channels) x N(pixels)
% each pixel is a linear mixture of p endmembers
% signatures R = M... |
github | AlonLabWIS/ParTI-master | MVES.m | .m | ParTI-master/MVES_code/MVES.m | 4,342 | utf_8 | 71a186219f617242b9caecd5c2f8f414 | %=====================================================================
% Programmer:
% Tsung-Han Chan, E-mail: chantsunghan@gmail.com
% Date: May 20, 2009
% -------------------------------------------------------
% Reference:
% T.-H. Chan, C.-Y. Chi, Y.-M. Huang and W.-K. Ma, ``A convex analysis
% based minim... |
github | nigels-com/displaz-master | dplot.m | .m | displaz-master/bindings/matlab/dplot.m | 9,534 | utf_8 | 4ced888f527c02de953a7627e4983c17 | function dplot(position, varargin)
% 3D plotting function for points and lines
%
% The interface is similar to plot() where possible and convenient.
%
% dplot(P) Plots the Nx3 array P as points, with a point in each row
% (so X = P(:,1), Y = P(:,2), etc)
%
% dplot(P, S) Plots points P us... |
github | gadomski/fgt-main | analyze_leafsize_stats.m | .m | fgt-main/vendor/nanoflann-1.1.9/perf-tests/analyze_leafsize_stats.m | 1,502 | utf_8 | 5bcc7168b358ccc2a7e4345373d29a85 | function [] = analyze_leafsize_stats()
% Compute the stats from the result files of performance tests wrt
% the max. leaf size
close all;
%D=load('LEAF_STATS.txt');
%D=load('LEAF_STATS_DOUBLE.txt');
D=load('LEAF_STATS_DATASET.txt');
MAXs = unique(D(:,2));
COLs = {'k','b','r','g'}; % C... |
github | gadomski/fgt-main | analyze_stats.m | .m | fgt-main/vendor/nanoflann-1.1.9/perf-tests/analyze_stats.m | 2,369 | utf_8 | b6d766f7cf55dee127cf6bb3085f2776 | function [] = analyze_stats()
% Compute the stats from the result files of flann & nanoflann performance tests
%
close all;
[Nsf, Tf_M, Tf_STD] = analyze_file('stats_flann.txt');
[Nsnf, Tnf_M, Tnf_STD]= analyze_file('stats_nanoflann.txt');
titles={'Convert into Matrix<>', 'Build index', 'One 3D... |
github | bbrister/SIFT3D-master | Sift3DTest.m | .m | SIFT3D-master/wrappers/matlab/Sift3DTest.m | 29,286 | utf_8 | 872c0a3df508422670e69cafcaf4c95d | classdef Sift3DTest < TestCase
%Sift3DTest a test suite for SIFT3D.
%
% To run this test suite, you must install xUnit. As of January
% 12th, 2017, xUnit is available at:
% http://www.mathworks.com/matlabcentral/fileexchange/47302-xunit4
%
% Run the tests with the following command:
% runxunit
%
% This test suite can... |
github | bbrister/SIFT3D-master | orientation3D.m | .m | SIFT3D-master/wrappers/matlab/orientation3D.m | 1,954 | utf_8 | 1ddcac2f4955bc7a638dcf841966390a | %orientation3D(keys, im, units) Assign 3D orientations to keypoints
% in an image. This is not needed if your keypoints were detected with
% detectSift3D, but may be useful if your keypoints were defined
% manually with keypoint3D.
%
% Arguments:
% keys - [Mx1] array of keypoint structs. See keypoint3D.m.
% ... |
github | bbrister/SIFT3D-master | registerSift3D.m | .m | SIFT3D-master/wrappers/matlab/registerSift3D.m | 4,634 | utf_8 | cdc66d275c731dcee0317493169e16b2 | function [A, matchSrc, matchRef] = registerSift3D(src, ref, varargin)
%registerSift3D(src, ref, options) register a pair of
% images using SIFT3D keypoints. Detects keypoints, extracts and matches
% descriptors, and then fits an affine transformation using the RANSAC
% algorithm.
%
% Arguments:
% src, ref - A pa... |
github | bbrister/SIFT3D-master | matchSift3D.m | .m | SIFT3D-master/wrappers/matlab/matchSift3D.m | 2,847 | utf_8 | e32f5297d51e2f151e1a7ab7355e1357 | function matches = matchSift3D(desc1, coords1, desc2, coords2, nnThresh)
%matchSift3D(desc1, desc2)
% Match SIFT3D desriptors from a pair of images.
%
% Arguments:
% desc1: Descriptors returned from extractSift3D, for the first image.
% coords1: Coordinates returned from extractSift3D, for the second
% im... |
github | stpddream/ActiveLifelongLearning-master | runExperiment.m | .m | ActiveLifelongLearning-master/ELLAv1.0_origin/ELLAv1.0/runExperiment.m | 1,944 | utf_8 | e68e4d798c374cf671c5de8bc5de6fab | %%
% Use ELLA on the landmine data with a linear-logistic model and log-loss
%
% Copyright (C) Paul Ruvolo and Eric Eaton 2013
%
% This file is part of ELLA.
%
% ELLA is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Founda... |
github | stpddream/ActiveLifelongLearning-master | predictELLA.m | .m | ActiveLifelongLearning-master/ELLAv1.0_origin/ELLAv1.0/predictELLA.m | 1,193 | utf_8 | fb81d5df05cb3d62f66a659791d6d03c | %%
% Compute the predictions for the specified model on the specified data
%
% inputs -
% model: the ELLA model
% X: the input data to output predictions for
% taskid: the identity of the task to output predictions for
%
% outputs -
% preds: the predictions organized as a column vector
%
% This file is part of ELLA.
%
... |
github | stpddream/ActiveLifelongLearning-master | MLRegress.m | .m | ActiveLifelongLearning-master/ELLAv1.0_origin/ELLAv1.0/MLRegress.m | 3,344 | utf_8 | f6d14de84234f6ca68baa4442d2e8183 | % MLRegress Multivariate Logistic Regression
% [Bhat Yhat] = MLRegress(X,W,Y,B,alpha)
% Fits model of form: Yhat proportional to exp(X*Bhat)
% The objective function is multinomial log-likelihood with a
% quadratic weight penalty term
% This function is optimized using a Newton-Raphson method.
% There are c dependen... |
github | stpddream/ActiveLifelongLearning-master | selectTaskELLA.m | .m | ActiveLifelongLearning-master/ELLAv1.0_origin/ELLAv1.0/selectTaskELLA.m | 3,000 | utf_8 | 8b7b9cc5c40dcca3ac6e5dd93204f372 | %%
% Select the next task to learn using a specified particular criterion
%
% inputs -
% model: the ELLA model
% Xs: a cell array containing some seed data to use for selecting the next task
% to learn
% Ys: a cell array containing the labels of the seed data
% selectionCriterion: 1 (random)
% 2 (InfoMax)
%... |
github | stpddream/ActiveLifelongLearning-master | runExperimentActiveTask.m | .m | ActiveLifelongLearning-master/ELLAv1.0_origin/ELLAv1.0/runExperimentActiveTask.m | 2,459 | utf_8 | 76676047e9f2bb2bdf8493117a68fc04 | %%
% Do an active task selection experiment on the landmine data
%
% Copyright (C) Paul Ruvolo and Eric Eaton 2013
%
% This file is part of ELLA.
%
% ELLA is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either... |
github | stpddream/ActiveLifelongLearning-master | sparseEncode.m | .m | ActiveLifelongLearning-master/ELLAv1.0_origin/ELLAv1.0/sparseEncode.m | 2,095 | utf_8 | 91c754342a158c4dd36149f307381669 | %%
% Encode a task using the current basis and the specified single task model
%
% inputs -
% model: the ELLA model
% theta: the optimal single task model
% D: the Hessian of the loss function evaluated about theta
%
% outputs -
% s: the task encoding coefficients for the current latent basis
% taskSpecific: the task s... |
github | stpddream/ActiveLifelongLearning-master | roc.m | .m | ActiveLifelongLearning-master/ELLAv1.0_origin/ELLAv1.0/roc.m | 1,905 | utf_8 | 8d3c99ca80e7d9f00d9b573815f3f921 | % Copyright (C) Paul Ruvolo and Eric Eaton 2013
%
% This file is part of ELLA.
%
% ELLA is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.... |
github | stpddream/ActiveLifelongLearning-master | initModelELLA.m | .m | ActiveLifelongLearning-master/ELLAv1.0_origin/ELLAv1.0/initModelELLA.m | 3,680 | utf_8 | 7a9d1de6fc47bc97897d0f0d541a9541 | %%
% Create a new ELLA model
%
% inputs -
% options: a struct consisting of key value pairs
% The valid options are:
% d (required): the dimensionality of the input data points
% k (required): the number of latent basis functions
% useLogistic (default false): true if you want to do a logistic model
% with log-loss a... |
github | stpddream/ActiveLifelongLearning-master | runExperimentActiveTaskTargeted.m | .m | ActiveLifelongLearning-master/ELLAv1.0_origin/ELLAv1.0/runExperimentActiveTaskTargeted.m | 2,713 | utf_8 | 16e79f90b0973ccfa7069ebcf01a651e | %%
% Do a targeted active task selection experiment on the landmine data
%
% Copyright (C) Paul Ruvolo and Eric Eaton 2013
%
% This file is part of ELLA.
%
% ELLA is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation... |
github | stpddream/ActiveLifelongLearning-master | encodeTaskELLA.m | .m | ActiveLifelongLearning-master/ELLAv1.0_origin/ELLAv1.0/encodeTaskELLA.m | 2,272 | utf_8 | 9f08505acdeedbc78dfc373141a2bb0c | %%
% Encode a new task using the specified model
%
% inputs -
% model: the ELLA model
% X: the training data (data instances are rows)
% Y: the training labels
%
% outputs -
% s: the weights over the latent basis vectors to encode the task
% theta: the optimal single task model
% D: the hessian of the loss function ev... |
github | stpddream/ActiveLifelongLearning-master | addTaskELLA.m | .m | ActiveLifelongLearning-master/ELLAv1.0_origin/ELLAv1.0/addTaskELLA.m | 2,391 | utf_8 | fb911ce14b434e417e7c48f32b4dc6e5 | %%
% Add a new task to the specified ELLA model
%
% inputs -
% model: the ELLA model
% X: the training data for the new task (instances are rows)
% Y: the trianing labels for the new task
% taskid: the task number (the first task should be 1 and the id should
% increment from there)
% justEncode (default false)... |
github | stpddream/ActiveLifelongLearning-master | nmf.m | .m | ActiveLifelongLearning-master/ELLAv1.0_origin/ELLAv1.0/externalLibs/spams-matlab/src_release/nmf.m | 3,099 | utf_8 | 04975453432077d74521a3a5fe37cf74 | %
% Usage: [U [,V]]=nmf(X,param);
%
% Name: nmf
%
% Description: mexTrainDL is an efficient implementation of the
% non-negative matrix factorization technique presented in
%
% "Online Learning for Matrix Factorization and Sparse Coding"
% by Julien Mairal, Francis Bach, Jean Ponce and Guillermo Sapiro
... |
github | stpddream/ActiveLifelongLearning-master | test_drop.m | .m | ActiveLifelongLearning-master/al_ella/ml/test_drop.m | 2,389 | utf_8 | 17204047e130e7f270a7441c1ade731c | %%
% Do an active task selection experiment on the landmine data
%
% Copyright (C) Paul Ruvolo and Eric Eaton 2013
%
% This file is part of ELLA.
%
% ELLA is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either... |
github | luca-dex/shiny-octo-dubstep-master | rotate_image.m | .m | shiny-octo-dubstep-master/src/rotate_image.m | 391 | utf_8 | 97b2a60351dfe20474c2574c5bcee196 | % Rotate image
% Authors: Luca De Sano, Alberto Donizetti
% Released under UNIMIAMIB License
function [ outimg ] = rotate_image( img, ts )
if ts > 4
img = flipud(img);
ts = ts - 4;
end
switch ts
case 1
outimg = img;
case 2
outimg = rot90(img);
case 3
outimg = rot90(rot90(i... |
github | luca-dex/shiny-octo-dubstep-master | qtfunction.m | .m | shiny-octo-dubstep-master/src/qtfunction.m | 3,940 | utf_8 | e9db10acf8a51df5ab153bd2089e1e70 | % Encoding
% Authors: Luca De Sano, Alberto Donizetti
% Released under UNIMIAMIB License
function [ partial_enc ] = ...
qtfunction( img, position, size, split_threshold, min_size, max_size, doms, min_rms )
global img_copy;
x = position(1);
y = position(2);
partial_enc = [];
if size/2 > max_size
a = qtfunct... |
github | luca-dex/shiny-octo-dubstep-master | scale_image.m | .m | shiny-octo-dubstep-master/src/scale_image.m | 307 | utf_8 | 76999c0ce7f12f70854b124e1817d098 | % Scale image
% Authors: Luca De Sano, Alberto Donizetti
% Released under UNIMIAMIB License
function [ outimg ] = scale_image( image )
n = length(image)/2;
outimg = zeros(n);
for i=1:n
for j=1:n
outimg(i,j) = sum(sum(image(2*i-1:2*i,2*j-1:2*j)))/4;
end
end
outimg = uint8(outimg);
end
|
github | luca-dex/shiny-octo-dubstep-master | domains.m | .m | shiny-octo-dubstep-master/src/domains.m | 1,237 | utf_8 | 2f0b3d0a5a76b75097f39457566a24d4 | % Create domains
% Authors: Luca De Sano, Alberto Donizetti
% Released under UNIMIAMIB License
function [ d, d2 ] = domains( image, range_sizes, l )
if nargin < 3
l = 2;
end
d = {1000,2};
dim = length(image);
index = 1;
counter = 1;
range_sizes = sort(range_sizes, 'descend');
for size = range_sizes
step = ... |
github | luca-dex/shiny-octo-dubstep-master | derotate_image.m | .m | shiny-octo-dubstep-master/src/derotate_image.m | 440 | utf_8 | bb71c0f8985a474db14d12909537f9ff | % Derotate Image
% Authors: Luca De Sano, Alberto Donizetti
% Released under UNIMIAMIB License
function [ outimg ] = derotate_image( img, ts )
if ts > 4
img = flipud(img);
ts = ts - 4;
end
switch ts
case 1
outimg = img;
return;
case 4
outimg = rot90(img);
return;
c... |
github | luca-dex/shiny-octo-dubstep-master | check_equals.m | .m | shiny-octo-dubstep-master/src/check_equals.m | 358 | utf_8 | d812ee269e00d0c899810be9bcac5eb0 | % Check equals
% Authors: Luca De Sano, Alberto Donizetti
% Released under UNIMIAMIB License
function [ result ] = check_equals( list, matrix, index )
result = false;
for i=1:index
element = list{i,1};
if length(element) ~= length(matrix)
continue;
end
if eq(element, matrix)
result = tr... |
github | luca-dex/shiny-octo-dubstep-master | least_squared_params.m | .m | shiny-octo-dubstep-master/src/least_squared_params.m | 442 | utf_8 | f90455e96722d0f6790d3f4ab2688094 | % Least Squared Params
% Authors: Luca De Sano, Alberto Donizetti
% Released under UNIMIAMIB License
function [s, o] = least_squared_params(img1, img2)
if length(img1) ~= length(img2)
error('least_squared: ERROR!');
end
n = length(img1)^2;
a = single(reshape(img2, [1, n]));
b = single(reshape(img1, [1, n]));... |
github | luca-dex/shiny-octo-dubstep-master | sup_dist.m | .m | shiny-octo-dubstep-master/src/sup_dist.m | 654 | utf_8 | 783168cb42fc8c4f6f55f49bb37544d3 | % RMS distance
% Authors: Luca De Sano, Alberto Donizetti
% Released under UNIMIAMIB License
function [ rms, transf ] = sup_dist( img1, img2 )
if length(img1) ~= length(img2)
error('sup_dist: ERROR!');
end
rms_arr = zeros(1,8);
for i = 1:8
rms_arr(i) = dsh(img1, rotate_image(img2, i));
end
transf = find(rm... |
github | luca-dex/shiny-octo-dubstep-master | decode_step.m | .m | shiny-octo-dubstep-master/src/decode_step.m | 780 | utf_8 | ba4754ccc082515c2b89e3c73cc76f21 | % A single decode step
% Authors: Luca De Sano, Alberto Donizetti
% Released under UNIMIAMIB License
function [ outputimg ] = decode_step( img )
global encoding;
outputimg = zeros(length(img));
for i=1:length(encoding)
xr = encoding(i,1);
yr = encoding(i,2);
sr = encoding(i,3);
xd = encodin... |
github | EIT-team/ScouseTom-master | ScouseTom_ContactCheck.m | .m | ScouseTom-master/src/matlab/ScouseTom_ContactCheck.m | 6,231 | utf_8 | cfe9ac4e5f4b73cf7713606b45d1f2af | function [Ard] = ScouseTom_ContactCheck( Ard,ExpSetup )
%SCOUSETOM_CHECKCOMPLIANCE Summary of this function goes here
% Detailed explanation goes here
%% info from expsetup
N_prt=ExpSetup.Info.ProtocolLength;
N_elec=ExpSetup.Elec_num;
Contact_Protocol=[1:N_elec; circshift(1:N_elec,-1,2)]';
Contact_Protocol=Contac... |
github | EIT-team/ScouseTom-master | ScouseTom_Init.m | .m | ScouseTom-master/src/matlab/ScouseTom_Init.m | 2,239 | utf_8 | a5bd278bf71360931f4a489d8140d8cb | function [ Ard ] = ScouseTom_Init( ArdComPortStr )
%ScouseTom_Init Initialises Arduino Due for ScouseTom v2
% Resets the Arduino and establishes connection
% Input - ArdComPortStr string for com port i.e. 'COM11'
% Output - Ard - serial object for arduino
% smashed together by jimmy 2015
%% Some variables
CScomme... |
github | EIT-team/ScouseTom-master | ScouseTom_ValidateExpSetup.m | .m | ScouseTom-master/src/matlab/ScouseTom_ValidateExpSetup.m | 22,115 | utf_8 | 358ed0f0f7cfdc50bc6f796b07ce0328 | function [ goodnessflag,ExpSetup ] = ScouseTom_ValidateExpSetup( ExpSetup,VerboseFlag,varargin )
%ScouseTom_ValidateExpSetup Checks the settings in the ExpSetup structure
% Users can now edit the ExpSetup and resend settings without going
% through any of the settings dialogs, so need to check everything before
% ... |
github | EIT-team/ScouseTom-master | ScouseTom_CheckCompliance.m | .m | ScouseTom-master/src/matlab/ScouseTom_CheckCompliance.m | 6,615 | utf_8 | c5f66608b997610a39c867979f0f1606 | function [ Ard,CompOK ] = ScouseTom_CheckCompliance( Ard,ExpSetup )
%SCOUSETOM_CHECKCOMPLIANCE Summary of this function goes here
% Detailed explanation goes here
%% info from expsetup
N_prt=ExpSetup.Info.ProtocolLength;
%% Possible inputs
%this must be the same as the Errors.h
%expected stuff:
Error_prefix='... |
github | EIT-team/ScouseTom-master | ScouseTom_SendSettings.m | .m | ScouseTom-master/src/matlab/ScouseTom_SendSettings.m | 9,309 | utf_8 | d6634965b810f01bad2f99ae1e8df78b | function [ Ard,ExpSetup,OKFLAG ] = ScouseTom_SendSettings( Ard,ExpSetup)
%ScouseTom_SendSettings Sends the information of the protocol, time to inject
%per protocol line etc. to the arduino in the agreed fashion
%comments below is out of date
%
% Data is sent in the form <###> with confirmation.
% Inputs:
% Ard - A... |
github | EIT-team/ScouseTom-master | ScouseTom_ard_parseinput.m | .m | ScouseTom-master/src/matlab/ScouseTom_ard_parseinput.m | 3,112 | utf_8 | fa11006d5cda3da50dbea17ead18361d | function [ CMD,DataOut,StringOut ] = ScouseTom_ard_parseinput( StringIn )
%UNTITLED Summary of this function goes here
% Detailed explanation goes here
%% Possible inputs
%this must be the same as the Errors.h
%expected stuff:
Error_prefix='!';
Message_prefix='+';
Repeat_prefix='R';
Prt_prefix='P';
Freqord_prefi... |
github | EIT-team/ScouseTom-master | stoploop.m | .m | ScouseTom-master/src/matlab/stoploop.m | 2,421 | utf_8 | 1fdea2ea3084588c21da52991f8008cd | function F = stoploop(str)
% STOPLOOP - creates stop button to have a user interrupt a loop
%
% FS = STOPLOOP creates a message box window and returns a structure FS that
% holds two functions, called FS.Stop and FS.Clear. The function FS.Stop()
% will return true, if the OK button has been clicked (or the message ... |
github | EIT-team/ScouseTom-master | ScouseTom_Start.m | .m | ScouseTom-master/src/matlab/ScouseTom_Start.m | 20,115 | utf_8 | b300c718bd2f1c44e7877ea1dd308ca5 | function [ Ard,ExpSetup ] = ScouseTom_Start( Ard,ExpSetup,NoPrompt)
%ScouseTom_Start Start injection with scoustom system
%
% Script to start injection on the ScouseTom system. User must have run
% ScouseTom_init to get Ard object (only once), and sent the ExpSetup to
% the arduino using ScouseTom_SendSettings.
%... |
github | EIT-team/ScouseTom-master | ScouseTom_CheckSwitches.m | .m | ScouseTom-master/src/matlab/ScouseTom_CheckSwitches.m | 995 | utf_8 | 61458c6a152a143be7672522e7b024cd | function [ Ard,SwOKFlag ] = ScouseTom_CheckSwitches( Ard )
%SCOUSETOM_CHECKSWITCHES Checks switches are working
% Detailed explanation goes here
%% send command
FlushSerialBuffer(Ard); % ignore everything sent before this
fprintf(Ard,'W'); %send command to Arduino
SwOKFlag=ScouseTom_ard_readswitchcheck(Ard); %rea... |
github | EIT-team/ScouseTom-master | ScouseTom_ard_getwipersetting.m | .m | ScouseTom-master/src/matlab/ScouseTom_ard_getwipersetting.m | 2,067 | utf_8 | 7ea0755c75eb4eeae154e456f8e1dc5e | function [ out,varargout ] = ScouseTom_ard_getwipersetting( in )
%ScouseTom_ard_getwipersetting Get wiper setting for target stimulator
%voltrage
% if input is ExpSetup then target voltage taken from
% ExpSetup.StimulatorVoltage, and value saved in
% ExpSetup.StimulatorWiperSetting
% Otherwise input is Voltage an... |
github | csdms-contrib/slepian_delta-master | grs.m | .m | slepian_delta-master/grs.m | 4,956 | utf_8 | 604982e050d6265ff23956ed80c14d68 | function varargout=grs(GM,rf,a,omega,nzo)
% [barC2n,geqt,gpol,U0,m,ecc,eccp,b,E,c]=GRS(GM,rf,a,omega,nzo)
%
% Calculate geopotential constants in a reference earth model.
%
% INPUT:
%
% GM Gravitational constant times mass reference [scalar]
% rf Inverse flattening (1/f) [scalar... |
github | csdms-contrib/slepian_delta-master | periodfit.m | .m | slepian_delta-master/periodfit.m | 2,638 | utf_8 | 42164285273bfb8cede0ec94ea804d0b | function varargout=periodfit(yofx,perdx,x,comp)
% [vard,resd,pred,contr,perdb]=PERIODFIT(yofx,perdx,x,comp)
%
% Performs a direct inversion for the periodic (sin/cos) components of a
% given signal - including an offset. But see POLYFIT for scaling on x.
%
% INPUT:
%
% yofx The data, i.e. the dependent variable
% p... |
github | csdms-contrib/slepian_delta-master | slept2resid.m | .m | slepian_delta-master/slept2resid.m | 21,190 | utf_8 | b6fd339e3e9cae3edafcd76ebe88ba32 | function varargout=slept2resid(slept,thedates,fitwhat,givenerrors,specialterms,CC,TH,N)
% [ESTsignal,ESTresid,ftests,extravalues,total,alphavarall,totalparams,
% totalparamerrors,totalfit,functionintegrals,alphavar]
% =SLEPT2RESID(slept,thedates,fitwhat,givenerrors,specialterms,CC,TH)
%
% Takes a time series o... |
github | chjp2046/thirdparty-master | member_pointer_runme.m | .m | thirdparty-master/swig-2.0.4/Examples/test-suite/octave/member_pointer_runme.m | 922 | utf_8 | 5d65cb03abdda4efc4dd89ee739e27b6 | # Example using pointers to member functions
member_pointer
function check(what,expected,actual)
if (expected != actual)
error ("Failed: %s, Expected: %f, Actual: %f",what,expected,actual);
endif
end
# Get the pointers
area_pt = areapt;
perim_pt = perimeterpt;
# Create some objects
s = Square(10);
# Do s... |
github | chjp2046/thirdparty-master | director_basic_runme.m | .m | thirdparty-master/swig-2.0.4/Examples/test-suite/octave/director_basic_runme.m | 1,734 | utf_8 | b6b47f50cd7b79dce886ca9a71659d86 | director_basic
function self=OctFoo()
global director_basic;
self=subclass(director_basic.Foo());
self.ping=@OctFoo_ping;
end
function string=OctFoo_ping(self)
string="OctFoo::ping()";
end
a = OctFoo();
if (!strcmp(a.ping(),"OctFoo::ping()"))
error(a.ping())
endif
if (!strcmp(a.pong(),"Foo::pong();OctFoo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.