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 | swami1995/vo-slam-master | makeinhomogeneous.m | .m | vo-slam-master/src/display_ftr/makeinhomogeneous.m | 791 | utf_8 | ce76d362845ed0c7eef257d1d0406795 | % MAKEINHOMOGENEOUS - Converts homogeneous coords to inhomogeneous coordinates
%
% Usage: x = makehomogeneous(hx)
%
% Argument:
% hx - an N x npts array of homogeneous coordinates.
%
% Returns:
% x - an (N-1) x npts array of inhomogeneous coordinates
%
% Warning: If there are any points at infinity ... |
github | csdms-contrib/slepian_charlie-master | dsvarratio3.m | .m | slepian_charlie-master/dsvarratio3.m | 6,909 | utf_8 | abb7e15242c7b3083e42533ecefe2213 | function dsvarratio3
% DSVARRATIO3
%
% Plots the variance ratio of the eigenvalue-weighted multitaper variance
% to the whole-sky estimate
%
% Last modified by fjsimons-at-alum.mit.edu, 02/07/2007
% LATER ON REWRITE THIS TO USE THE NEW FUNCTION MVARRATIOS
Lmax=50;
l=0:Lmax;
% Various bandwidths to be plotted down th... |
github | csdms-contrib/slepian_charlie-master | getdecodepthCore.m | .m | slepian_charlie-master/getdecodepthCore.m | 1,505 | utf_8 | 71a15a0069ba8472e81d6f930616962c | function [K,r,modval,modls]=getdecodepthCore(spec,ls,rplanet,showit)
% [K,r,modval,modls]=getdecodepthCore(spec,ls,rplanet,showit)
%
% THIS ONE IS USEFUL FOR THE CORE. THE OTHER ONE IS FOR CRUSTAL FIELDS
%
% Calculates the decorrelation depth described by Voorhies et al (2002),
% eq. (16) by doing a linear least squa... |
github | csdms-contrib/slepian_charlie-master | dscmb.m | .m | slepian_charlie-master/dscmb.m | 5,724 | utf_8 | e03732aecf4dcd76b63bde4f3d2a81bc | function dscmb
% Makes a plot of the CMB spectrum, its WS error, and how it is improved
% using eigenvalue-weighted multitaper analysis
% PARAMETERS:
% $\Omega_{\mathrm b}=0.046,
%\Omega_{\mathrm c}=0.224, \Omega_{\Lambda}=0.730$ and $H_0=72$
% $\mathrm{km}\,\mathrm{s}^{-1}\,\mathrm{Mpc}^{-1}$
% This is the file name... |
github | csdms-contrib/slepian_charlie-master | caplogo.m | .m | slepian_charlie-master/caplogo.m | 6,678 | utf_8 | ca6febbbe577583c4d8aa6ba6dd28535 | function [ah,ax]=caplogo(ahin,sord,loc,wid,hit,ang)
% [ah,ax]=caplogo(ahin,sord,loc,wid,hit,ang)
%
% Puts a thumbnail of a polar cap on another plot... some after-the-fact
% moving and shrinking may still be required
%
% INPUT:
%
% ahin The axis handle on which you want the logo [default: gca]
% sord 1 singl... |
github | csdms-contrib/slepian_charlie-master | getdecodepth.m | .m | slepian_charlie-master/getdecodepth.m | 1,604 | utf_8 | 7a23ccde38f297c3286297ffdbed847b | function [A,r,modval,modls]=getdecodepth(spec,ls,rplanet,rspec,showit)
% [A,r,modval,modls]=getdecodepth(spec,ls,rplanet,rspec,showit)
%
% Calculates the decorrelation depth described by Voorhies et al (2002),
% eq. (5b) by doing a linear least squares fit to the logarithms.
%
% INPUT:
%
% spec spectrum
% ls ... |
github | csdms-contrib/slepian_charlie-master | getdecodepth_Langlais.m | .m | slepian_charlie-master/getdecodepth_Langlais.m | 1,445 | utf_8 | 18da523ffd8ee83fa1a36b5546c28588 | function [C,rc,modval,modls]=getdecodepth_Langlais(spec,ls,rplanet,showit)
% [C,rc,modval,modls]=getdecodepth_Langlais(spec,ls,rplanet,showit)
%
% SPEC MUST ONLY CONTAIN NON-ZONAL COEFFICIENTS
%
% Calculates the decorrelation depth described by Langlais et al (2014),
% eq. (5b) by doing a linear least squares fit to th... |
github | csdms-contrib/slepian_charlie-master | dsvarratio9.m | .m | slepian_charlie-master/dsvarratio9.m | 11,088 | utf_8 | 9f5710db39610bc110f2df3cf526fb44 | function dsvarratio9
% DSVARRATIO9
%
% Plots the large-l MT variance ratio on a log scale as a function of the
% angle and the degree
clf
[ah,ha]=krijetem(subnum(2,2));
% First two panels show variance ratio in function of degree
% First panel
axes(ah(1))
% Calculate
sord=1;
EL=[0:20];
% This is the cap
TH=[0 10 20 ... |
github | csdms-contrib/slepian_charlie-master | whitevariance.m | .m | slepian_charlie-master/whitevariance.m | 19,762 | utf_8 | 2235e223c0cdd308af62e2c5a232d53c | function [Cab,morder,N]=whitevariance(l,L,TH,meth,memeff)
% [Cab,morder]=WHITEVARIANCE(l,L,TH,meth,memeff)
%
% Computes the multitaper variance for white source processes and
% axisymmetric Slepian functions, at a SINGLE DEGREE. Single polar cap.
% Dahlen & Simons (2008) eq. (162-163)
%
% INPUT:
%
% l The degre... |
github | csdms-contrib/slepian_charlie-master | dsdiagram.m | .m | slepian_charlie-master/dsdiagram.m | 7,297 | utf_8 | eb1261444d8c6676846c4149aa772740 | function dsdiagram
% Geometry
%
% Simons & Dahlen (2007), Figure 1
%
% Last modified by fjsimons-at-alum.mit.edu, 03/28/2007
% Which vector to plot
ang=40;
% Down to this z level for the projection
lz=-0.2;
% Rotation of the geodesic
rotg=-30;
% Rotation of the X-axis
rots=10;
clf
[ah,ha]=krijetem(subnum(1,4));
% FI... |
github | xavierdidelot/TransPhyloMatlab-master | infer.m | .m | TransPhyloMatlab-master/infer.m | 1,914 | utf_8 | bb2b09dfea9783aa26ad06f3edcc129c | function record=infer(tree,mcmc,timeLastSeq)
%Tree is a phylogeny
%mcmc is the number of MCMC iterations to perform
%timeLastSeq is the date of the last sequence
if nargin<3,timeLastSeq=2010;end
if nargin<2,mcmc=10000;end
n=ceil(size(tree,1)/2);
neg=100/365;%Within-host effective population size (Ne) times generation... |
github | xavierdidelot/TransPhyloMatlab-master | probPTreeGivenTTree.m | .m | TransPhyloMatlab-master/probPTreeGivenTTree.m | 3,117 | utf_8 | eeef484cf74e92db4ab0158aab29f7d2 | function prob=probPTreeGivenTTree(fulltree,neg)
%To calculate the probability of a phylogenetic tree given a transmission
%tree, split up the phylogenetic tree into individual within-host subtrees, and
%calculate the product of their probabilities
n=sum(fulltree(:,2)==0&fulltree(:,3)==0);
prob=0;
fathers=zeros(size(ful... |
github | CNevd/ML-exercise-master | submit.m | .m | ML-exercise-master/mlclass-ex3-006/mlclass-ex3/submit.m | 17,041 | utf_8 | e29a15e3fa567e917c7fd6cad94fb6d3 | function submit(partId, webSubmit)
%SUBMIT Submit your code and output to the ml-class servers
% SUBMIT() will connect to the ml-class server and submit your solution
fprintf('==\n== [ml-class] Submitting Solutions | Programming Exercise %s\n==\n', ...
homework_id());
if ~exist('partId', 'var') || isem... |
github | CNevd/ML-exercise-master | submitWeb.m | .m | ML-exercise-master/mlclass-ex3-006/mlclass-ex3/submitWeb.m | 807 | utf_8 | a53188558a96eae6cd8b0e6cda4d478d | % submitWeb Creates files from your code and output for web submission.
%
% If the submit function does not work for you, use the web-submission mechanism.
% Call this function to produce a file for the part you wish to submit. Then,
% submit the file to the class servers using the "Web Submission" button on the ... |
github | CNevd/ML-exercise-master | submit.m | .m | ML-exercise-master/mlclass-ex4-006/mlclass-ex4/submit.m | 17,129 | utf_8 | 90fe6bfd432e59c0a145fb1240d34ce5 | function submit(partId, webSubmit)
%SUBMIT Submit your code and output to the ml-class servers
% SUBMIT() will connect to the ml-class server and submit your solution
fprintf('==\n== [ml-class] Submitting Solutions | Programming Exercise %s\n==\n', ...
homework_id());
if ~exist('partId', 'var') || isem... |
github | CNevd/ML-exercise-master | submitWeb.m | .m | ML-exercise-master/mlclass-ex4-006/mlclass-ex4/submitWeb.m | 807 | utf_8 | a53188558a96eae6cd8b0e6cda4d478d | % submitWeb Creates files from your code and output for web submission.
%
% If the submit function does not work for you, use the web-submission mechanism.
% Call this function to produce a file for the part you wish to submit. Then,
% submit the file to the class servers using the "Web Submission" button on the ... |
github | CNevd/ML-exercise-master | submit.m | .m | ML-exercise-master/mlclass-ex5-006/mlclass-ex5/submit.m | 17,211 | utf_8 | 3944057205d9a0556a0bff723d230862 | function submit(partId, webSubmit)
%SUBMIT Submit your code and output to the ml-class servers
% SUBMIT() will connect to the ml-class server and submit your solution
fprintf('==\n== [ml-class] Submitting Solutions | Programming Exercise %s\n==\n', ...
homework_id());
if ~exist('partId', 'var') || isem... |
github | CNevd/ML-exercise-master | submitWeb.m | .m | ML-exercise-master/mlclass-ex5-006/mlclass-ex5/submitWeb.m | 807 | utf_8 | a53188558a96eae6cd8b0e6cda4d478d | % submitWeb Creates files from your code and output for web submission.
%
% If the submit function does not work for you, use the web-submission mechanism.
% Call this function to produce a file for the part you wish to submit. Then,
% submit the file to the class servers using the "Web Submission" button on the ... |
github | CNevd/ML-exercise-master | submit.m | .m | ML-exercise-master/mlclass-ex7-006/mlclass-ex7/submit.m | 16,958 | utf_8 | 9bbc174b62acd280557995ac15eeea31 | function submit(partId, webSubmit)
%SUBMIT Submit your code and output to the ml-class servers
% SUBMIT() will connect to the ml-class server and submit your solution
fprintf('==\n== [ml-class] Submitting Solutions | Programming Exercise %s\n==\n', ...
homework_id());
if ~exist('partId', 'var') || isem... |
github | CNevd/ML-exercise-master | submitWeb.m | .m | ML-exercise-master/mlclass-ex7-006/mlclass-ex7/submitWeb.m | 807 | utf_8 | a53188558a96eae6cd8b0e6cda4d478d | % submitWeb Creates files from your code and output for web submission.
%
% If the submit function does not work for you, use the web-submission mechanism.
% Call this function to produce a file for the part you wish to submit. Then,
% submit the file to the class servers using the "Web Submission" button on the ... |
github | CNevd/ML-exercise-master | submit.m | .m | ML-exercise-master/mlclass-ex2-006/mlclass-ex2/submit.m | 17,086 | utf_8 | f73599d88a689dc1a69facdd58f4a7cb | function submit(partId, webSubmit)
%SUBMIT Submit your code and output to the ml-class servers
% SUBMIT() will connect to the ml-class server and submit your solution
fprintf('==\n== [ml-class] Submitting Solutions | Programming Exercise %s\n==\n', ...
homework_id());
if ~exist('partId', 'var') || isem... |
github | CNevd/ML-exercise-master | submitWeb.m | .m | ML-exercise-master/mlclass-ex2-006/mlclass-ex2/submitWeb.m | 807 | utf_8 | a53188558a96eae6cd8b0e6cda4d478d | % submitWeb Creates files from your code and output for web submission.
%
% If the submit function does not work for you, use the web-submission mechanism.
% Call this function to produce a file for the part you wish to submit. Then,
% submit the file to the class servers using the "Web Submission" button on the ... |
github | CNevd/ML-exercise-master | submit.m | .m | ML-exercise-master/mlclass-ex1-006/submit.m | 17,317 | utf_8 | d91bc52d795ebec0d8a1667cd9810fea | function submit(partId, webSubmit)
%SUBMIT Submit your code and output to the ml-class servers
% SUBMIT() will connect to the ml-class server and submit your solution
fprintf('==\n== [ml-class] Submitting Solutions | Programming Exercise %s\n==\n', ...
homework_id());
if ~exist('partId', 'var') || isem... |
github | CNevd/ML-exercise-master | submitWeb.m | .m | ML-exercise-master/mlclass-ex1-006/submitWeb.m | 807 | utf_8 | a53188558a96eae6cd8b0e6cda4d478d | % submitWeb Creates files from your code and output for web submission.
%
% If the submit function does not work for you, use the web-submission mechanism.
% Call this function to produce a file for the part you wish to submit. Then,
% submit the file to the class servers using the "Web Submission" button on the ... |
github | CNevd/ML-exercise-master | submit.m | .m | ML-exercise-master/mlclass-ex6-006/mlclass-ex6/submit.m | 16,836 | utf_8 | 40e4fb5817ab3ded1294f0db7921ef2c | function submit(partId, webSubmit)
%SUBMIT Submit your code and output to the ml-class servers
% SUBMIT() will connect to the ml-class server and submit your solution
fprintf('==\n== [ml-class] Submitting Solutions | Programming Exercise %s\n==\n', ...
homework_id());
if ~exist('partId', 'var') || isem... |
github | CNevd/ML-exercise-master | porterStemmer.m | .m | ML-exercise-master/mlclass-ex6-006/mlclass-ex6/porterStemmer.m | 9,902 | utf_8 | 7ed5acd925808fde342fc72bd62ebc4d | function stem = porterStemmer(inString)
% Applies the Porter Stemming algorithm as presented in the following
% paper:
% Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14,
% no. 3, pp 130-137
% Original code modeled after the C version provided at:
% http://www.tartarus.org/~martin/PorterStemmer/c.tx... |
github | CNevd/ML-exercise-master | submitWeb.m | .m | ML-exercise-master/mlclass-ex6-006/mlclass-ex6/submitWeb.m | 807 | utf_8 | a53188558a96eae6cd8b0e6cda4d478d | % submitWeb Creates files from your code and output for web submission.
%
% If the submit function does not work for you, use the web-submission mechanism.
% Call this function to produce a file for the part you wish to submit. Then,
% submit the file to the class servers using the "Web Submission" button on the ... |
github | CNevd/ML-exercise-master | submit.m | .m | ML-exercise-master/mlclass-ex8-006/mlclass-ex8/submit.m | 17,515 | utf_8 | 26eeaed83f5060f08635dd64cf98d8f6 | function submit(partId, webSubmit)
%SUBMIT Submit your code and output to the ml-class servers
% SUBMIT() will connect to the ml-class server and submit your solution
fprintf('==\n== [ml-class] Submitting Solutions | Programming Exercise %s\n==\n', ...
homework_id());
if ~exist('partId', 'var') || isem... |
github | CNevd/ML-exercise-master | submitWeb.m | .m | ML-exercise-master/mlclass-ex8-006/mlclass-ex8/submitWeb.m | 807 | utf_8 | a53188558a96eae6cd8b0e6cda4d478d | % submitWeb Creates files from your code and output for web submission.
%
% If the submit function does not work for you, use the web-submission mechanism.
% Call this function to produce a file for the part you wish to submit. Then,
% submit the file to the class servers using the "Web Submission" button on the ... |
github | yanweifu/diffusion-component-analysis-master | lbfgsb.m | .m | diffusion-component-analysis-master/code/lbfgsb.m | 8,968 | utf_8 | b8b4275ade53fd5f4c45e6b41994cbc7 | function [x,f,info] = lbfgsb( fcn, l, u, opts )
% x = lbfgsb( fcn, l, u )
% uses the lbfgsb v.3.0 library (fortran files must be installed;
% see compile_mex.m ) which is the L-BFGS-B algorithm.
% The algorithm is similar to the L-BFGS quasi-Newton algorithm,
% but also handles bound constraints via an acti... |
github | yanweifu/diffusion-component-analysis-master | validation_function.m | .m | diffusion-component-analysis-master/code/validation_function.m | 2,395 | utf_8 | f03e03313bf3bee36ec4cdf3657e6c1e | function ret = validation_function(dec, labels);
labels = (labels >= 0) - (labels < 0);
valid_function = @(dec, labels) auc(dec, labels);
ret = valid_function(dec, labels);
%precision(dec, labels);
%recall(dec, labels);
%fscore(dec, labels);
%bac(dec, labels);
%auc(dec, labels);
%accuracy(dec, labels);
function ret = ... |
github | yanweifu/diffusion-component-analysis-master | run_diffusion.m | .m | diffusion-component-analysis-master/code/run_diffusion.m | 1,386 | utf_8 | b707eaed692d659eb4dbf2fa69c027be | % [Input]
% A: adjacency matrix (could be weighted)
% method: 'personalized-pagerank' or 'self-diffusion'
% aux: auxiliary parameters, such as max number of iterations and
% restart probability
%
% [Output]
% Q: diffusion state matrix. i-th column represents the diffusion
% state of the i-th node.
%
function ... |
github | yanweifu/diffusion-component-analysis-master | load_network.m | .m | diffusion-component-analysis-master/code/load_network.m | 523 | utf_8 | 00acb0a1ac3c90783c2180342e70a958 | %
%
%
function [A g] = load_network(net_prefix, is_sparse)
[g1,g2,s] = textread([net_prefix, '_adjacency.txt'], '%d%d%f');
g = textread([net_prefix, '_genes.txt'], '%s');
n = length(g);
A = sparse(g1,g2,s,n,n);
is_sym = isequal(A,A');
fprintf('Symmetric? %d\n', is_sym);
if ~is_sym
A = A + A';
end
if ~exist('is_s... |
github | yanweifu/diffusion-component-analysis-master | evaluate_performance.m | .m | diffusion-component-analysis-master/code/evaluate_performance.m | 1,132 | utf_8 | 4987e61501812a4e9aa7edd19d1bbcee | % Evaluate prediction performance.
%
% [Input]
% class_score: (# test case) x (# class) matrix of predicted class scores.
% Higher number represents higher confidence.
% label: (# test case) x (# class) matrix of ground truth annotations.
% Note each case can have multiple labels
%
% [Output]
% acc:... |
github | yanweifu/diffusion-component-analysis-master | function_pred_MV.m | .m | diffusion-component-analysis-master/code/function_pred_MV.m | 1,936 | utf_8 | 97df77a300a6041f738b9a3c513f0ba4 | % mips_level: 1, 2, or 3.
% D: n x n matrix, pairwise distances of n genes
% genes: n x 1 cell array, gene symbols in the same order as D
% nrepeat: scalar, number of repetitions of cross-validation
%
function [acc, f1] = function_pred_MV(mips_level, D, genes, nrepeat, nvote)
if ~exist('nrepeat','var')
nrepeat =... |
github | anushagj/VANET-Mobility-master | VANET_mobility.m | .m | VANET-Mobility-master/VANET Mobilty/VANET_mobility.m | 21,946 | utf_8 | 5f1d11f28177dd1a65436baf2fbac9f3 | function VANET_mobility
% Parameters for the simulations
% Safety distance (Ds) = 10 meters
% Vehicle speed Smin = 50 miles/hour = 22.35 meters/second, Smax = 70
% miles/hour = 31.29 meters/second
% Vehicle acceletation = a_min= 0 meters/seconds2, a_max = +(-) 5 meters/seconds2
% Road Traffic Volume = vol = 3000 vehicl... |
github | nowaythatsok/DataHiding2014Project-master | drawregionboundaries.m | .m | DataHiding2014Project-master/project ^_^/drawregionboundaries.m | 2,313 | utf_8 | 68a378b38b821e757bb7e633d6c51377 | % DRAWREGIONBOUNDARIES Draw boundaries of labeled regions in an image
%
% Usage: maskim = drawregionboundaries(l, im, col)
%
% Arguments:
% l - Labeled image of regions.
% im - Optional image to overlay the region boundaries on.
% col - Optional colour specification. Defaults to black. No... |
github | nowaythatsok/DataHiding2014Project-master | slic.m | .m | DataHiding2014Project-master/project ^_^/slic.m | 14,817 | utf_8 | 106f0dfa3326dd340917a12ff25cea58 | % SLIC Simple Linear Iterative Clustering SuperPixels
%
% Implementation of Achanta, Shaji, Smith, Lucchi, Fua and Susstrunk's
% SLIC Superpixels
%
% Usage: [l, Am, Sp, d] = slic(im, k, m, seRadius, colopt, mw)
%
% Arguments: im - Image to be segmented.
% k - Number of desired superpixels. Note that thi... |
github | nowaythatsok/DataHiding2014Project-master | maskimage.m | .m | DataHiding2014Project-master/project ^_^/maskimage.m | 1,123 | utf_8 | 0285b1a116cf1dfc1f2bf743ba879e92 | % MASKIMAGE Apply mask to image
%
% Usage: maskedim = maskimage(im, mask, col)
%
% Arguments: im - Image to be masked
% mask - Binary masking image
% col - Value/colour to be applied to regions where mask == 1
% If im is a colour image col can be a 3-vector
% ... |
github | JumperWang/FDDL-master | soft.m | .m | FDDL-master/FDDL_Evan/utilies/soft.m | 116 | utf_8 | e1d67a6a2f0cd13a8becc63e32aee43f | % define the soft threshold function, which is used above.
function y = soft(x,tau)
y = sign(x).*max(abs(x)-tau,0); |
github | JumperWang/FDDL-master | Eigenface_f.m | .m | FDDL-master/FDDL_Evan/utilies/Eigenface_f.m | 1,518 | utf_8 | 3ba53fe6cb18d0bce74e6bcc45c56f24 | function [disc_set,disc_value,Mean_Image]=Eigenface_f(Train_SET,Eigen_NUM)
% the magnitude of eigenvalues of this function is corrected right !!!!!!!!!
% Centralized PCA
[NN,Train_NUM]=size(Train_SET);
if NN<=Train_NUM % for small sample size case
Mean_Image=mean(Train_SET,2);
Train_SET=Train_SET-Mean_Im... |
github | jaejunlee0538/matlab_ws-master | KmeansClustering.m | .m | matlab_ws-master/machine_leanrning/KMeansClustering/KmeansClustering.m | 2,570 | utf_8 | 60da45e8c7e80aff5b02c8c202108bf4 | function [ result ] = KmeansClustering( unlabeledData, K , showProgress)
%------------------------------ INPUT ------------------------------
% unlabeledData : unlabeled dataset to be clustered
% D X N
% K : Number of Clusters
% showProgress : plot how clusters change in every loops.
% ... |
github | jaejunlee0538/matlab_ws-master | dtmf_gui.m | .m | matlab_ws-master/digital_signal_processing/DTMF/dtmf_gui.m | 13,518 | utf_8 | 52928e0bf67ee045129386d3c15ad88e | function varargout = dtmf_gui(varargin)
% DTMF_GUI MATLAB code for dtmf_gui.fig
% DTMF_GUI, by itself, creates a new DTMF_GUI or raises the existing
% singleton*.
%
% H = DTMF_GUI returns the handle to a new DTMF_GUI or the handle to
% the existing singleton*.
%
% DTMF_GUI('CALLBACK',hObject,ev... |
github | kyleniemeyer/cantera-main | TestRunDisplay.m | .m | cantera-main/ext/matlab_xunit/TestRunDisplay.m | 9,772 | utf_8 | 5676f8f435e9c6ceeb16bd2b6bcdc6dd | classdef TestRunDisplay < TestRunMonitor
%TestRunDisplay Print test suite execution results.
% TestRunDisplay is a subclass of TestRunMonitor. If a TestRunDisplay
% object is passed to the run method of a TestComponent, such as a
% TestSuite or a TestCase, it will print information to the Command
% Window (or ... |
github | kyleniemeyer/cantera-main | TestSuite.m | .m | cantera-main/ext/matlab_xunit/TestSuite.m | 13,145 | utf_8 | a2f83a7c15ba0ad13fa330aa59d1451a | %TestSuite Collection of TestComponent objects
% The TestSuite class defines a collection of TestComponent objects.
%
% TestSuite methods:
% TestSuite - Constructor
% add - Add test component to test suite
% print - Display test suite summary to Comman... |
github | kyleniemeyer/cantera-main | runtests.m | .m | cantera-main/ext/matlab_xunit/runtests.m | 4,841 | utf_8 | a24f89548b654b7bf0fc9ec25be2e2f2 | function out = runtests(varargin)
%runtests Run unit tests
% runtests runs all the test cases that can be found in the current directory
% and summarizes the results in the Command Window.
%
% Test cases can be found in the following places in the current directory:
%
% * An M-file function whose name start... |
github | kyleniemeyer/cantera-main | isTestCaseSubclass.m | .m | cantera-main/ext/matlab_xunit/+xunit/+utils/isTestCaseSubclass.m | 894 | utf_8 | 5c7e3f1d9b1eb3e2148cad3cde93c5c7 | function tf = isTestCaseSubclass(name)
%isTestCaseSubclass True for name of a TestCase subclass
% tf = isTestCaseSubclass(name) returns true if the string name is the name of
% a TestCase subclass on the MATLAB path.
% Steven L. Eddins
% Copyright 2008-2009 The MathWorks, Inc.
tf = false;
class_meta = meta.c... |
github | kyleniemeyer/cantera-main | arrayToString.m | .m | cantera-main/ext/matlab_xunit/+xunit/+utils/arrayToString.m | 2,972 | utf_8 | 173fdeb3960985834f7a252c7916fa32 | function s = arrayToString(A)
%arrayToString Convert array to string for display.
% S = arrayToString(A) converts the array A into a string suitable for
% including in assertion messages. Small arrays are converted using disp(A).
% Large arrays are displayed similar to the way structure field values display
% ... |
github | kyleniemeyer/cantera-main | compareFloats.m | .m | cantera-main/ext/matlab_xunit/+xunit/+utils/compareFloats.m | 4,376 | utf_8 | f77141ccf2a6b351c309eb9be4211065 | function result = compareFloats(varargin)
%compareFloats Compare floating-point arrays using tolerance.
% result = compareFloats(A, B, compare_type, tol_type, tol, floor_tol)
% compares the floating-point arrays A and B using a tolerance. compare_type
% is either 'elementwise' or 'vector'. tol_type is either 'r... |
github | kyleniemeyer/cantera-main | CounterFlowDiffusionFlame.m | .m | cantera-main/interfaces/matlab/toolbox/1D/CounterFlowDiffusionFlame.m | 7,949 | utf_8 | 1365a758328135fbee7e6c9a58b5a0c0 | function flame = CounterFlowDiffusionFlame(left, flow, right, tp_f, tp_o, oxidizer)
% COUNTERFLOWDIFFUSIONFLAME Create a counter flow diffusion flame stack.
% flame = CounterFlowDiffusionFlame(left, flow, right, tp_f, tp_o, oxidizer)
% :param left:
% Object representing the left inlet, which must be
% created ... |
github | kyleniemeyer/cantera-main | lithium_ion_battery.m | .m | cantera-main/samples/matlab/lithium_ion_battery.m | 5,605 | utf_8 | 51e8a085356b328d59ef578aa34560a5 | % This example file calculates the cell voltage of a lithium-ion battery
% at given temperature, pressure, current, and range of state of charge (SOC).
%
% The thermodynamics are based on a graphite anode and a LiCoO2 cathode,
% modeled using the 'BinarySolutionTabulatedThermo' class.
% Further required cell parameters... |
github | kyleniemeyer/cantera-main | rankine.m | .m | cantera-main/samples/matlab/rankine.m | 1,515 | utf_8 | f4063b6735b208a636f05ae7bd2b3266 | function [work, efficiency] = rankine(t1, p2, eta_pump, eta_turbine)
%
% This example computes the efficiency of a simple vapor power cycle.
%
% Keywords: thermodynamics, thermodynamic cycle, non-ideal fluid
help rankine
% create an object representing water
w = Water;
% start with saturated liquid water at t1
set(w... |
github | kyleniemeyer/cantera-main | ignite.m | .m | cantera-main/samples/matlab/ignite.m | 2,661 | utf_8 | e601751a1d8eff006511d11e561c55fc | function plotdata = ignite(g)
% IGNITE Zero-dimensional kinetics: adiabatic, constant pressure.
%
% This example solves the same problem as 'reactor1,' but does
% it using one of MATLAB's ODE integrators, rather than using the
% Cantera Reactor class.
%
% Keywords: combustion, reactor network, ignition delay, ... |
github | noureldien/DerivativesPricing-master | calcBSImpVol.m | .m | DerivativesPricing-master/Shared/calcBSImpVol.m | 6,736 | utf_8 | 6a6ea9e7c30c1c560775f4c27b26df7e | function [sigma,C] = calcBSImpVol(cp,P,S,K,T,r,q)
%
% [sigma,C] = calcBSImpVol(cp,P,S,K,T,r,q)
%
% Calculates Black-Scholes Implied Volatility Surface for an Option Price Matrix.
% Uses Li's Rational Function Approximator for the Initial Estimate, followed by
% 3rd-Order Householder's Root Finder (i.e. using vega,vomma... |
github | kmoored/BEM-2D-Matlab-master | VanDeVooren.m | .m | BEM-2D-Matlab-master/src/geom/VanDeVooren.m | 1,389 | utf_8 | 7560921139c39e390b35258996c1927f | % Written by Keith Moored, 12/14/10
%
%
% The values set in this file are for a 15% thick Van de Vooren airfoil.
function [xt,zt,xb,zb,a,k,epsilon,theta1,theta2,theta,r1,r2] = VanDeVooren(c,npts,epsilon)
tau = 12.4*(pi/180); % Trailing edge angle. This changes with the thickness.
epsilon = 0.075; %... |
github | kmoored/BEM-2D-Matlab-master | TransformMatrix.m | .m | BEM-2D-Matlab-master/src/util/TransformMatrix.m | 537 | utf_8 | 5f738de3bca8f6bf0d45b9d9d073ea01 | % (xp, zp) -- left coordinate point for each panel.
% t -- unit vector along the panel. Running from point 1 to point 2.
% n -- unit vector normal to the panel.
% (x,z) -- point of interest.
function [Xp] = TransformMatrix(xp,zp,t,n,x,z)
K = length(xp); % K panels
N = length(x); % N points
i = res... |
github | kmoored/BEM-2D-Matlab-master | DubSorV.m | .m | BEM-2D-Matlab-master/src/util/DubSorV.m | 2,352 | utf_8 | e191f5f4dfe6008ab262269b2d57269f | % Written by Keith Moored, 12/14/10
%
%
% This code calculates the induced velocties (u,w) at a point (x,z) due to
% a source element of strength sigma located at another point (x0,z0).
function [u_s,w_s,u_d,w_d] = DubSorV(mu,sigma,x,z,xp,zp,t,n,epSC,SC)
N = length(x); % N points
K = length(xp) - 1; ... |
github | kmoored/BEM-2D-Matlab-master | fencing.m | .m | BEM-2D-Matlab-master/src/util/fencing.m | 20,384 | utf_8 | 75681dd9b3131c1a2c4c79d63caa4418 |
function [xstar_n,zstar_n,fence] = fencing(c,Vp,xpts,zpts,up,wp,xp,zp,vn,x_b,z_b,delT,epB)
N = 50;
xpts = xpts - x_b;
zpts = zpts - z_b;
xp = xp - x_b;
zp = zp - z_b;
% Defining the top and bottom surfaces
Npan = length(xp) - 1;
% Defining the outward normal vectors... |
github | kmoored/BEM-2D-Matlab-master | SkinFrictionSolver.m | .m | BEM-2D-Matlab-master/src/util/SkinFrictionSolver.m | 10,016 | utf_8 | ab15d8da682f10c724cca7a30b0963a3 | % clear
% clc
function [dFi,dL_pct,factor,xbc_sep,xtc_sep] = SkinFrictionSolver(xc,Qt,nu,rho,c,tmax,Cp,Qinf,trip)
%% Interpolating points for a more refined analysis
Npan = length(xc);
factor = ceil(150/Npan);
%% Calculating xp, zp
% [xt,zt,xb,zb] = TearDropShape(c,Npan + 1,tmax);
% NACA four series shape coeffi... |
github | kmoored/BEM-2D-Matlab-master | Phi.m | .m | BEM-2D-Matlab-master/src/util/Phi.m | 2,445 | utf_8 | 60d809792bdc42e8616592192407ab82 | % Written by Keith Moored, 12/14/10
%
%
% This code calculates the induced velocties (u,w) at a point (x,z) due to
% a source element of strength sigma located at another point (x0,z0).
function [dPhi_s,dPhi_d,dL] = Phi(mu,sigma,x,z,xp,zp,t,n)
% Points of interest P = (x,z)
% Panel endpoints Pp = (xp,zp)
farfield = 1... |
github | dantkz/CCCA-master | prep_dataset.m | .m | CCCA-master/prep_dataset.m | 20,117 | utf_8 | feb1ce11d72b3cb64b86c064f9f7759d | function prep_dataset(varargin)
if isempty(varargin)
prep_dataset_horses();
prep_dataset_elephants();
prep_dataset_cats();
prep_dataset_facades();
else
if strcmp(varargin{1}, 'horse')
prep_dataset_horses();
elseif strcmp(varargin{1}, 'elephant')
... |
github | dantkz/CCCA-master | get_visualization.m | .m | CCCA-master/get_visualization.m | 1,925 | utf_8 | 79293eeb767966c8c038fffa70036d48 | function [ res ] = get_visualization(imgvals, m, img_size, capvals, isjet, bgcolor, varargin)
if nargin<5
isjet = true;
end
if nargin<6
bgcolor = 0;
end
do_greyscale = 1;
colR = eye(3); colt = zeros(3,1);
if length(varargin)==2
if ~isempty(varargin{1}) && ~isemp... |
github | dantkz/CCCA-master | makeLMfilters.m | .m | CCCA-master/makeLMfilters.m | 2,210 | utf_8 | 753b87b3f2f3c679ff5fd7006ac762ae | %% This is a modification of
%% Matlab code that generates Leung-Malik filter bank
%% dowloaded from
%% http://www.robots.ox.ac.uk/~vgg/research/texclass/filters.html
%% References:
%% T. Leung and J. Malik.
%% "Representing and recognizing the visual appearance of materials using three-dimensional textons."
%% I... |
github | funkysprings/solving-vrp-master | AntColonyVRPGUI.m | .m | solving-vrp-master/VRP/AntColonyVRPGUI.m | 15,906 | utf_8 | 657492ffd14841b5661c24a12749a932 | function varargout = AntColonyVRPGUI(varargin)
% ANTCOLONYVRPGUI M-file for AntColonyVRPGUI.fig
% ANTCOLONYVRPGUI, by itself, creates a new ANTCOLONYVRPGUI or raises the existing
% singleton*.
%
% H = ANTCOLONYVRPGUI returns the handle to a new ANTCOLONYVRPGUI or the handle to
% the existing singlet... |
github | funkysprings/solving-vrp-master | About.m | .m | solving-vrp-master/MDVRP/About.m | 3,195 | utf_8 | b87e88e21add618651a4e21dd9212ac0 | function varargout = About(varargin)
% ABOUT M-file for About.fig
% ABOUT, by itself, creates a new ABOUT or raises the existing
% singleton*.
%
% H = ABOUT returns the handle to a new ABOUT or the handle to
% the existing singleton*.
%
% ABOUT('CALLBACK',hObject,eventData,handles,...) calls th... |
github | funkysprings/solving-vrp-master | correl_VRP.m | .m | solving-vrp-master/VRP_Statistic/correl_VRP.m | 2,283 | utf_8 | 3e6ff247650e3aadfe330fa091db1bee | function correl_VRP
clc
stats = getStats; %get data
params = struct('name',{'e','alpha','beta','tau0'}); %description of parameters
perms = [1 2;1 3;1 4;
2 1;2 3;2 4;
3 1;3 2;3 4;
4 1;4 2;4 3];%all permutations
disp('_________________Correlation Relations_____... |
github | funkysprings/solving-vrp-master | stats_with_markers.m | .m | solving-vrp-master/VRP_Statistic/stats_with_markers.m | 2,090 | utf_8 | 76e65a5d445669d588e9f7e1a734b447 | function stats_with_markers
stats = getStats; %get data
perms = [1 2;1 3;1 4;2 3;2 4;3 4];%all permutations
params = struct('name',{'e','alpha','beta','tau0'}); %description of parameters
colors = hsv(length(stats));
for permN = 1:length(perms(:,1))
c1 = perms(permN,1);
c2 = perms(permN,2);
figure ... |
github | funkysprings/solving-vrp-master | corcoeff_VRP.m | .m | solving-vrp-master/VRP_Statistic/corcoeff_VRP.m | 1,561 | utf_8 | c13f6dc27b75ad1f3cb5920ac005319a | function corcoeff_VRP
clc
stats = getStats; %get data
params = struct('name',{'e','alpha','beta','tau0'}); %description of parameters
perms = [1 2;1 3;1 4;
2 3;2 4;
3 4];%all permutations
disp('_________________Coefficient of Correlation__________________')
fid = fopen... |
github | kristinbranson/APT-master | pdist2.m | .m | APT-master/deepnet/matlab/pdist2.m | 5,407 | utf_8 | 952fc9c0a6b35dcc57a027af4a7ad0cd | function D = pdist2( X, Y, metric )
% Calculates the distance between sets of vectors.
%
% Let X be an m-by-p matrix representing m points in p-dimensional space
% and Y be an n-by-p matrix representing another set of points in the same
% space. This function computes the m-by-n distance matrix D where D(i,j)
% i... |
github | kristinbranson/APT-master | compute3Dfrom2DRomain.m | .m | APT-master/deepnet/matlab/compute3Dfrom2DRomain.m | 14,988 | utf_8 | 8972c0d05e8284bffa7d6359cd13f334 | function tracks = compute3Dfrom2DRomain(vscores,cRig)
% vscores should be a cell with dims TxYxXxPts
% Order of views is Left,Right and then Bottom for Romain
offx_front = 0;
offy_front = 0;
offx_side = 0;
offy_side = 0;
scale= 4;
nviews = numel(vscores);
thresh_nonmax_front = 0;
thresh_nonmax_side = 0;
thresh_per... |
github | kristinbranson/APT-master | drawcov.m | .m | APT-master/deepnet/matlab/PlotReachData/drawcov.m | 144 | utf_8 | 19d5f702e3239818e950843e12254ef3 | % h = drawcov(mu,S,varargin)
function h = drawcov(mu,S,varargin)
[a,b,theta] = cov2ell(S);
h = ellipsedraw(a,b,mu(1),mu(2),theta,varargin{:});
|
github | kristinbranson/APT-master | SaveFigLotsOfWays.m | .m | APT-master/deepnet/matlab/PlotReachData/SaveFigLotsOfWays.m | 2,459 | utf_8 | 34d4e9cb2136e4bd0f8f7d97e06f8c96 | % outfilenames = SaveFigLotsOfWays(hfig,basename,[formats])
function outfilenames = SaveFigLotsOfWays(hfig,basename,formats)
if nargin < 3,
formats = {'fig','png','pdf','svg'};
end
[path,basename] = myfileparts(basename);
basename0 = basename;
outfilenames = {};
for iteri = 1:2,
if iteri == 2,
... |
github | kristinbranson/APT-master | cropsmart.m | .m | APT-master/anls/gt2sh/cropsmart.m | 1,922 | utf_8 | bd67b7ffa7d7e353d68d708027a9888d | function [roi,cjitter,rjitter] = cropsmart(imnc,imnr,roinc,roinr,...
roiCtrCol,roiCtrRow,varargin)
% Crop an roi around a given center point. Do something nondumb when the
% center is close to an edge of the image.
%
% imnr: positive integer, number of rows in image.
% imnc: " cols ".
% roinr: etc, number of rows in... |
github | kristinbranson/APT-master | movCrop.m | .m | APT-master/anls/gt2sh/movCrop.m | 4,649 | utf_8 | 332954302c9ec53dfbcf5be07e6ae5f2 | function varargout = movCrop(varargin)
% MOVCROP MATLAB code for movCrop.fig
% MOVCROP, by itself, creates a new MOVCROP or raises the existing
% singleton*.
%
% H = MOVCROP returns the handle to a new MOVCROP or the handle to
% the existing singleton*.
%
% MOVCROP('CALLBACK',hObject,eventData,... |
github | kristinbranson/APT-master | PlotExamplePredictions.m | .m | APT-master/anls/gt/PlotExamplePredictions.m | 9,277 | utf_8 | 798e6d03c47f39f6423679e71eb4e094 | function [hfigs,savenames] = PlotExamplePredictions(varargin)
[gtdata,gtimdata,nets,legendnames,ptcolors,exptype,...
conddata,labeltypes,datatypes,...
figpos,savedir,savenames,dosavefig,...
reseed,nexamples_random,nexamples_disagree,...
ms,lw,textcolor,lObj,errnets,doAlignCoordSystem] = myparse(varargin,'gtdat... |
github | kristinbranson/APT-master | PlotFracInliers.m | .m | APT-master/anls/gt/PlotFracInliers.m | 7,902 | utf_8 | e885199a7ccc92e4f03f858940f655af | function [hfig,savename,sortederrs] = PlotFracInliers(varargin)
[sortederrs,gtdata,nets,legendnames,colors,exptype,...
conddata,labeltypes,datatypes,statname,...
maxerr,minerr,...
hfig,figpos,savedir,savename,dosavefig,prcs,maxprc,...
annoterrdata,annotcolor,annoterrprc,plotannfracinliers,APthresh,xscale,...
... |
github | kristinbranson/APT-master | ComputeOKSPrecisionTable.m | .m | APT-master/anls/gt/ComputeOKSPrecisionTable.m | 6,133 | utf_8 | f58b1f4ab222de25c17388afd3c99f3c | function [kappa,apk,ap,meanoks,savename] = ComputeOKSPrecisionTable(gtdata,varargin)
[kappadistname,apvals,meanapvals,nets,legendnames,colors,exptype,...
conddata,labeltypes,datatypes,...
pttypes,annoterrdata,...
savedir,savename,dosavefig,...
threshmethod,threshprctile,...
dormoutliers,nremove] = myparse(va... |
github | kristinbranson/APT-master | TuneOKSKappa.m | .m | APT-master/anls/gt/TuneOKSKappa.m | 4,158 | utf_8 | 5480d8f36395aab6e7ae4a7c61179e02 | function [kappa,errs,areas,hfig] = TuneOKSKappa(annoterrdata,varargin)
hfig = [];
[fn,doareanorm,dormoutliers,nremove,pttypes,doplot,distname] = ...
myparse(varargin,'fieldname','intra','doareanorm',false,'dormoutliers',false,'nremove',0,...
'pttypes',{},'doplot',false,'distname','gamma2');
npts = size(annoterrda... |
github | kristinbranson/APT-master | PlotSortedWorstLandmarkError.m | .m | APT-master/anls/gt/PlotSortedWorstLandmarkError.m | 5,242 | utf_8 | 086a6db7465c5e9216019b07c4170ac1 | function [hfig,savename,sortederrs] = PlotSortedWorstLandmarkError(varargin)
[sortederrs,gtdata,nets,legendnames,colors,exptype,...
conddata,labeltypes,datatypes,statname,...
minerr,maxerr,...
hfig,figpos,savedir,savename,dosavefig,prcs,maxprc,...
annoterrdata,annotcolor,annoterrprc] = myparse(varargin,'sorted... |
github | kristinbranson/APT-master | ComputePixelPrecisionTable.m | .m | APT-master/anls/gt/ComputePixelPrecisionTable.m | 8,989 | utf_8 | c645c89b3d2ee3b2706407f8146d5fc7 | function [tbls,medmindist,kvals,savename] = ComputePixelPrecisionTable(gtdata,varargin)
[kfracs,nets,legendnames,colors,exptype,...
conddata,labeltypes,datatypes,...
pttypes,annoterrdata,...
savedir,savename,dosavefig,...
threshmethod,threshprctile,modeli,...
kvals] = myparse(varargin,'kfracs',.25:.25:2,...
... |
github | kristinbranson/APT-master | drawcov.m | .m | APT-master/anls/PlotReachData/drawcov.m | 144 | utf_8 | 19d5f702e3239818e950843e12254ef3 | % h = drawcov(mu,S,varargin)
function h = drawcov(mu,S,varargin)
[a,b,theta] = cov2ell(S);
h = ellipsedraw(a,b,mu(1),mu(2),theta,varargin{:});
|
github | kristinbranson/APT-master | SaveFigLotsOfWays.m | .m | APT-master/anls/PlotReachData/SaveFigLotsOfWays.m | 2,459 | utf_8 | 34d4e9cb2136e4bd0f8f7d97e06f8c96 | % outfilenames = SaveFigLotsOfWays(hfig,basename,[formats])
function outfilenames = SaveFigLotsOfWays(hfig,basename,formats)
if nargin < 3,
formats = {'fig','png','pdf','svg'};
end
[path,basename] = myfileparts(basename);
basename0 = basename;
outfilenames = {};
for iteri = 1:2,
if iteri == 2,
... |
github | kristinbranson/APT-master | savepgm.m | .m | APT-master/external/CameraCalibrationToolbox/savepgm.m | 447 | utf_8 | b8fe9ed33cbd68ea4b83271b431e3667 | %SAVEPGM Write a PGM format file
%
% SAVEPGM(filename, im)
%
% Saves the specified image array in a binary (P5) format PGM image file.
%
% SEE ALSO: loadpgm
%
% Copyright (c) Peter Corke, 1999 Machine Vision Toolbox for Matlab
% Peter Corke 1994
function savepgm(fname, im)
fid = fopen(fname, 'w');
[r,c] = size(... |
github | kristinbranson/APT-master | ginput4.m | .m | APT-master/external/CameraCalibrationToolbox/ginput4.m | 7,121 | utf_8 | 1d7231b0daed3533514a77f79f4e096a | function [out1,out2,out3] = ginput4(arg1)
[out1,out2,out3] = ginput(arg1);
return;
%GINPUT Graphical input from mouse.
% [X,Y] = GINPUT(N) gets N points from the current axes and returns
% the X- and Y-coordinates in length N vectors X and Y. The cursor
% can be positioned using a mouse (or by using the Ar... |
github | kristinbranson/APT-master | loadinr.m | .m | APT-master/external/CameraCalibrationToolbox/loadinr.m | 1,029 | utf_8 | ac39329cc5acba186f4c5ef4c62f3a33 | %LOADINR Load an INRIMAGE format file
%
% LOADINR(filename, im)
%
% Load an INRIA image format file and return it as a matrix
%
% SEE ALSO: saveinr
%
% Copyright (c) Peter Corke, 1999 Machine Vision Toolbox for Matlab
% Peter Corke 1996
function im = loadinr(fname, im)
fid = fopen(fname, 'r');
s = fgets(fid);
... |
github | kristinbranson/APT-master | saveppm.m | .m | APT-master/external/CameraCalibrationToolbox/saveppm.m | 722 | utf_8 | 9904ad3d075a120ca32bd9c10e019512 | %SAVEPPM Write a PPM format file
%
% SAVEPPM(filename, I)
%
% Saves the specified red, green and blue planes in a binary (P6)
% format PPM image file.
%
% SEE ALSO: loadppm
%
% Copyright (c) Peter Corke, 1999 Machine Vision Toolbox for Matlab
% Peter Corke 1994
function saveppm(fname, I)
I = double(I);
if size(I,... |
github | kristinbranson/APT-master | ginput3.m | .m | APT-master/external/CameraCalibrationToolbox/ginput3.m | 6,344 | utf_8 | 1cc27af57f9872f05bbf0d9b8a0fdbc9 | function [out1,out2,out3] = ginput2(arg1)
%GINPUT Graphical input from mouse.
% [X,Y] = GINPUT(N) gets N points from the current axes and returns
% the X- and Y-coordinates in length N vectors X and Y. The cursor
% can be positioned using a mouse (or by using the Arrow Keys on some
% systems). Data points a... |
github | kristinbranson/APT-master | ginput2.m | .m | APT-master/external/CameraCalibrationToolbox/ginput2.m | 6,105 | utf_8 | 983a72db9a079ba54ab084149ced6ae9 | function [out1,out2,out3] = ginput2(arg1)
%GINPUT Graphical input from mouse.
% [X,Y] = GINPUT(N) gets N points from the current axes and returns
% the X- and Y-coordinates in length N vectors X and Y. The cursor
% can be positioned using a mouse (or by using the Arrow Keys on some
% systems). Data points a... |
github | kristinbranson/APT-master | loadppm.m | .m | APT-master/external/CameraCalibrationToolbox/loadppm.m | 2,355 | utf_8 | c8d750733c522f56f3aa17a4ca9f9df1 | %LOADPPM Load a PPM image
%
% I = loadppm(filename)
%
% Returns a matrix containing the image loaded from the PPM format
% file filename. Handles ASCII (P3) and binary (P6) PPM file formats.
%
% If the filename has no extension, and open fails, a '.ppm' and
% '.pnm' extension will be tried.
%
% SEE ALSO: saveppm loadp... |
github | kristinbranson/APT-master | saveinr.m | .m | APT-master/external/CameraCalibrationToolbox/saveinr.m | 949 | utf_8 | a18df4fba021be006842fbc35166bc23 | %SAVEINR Write an INRIMAGE format file
%
% SAVEINR(filename, im)
%
% Saves the specified image array in a INRIA image format file.
%
% SEE ALSO: loadinr
%
% Copyright (c) Peter Corke, 1999 Machine Vision Toolbox for Matlab
% Peter Corke 1996
function saveinr(fname, im)
fid = fopen(fname, 'w');
[r,c] = size(im');
... |
github | kristinbranson/APT-master | stereo_gui.m | .m | APT-master/external/CameraCalibrationToolbox/stereo_gui.m | 6,208 | utf_8 | 6cc48675fdf9c8c36bc147da7d046d06 | % stereo_gui
% Stereo Camera Calibration Toolbox (two cameras, internal and external calibration):
%
% It is assumed that the two cameras (left and right) have been calibrated with the pattern at the same 3D locations, and the same points
% on the pattern (select the same grid points). Therefore, in particular, the sam... |
github | kristinbranson/APT-master | loadpgm.m | .m | APT-master/external/CameraCalibrationToolbox/loadpgm.m | 1,838 | utf_8 | 6ec18330c2633d5519c72eb2e6fe963b | %LOADPGM Load a PGM image
%
% I = loadpgm(filename)
%
% Returns a matrix containing the image loaded from the PGM format
% file filename. Handles ASCII (P2) and binary (P5) PGM file formats.
%
% If the filename has no extension, and open fails, a '.pgm' will
% be appended.
%
%
% Copyright (c) Peter Corke, 1999 Machin... |
github | kristinbranson/APT-master | savefig_pa.m | .m | APT-master/external/JAABA/misc/savefig_pa.m | 10,976 | utf_8 | 345eaaedde1e53b97f79819b8cb8306e | function savefig_pa(fname, varargin)
% Usage: savefig(filename, fighdl, format, options)
%
% Saves a pdf, eps, png, jpeg, and/or tiff of the contents of the fighandle's (or current) figure.
% It saves an eps of the figure and the uses Ghostscript to convert to the other formats.
% The result is a cropped, clean pictu... |
github | kristinbranson/APT-master | mvnpdf_2d.m | .m | APT-master/external/JAABA/misc/mvnpdf_2d.m | 546 | utf_8 | ea10fa6489a4d13c5cb84fbdeea0f5ec | % mvnpdf_2d(x,mu,S)
% x is 2 x n
% mu is 2 x n
% S is 2 x 2 n
% mvnpdf : |2*pi*S|^(-1/2) * exp( -1/2 * (x-mu)'*inv(S)*(x-mu) )
function p = mvnpdf_2d(x,mu,S)
[d,n] = size(x);
assert(d==2);
[d1,n1] = size(mu);
assert(((n1==1) || (n1==n)) && d1 <= 2);
[d1,d2,n2] = size(S);
assert(((n2==1) || (n2==n)) && d1 == 2 && d2 =... |
github | kristinbranson/APT-master | onedim2interval.m | .m | APT-master/external/JAABA/misc/onedim2interval.m | 2,637 | utf_8 | 73bae6a1a73557750cf670297081ba56 | % inputs:
% x is the N x 1 matrix of N unidimensional data points
% l is the N x 1 matrix of N corresponding labels, where l(i) can
% be either -1 or 1
% thresh is the best threshold such that almost everything on one
% side of the threshold is of one class and almost of everything on
% the other side is the other clas... |
github | kristinbranson/APT-master | onedim2class.m | .m | APT-master/external/JAABA/misc/onedim2class.m | 3,640 | utf_8 | fa44adfcc308625b5d284686fac1e35f | % [thresh,lower,cost] = onedim2class(x,l,costmatrix,weights,lower)
% inputs:
% x is the N x 1 matrix of N unidimensional data points
% l is the N x 1 matrix of N corresponding labels, where l(i) can
% be either -1 or 1
% thresh is the best threshold such that almost everything on one
% side of the threshold is of one c... |
github | kristinbranson/APT-master | drawcov.m | .m | APT-master/external/JAABA/misc/drawcov.m | 569 | utf_8 | eabf1ed9fdd8afdc2c8d2c5e988b5f3a | % h = drawcov(mu,S)
function varargout = drawcov(varargin)
if isstruct(varargin{1}),
mu = varargin{1}.centres;
S = varargin{1}.covars;
rest = varargin(2:end);
else
mu = varargin{1};
S = varargin{2};
rest = varargin(3:end);
end;
K = size(mu,1);
hv = ishold;
hold on;
colors = 'rgb';
h = zeros(1,K);
for k = ... |
github | kristinbranson/APT-master | montage.m | .m | APT-master/external/JAABA/misc/montage.m | 3,478 | utf_8 | ff3e983210b0cbde16dc07bc558acb79 | function [h,b] = montage(varargin)
%MONTAGE Display multiple image frames as rectangular montage.
% MONTAGE displays all the frames of a multiframe image array in a single
% image object, arranging the frames so that they roughly form a square.
%
% MONTAGE(I) displays the K frames of the intensity image array I. ... |
github | kristinbranson/APT-master | saveaseps.m | .m | APT-master/external/JAABA/misc/saveaseps.m | 451 | utf_8 | b2de2317fb1da3a8d8c5325992f7613e | % saveaspdf(fig,filename)
function saveaseps(varargin)
if nargin < 1,
error('Usage: saveaseps(fig,filename)');
end
if ischar(varargin{1}),
fig = gcf;
filename = varargin{1};
args = varargin(2:end);
elseif nargin < 2,
error('Usage: saveaseps(fig,filename)');
else
fig = varargin{1};
filename = varargin{2}... |
github | kristinbranson/APT-master | myfileparts.m | .m | APT-master/external/JAABA/misc/myfileparts.m | 682 | utf_8 | f6935c74667583de4f448c5a1c8c2478 | % [path, fname, extension] = myfileparts(name)
% [path, fname] = myfileparts(name)
% Same as fileparts, except that:
% if name ends with a filesep, the fname will be the last part of the path
% and
% if extension output is not specified, then extension will not be removed
% from file name.
function varargout = ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.