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 | sachinkariyattin/HWCR-master | lines.m | .m | HWCR-master/training_set/lines.m | 929 | utf_8 | f2533cd60f1c615d6c94dbf8144e31d4 | function [fl re]=lines(im_texto)
% Divide text in lines
% im_texto->input image; fl->first line; re->remain line
% Example:
% im_texto=imread('TEST_3.jpg');
% [fl re]=lines(im_texto);
% subplot(3,1,1);imshow(im_texto);title('INPUT IMAGE')
% subplot(3,1,2);imshow(fl);title('FIRST LINE')
% subplot(3,1,3);imshow(re);title... |
github | sachinkariyattin/HWCR-master | aboutus.m | .m | HWCR-master/training_set/aboutus.m | 3,075 | utf_8 | 89a681f703de1f311fcb588aac89ebf4 | function varargout = aboutus(varargin)
% ABOUTUS MATLAB code for aboutus.fig
% ABOUTUS, by itself, creates a new ABOUTUS or raises the existing
% singleton*.
%
% H = ABOUTUS returns the handle to a new ABOUTUS or the handle to
% the existing singleton*.
%
% ABOUTUS('CALLBACK',hObject,eventData,... |
github | sachinkariyattin/HWCR-master | interface.m | .m | HWCR-master/training_set/interface.m | 15,538 | utf_8 | 36ddb7f0d0ad93cd63bef2c73c8365fa |
function varargout = interface(varargin)
% INTERFACE MATLAB code for interface.fig
% INTERFACE, by itself, creates a new INTERFACE or raises the existing
% singleton*.
%
% H = INTERFACE returns the handle to a new INTERFACE or the handle to
% the existing singleton*.
%
% INTERFACE('CALLBACK',... |
github | sachinkariyattin/HWCR-master | del_pixel.m | .m | HWCR-master/training_set/feature_extraction/feature_extraction/feature_extraction/del_pixel.m | 317 | utf_8 | 33506a47ccbde34353446758bbec5d67 | % this func del_pixel(pixel,set) deletes the given pixel from the set;
function modified_set=del_pixel(pixel,set)
i=1;
while i<=size(set,1)
if(pixel==set(i,:))
temp1=set(1:i-1,:);
temp2=set((i+1):end,:);
set=[temp1;temp2];
i=1;
else
i=i+1;
end
end
modified_set=set; |
github | sachinkariyattin/HWCR-master | starter_intersection.m | .m | HWCR-master/training_set/feature_extraction/feature_extraction/feature_extraction/starter_intersection.m | 8,675 | utf_8 | 5252fa0709bdf630071b4a0f42136c79 | % this file should help me giving every starters and intersections in the
% input.
% this contains a very inefficient (too bad !!!!) piece of code that finds
% all the starter points in the current image. Starter points are those
% with only one neighbour. The problem is that the code below checks all
% pixels in the g... |
github | sachinkariyattin/HWCR-master | ismymember.m | .m | HWCR-master/training_set/feature_extraction/feature_extraction/feature_extraction/ismymember.m | 208 | utf_8 | eb4f377fa6da202f3adafca67c1f4301 | % func ismymember() cheks whether pixel is a element of given set
% chek doc for isnotmember for more info
function result=ismymember(pixel,set);
if isnotmember(pixel,set)
result=0;
else
result=1;
end |
github | sachinkariyattin/HWCR-master | isnotmember.m | .m | HWCR-master/training_set/feature_extraction/feature_extraction/feature_extraction/isnotmember.m | 192 | utf_8 | 6e31acbaa15fd040ec350ca039f5b1a5 | % This function tests whether pixel is in the given set
function result=isnotmember(pixel,set)
result=1;
for i=1:size(set,1)
if pixel==set(i,:)
result=0;
break;
end
end |
github | sachinkariyattin/HWCR-master | findneighbours.m | .m | HWCR-master/training_set/feature_extraction/feature_extraction/feature_extraction/findneighbours.m | 855 | utf_8 | 48f45e325444b7ed364459918c79eaf7 | % this function will be taking a image and the co-ordinates of the central pixel will be given.
% It should return co-ordinates of all the neighbours of the central pixel
% with value as 1.
function [neighbours]=findneighbours(image,coords)
imwindow=image((coords(1)-1):(coords(1)+1),(coords(2)-1):(coords(2)+1));
neighb... |
github | sachinkariyattin/HWCR-master | feature_extractor_2d.m | .m | HWCR-master/training_set/feature_extraction/feature_extraction/feature_extraction/feature_extractor_2d.m | 4,686 | utf_8 | 4020efc8f06fb8bcc99a9cd94a9528bb | % this function is supposed to extract features from the input image
%% this function divides the image into 1x3 zone and then extracts the
%% features then it divides into 3x1 zone and then extracts the features
function [features]=feature_extractor_2d(image);
% this function zones the input image
% and extracts featu... |
github | sachinkariyattin/HWCR-master | finddirection.m | .m | HWCR-master/training_set/feature_extraction/feature_extraction/feature_extraction/finddirection.m | 743 | utf_8 | ffdef66d3fa16b5141083831a3d01502 | % the function finddirection takes two pixel coordinates as arguments
% returns the direction of the second pixel with respect to first
% considering the first pixel as the centre pixel.The numbering is in
% clockwise direction. The pixel below central pixel is numbered as 1 and
% the rest are numbered in clockwise dir... |
github | sachinkariyattin/HWCR-master | feature_extractor.m | .m | HWCR-master/training_set/feature_extraction/feature_extraction/feature_extraction/feature_extractor.m | 4,791 | utf_8 | 3c0de558f570aa1d2eb9ad7482e65097 | % this function is supposed to extract features from the input image
function [features]=feature_extractor(image);
% this function zones the input image
% and extracts features for each zone.
%% preprocessing of image
if length(size(image))>2 % checking if rgb image;
image=rgb2gray(image);
image=im2bw(imag... |
github | sachinkariyattin/HWCR-master | linesegmenter.m | .m | HWCR-master/training_set/feature_extraction/feature_extraction/feature_extraction/linesegmenter.m | 15,240 | utf_8 | f3ecf96607de2800b92a44adc66c73b9 | % This file should help me in distinguishing individual line segments
% The work in this code is based on a paper 'A novel feature extraction
% technique for the recognition of segmented handwritten characters' by
% Blumenstein, Verma and H.Basli. ( See section 2.3.2)
%% features to be added
% currently if there are ... |
github | sachinkariyattin/HWCR-master | lineclassifier.m | .m | HWCR-master/training_set/feature_extraction/feature_extraction/feature_extraction/lineclassifier.m | 7,476 | utf_8 | 7b226f70e140db30afa2032c544f3e47 | % this function should give me the no and type of line segments in a given
% input
function [featurevector]=lineclassifier(image)
% input will be a image
% the output will contain a 9 element feature vector whose elements are
% 1. The number of horizontal lines, 2.The total length of horizontal lines,
%3. The number of... |
github | sachinkariyattin/HWCR-master | isnotintersection.m | .m | HWCR-master/training_set/feature_extraction/feature_extraction/feature_extraction/isnotintersection.m | 192 | utf_8 | 6e31acbaa15fd040ec350ca039f5b1a5 | % This function tests whether pixel is in the given set
function result=isnotmember(pixel,set)
result=1;
for i=1:size(set,1)
if pixel==set(i,:)
result=0;
break;
end
end |
github | neurospin/spmmouse-master | spmmouse.m | .m | spmmouse-master/spmmouse.m | 33,585 | utf_8 | 07c79082f6e7d38d6554bb4d602ba0ce | function spmmouse(varargin)
%SPMMouse - toolbox for SPM for animal brains
%Stephen Sawiak - http://www.wbic.cam.ac.uk/~sjs80/spmmouse.html
global defaults
global spmmouseset
if isempty(defaults)
spm('PET');
return;
end
if isempty(spmmouseset)
spm_defaults;
initspmmous... |
github | neurospin/spmmouse-master | spm_affreg.m | .m | spmmouse-master/replaced/spm_affreg.m | 18,981 | utf_8 | 8e33ea4f87a42b20ccc38b0c00291507 | function [M,scal] = spm_affreg(VG,VF,flags,M,scal)
% Affine registration using least squares.
% FORMAT [M,scal] = spm_affreg(VG,VF,flags,M0,scal0)
%
% VG - Vector of template volumes.
% VF - Source volume.
% flags - a structure containing various options. The fields are:
% WG - Weig... |
github | neurospin/spmmouse-master | spm_jobman.m | .m | spmmouse-master/replaced/spm_jobman.m | 97,784 | utf_8 | 31fe9dbfc695e07887ac350122fdabcd | function varargout = spm_jobman(varargin)
% UI/Batching stuff
%_______________________________________________________________________
% This code is based on an earlier version by Philippe Ciuciu and
% Guillaume Flandin of Orsay, France.
%
% FORMAT spm_jobman
% spm_jobman('interactive')
% spm_jobman('int... |
github | neurospin/spmmouse-master | spm_image.m | .m | spmmouse-master/replaced/spm_image.m | 21,654 | utf_8 | ffff0bb34bf26b341a56bea3e8f3799c | function spm_image(op,varargin)
% image and header display
% FORMAT spm_image
%_______________________________________________________________________
%
% spm_image is an interactive facility that allows orthogonal sections
% from an image volume to be displayed. Clicking the cursor on either
% of the three images mov... |
github | neurospin/spmmouse-master | spm_config_preproc.m | .m | spmmouse-master/replaced/spm_config_preproc.m | 27,224 | utf_8 | 2da3f0da86d50fc325f7c78f4a5626da | function job = spm_config_preproc
% Configuration file for Segment jobs
%_______________________________________________________________________
% Copyright (C) 2005 Wellcome Department of Imaging Neuroscience
% John Ashburner
% $Id: spm_config_preproc.m 1032 2007-12-20 14:45:55Z john $
%____________________________... |
github | neurospin/spmmouse-master | spm_preproc.m | .m | spmmouse-master/replaced/spm_preproc.m | 21,442 | utf_8 | 98734ea9fc8ad2429ed2cd38ed64786f | function results = spm_preproc(varargin)
% Combined Segmentation and Spatial Normalisation
%
% FORMAT results = spm_preproc(V,opts)
% V - image to work with
% opts - options
% opts.tpm - n prior probability images for each class
% opts.ngaus - number of Gaussians per class (n+1 classes)
% opts.warpreg - w... |
github | neurospin/spmmouse-master | spm_orthviews.m | .m | spmmouse-master/replaced/spm_orthviews.m | 60,880 | utf_8 | e98d7ffde1b2aca577af56199c3637f7 | function varargout = spm_orthviews(action,varargin)
% Display Orthogonal Views of a Normalized Image
% FORMAT H = spm_orthviews('Image',filename[,position])
% filename - name of image to display
% area - position of image
% - area(1) - position x
% - area(2) - position y
% - area... |
github | neurospin/spmmouse-master | spm_maff.m | .m | spmmouse-master/replaced/spm_maff.m | 13,262 | utf_8 | b6a98c919cbd4cc1e8b1e3edd2c99af0 | function [M,h] = spm_maff(varargin)
% Affine registration to MNI space using mutual information
% FORMAT M = spm_maff
% FORMAT M = spm_maff(V)
% FORMAT M = spm_maff(V,opts)
% V - image filename/handle
% opts - a structure containing optional fields
% M - starting estimate
% tpm - filenames... |
github | neurospin/spmmouse-master | spm_project_gen.m | .m | spmmouse-master/replaced/spm_project_gen.m | 2,860 | utf_8 | 32e15ff15f01833798169cec15d5bbb3 | % spm project gen
function out = spm_project_gen(v, l, dim, dmipdims)
% this was a mex file but this should be fast enough without, will try it.
% forms maximium intensity projections - a compiled routine
% FORMAT spm_project(X,L,dims)
% X - a matrix of voxel values
% L - a matrix of locations in Talairach et Tourno... |
github | neurospin/spmmouse-master | spm_segment.m | .m | spmmouse-master/replaced/spm_segment.m | 24,520 | utf_8 | 73fdd84c649292573a4a26cc91c354f5 | function [VO,M] = spm_segment(VF,PG,flags)
% Segment an MR image into Gray, White & CSF.
%
% FORMAT VO = spm_segment(PF,PG,flags)
% PF - name(s) of image(s) to segment (must have same dimensions).
% PG - name(s) of template image(s) for realignment.
% - or a 4x4 transformation matrix which maps from the ima... |
github | chsasank/MIP-master | myRadonTransformLowResolution.m | .m | MIP-master/HW1/q1/myRadonTransformLowResolution.m | 648 | utf_8 | b270df1302fdccc7da3318b83921c5cc | <<<<<<< HEAD
function [R1] = myRadonTransformLowResolution(inputIm,deltaS)
t=-90:5:90;
theta=0:5:175;
m=length(t);
n=length(theta);
R1=zeros(m,n);
h = waitbar(0,'please wait..');
for i=1:m
for j=1:n
R1(i,j)=myIntegration(t(i),theta(j),inputIm,deltaS);
end
waitbar(i/m);
end
close(h);
en... |
github | chsasank/MIP-master | myRadonTransform.m | .m | MIP-master/HW1/q1/myRadonTransform.m | 622 | utf_8 | d884698a1072660d2ceaa56cf9ab3879 | <<<<<<< HEAD
function [R1] = myRadonTransform(inputIm,deltaS)
t=-90:1:90;
theta=0:5:175;
m=length(t);
n=length(theta);
R1=zeros(m,n);
h = waitbar(0,'please wait..');
for i=1:m
for j=1:n
R1(i,j)=myIntegration(t(i),theta(j),inputIm,deltaS);
end
waitbar(i/m);
end
close(h);
end
=======
... |
github | chsasank/MIP-master | myIntegration.m | .m | MIP-master/HW1/q1/myIntegration.m | 1,439 | utf_8 | 8302a97d8baf8e1fb3b75072d74587fc | <<<<<<< HEAD
function [ R2 ] = myIntegration(t,theta,inputIm,deltaS)
if theta==0
sMin=-64;
sMax=63;
elseif theta>0 && theta<90
sMin=ceil(max((t*cosd(theta)-63)/sind(theta),(-64-t*sind(theta))/cosd(theta)));
sMax=floor(min((t*cosd(theta)+64)/sind(theta),(63-t*sind(theta))/cosd(theta)));
elseif thet... |
github | qianwan/lsas_mmse-master | Hungarian.m | .m | lsas_mmse-master/Hungarian.m | 9,328 | utf_8 | 51e60bc9f1f362bfdc0b4f6d67c44e80 | function [Matching,Cost] = Hungarian(Perf)
%
% [MATCHING,COST] = Hungarian_New(WEIGHTS)
%
% A function for finding a minimum edge weight matching given a MxN Edge
% weight matrix WEIGHTS using the Hungarian Algorithm.
%
% An edge weight of Inf indicates that the pair of vertices given by its
% position have no... |
github | dandanJing/DTMB2.0-master | multipath_new.m | .m | DTMB2.0-master/TX_DTMB2/multipath_new.m | 4,233 | utf_8 | de35372087a75a77b3549bbe22eac856 | %function: multipath channel model with ideal low pass filtering and M-times oversampling
%mp_mode: Medium-Echo Static (1--6); Violence-Echo Static (7--10); Brazil Static (11--15); dvb-t rayleigh/rician (16--17)
%unit_delay: Ts=1/Fs
%M: oversampling factor
%updated by kewu peng on 2008-07-24
function h = multipath_new(... |
github | uci-cbcl/Rainfall-master | calcErrorsMulti.m | .m | Rainfall-master/zach/calcErrorsMulti.m | 3,316 | utf_8 | 11ae46f5589132321ab95ce1a7f6a843 | % INPUTS
% p is probability of each class predicted by the model - Nxc
% y is Nx1 class labels in 1:c
% w is weights of each data point - default: ones
% DOES NOT DO WEIGHTING ON ROC MEASURE
%OUTPUTS
% dev - deviance; -2*log likelihood
% confusionMat - if number classes == 2, this is rocArea, otherwise:
% nClass x n... |
github | uci-cbcl/Rainfall-master | boostTreeFun.m | .m | Rainfall-master/zach/boostTreeFun.m | 809 | utf_8 | 9f0ace313f26cc95b0bfcd5042dc9a6a | % for use with BoostMulti or BoostLS
function [f,fTest,tree] = boostTreeFun(X,XTest,z,w,wtrimind,prevfuns,randfor,J)
if ~exist('randfor','var')
randfor = 0.01;
end
if ~exist('J','var')
J=6;
end
isUINT8 = isa(X,'uint8');
if isUINT8
tree = fitTreeUINT8(X,z,w,wtrimind,randfor,J);
else
tree = treefit(X,z,'w... |
github | uci-cbcl/Rainfall-master | dataGMM.m | .m | Rainfall-master/zach/dataGMM.m | 1,182 | utf_8 | 501416976ecac9fdd13e52af857f43a0 | function [X Z] = dataGMM(N,C,d)
% [X Z] = dataGMM(N, C, D) : sample data from a Gaussian mixture model
% Draws N data xi from a mixture of Gaussians, with C clusters in D dimensions
% Optional output Z indicates which cluster each xi was drawn from
if (nargin<3) d=2; end;
%if (nargin<2) end;
%pi = random('Gamma',... |
github | uci-cbcl/Rainfall-master | fitTreeUINT8.m | .m | Rainfall-master/zach/fitTreeUINT8.m | 3,139 | utf_8 | 01f43a56296fd40b80bb060fa051e62b | % J is the number of leaf nodes in the tree
% <= goes to the left, > goes to the right
function tree = fitTreeUINT8(X,y,w,wTrim,candVarsParam,J)
assert(isa(X,'uint8'),isa(w,'double'));
wy=w.*y;
wwy = [w(:) wy(:)]';
wy2 = wy.*y;
% WEIGHT TRIMMING NOT IMPLEMENTED
f = [];
[N,p] = size(X);
candVars = treeCandVars(candVars... |
github | uci-cbcl/Rainfall-master | treeCandVars.m | .m | Rainfall-master/zach/treeCandVars.m | 672 | utf_8 | 8216748243d15bf4dd3ad39b41f335c3 | % takes candVars and returns absolute candVars
% efficient implementation.
function candVars = treeCandVars(candVars,p,toUINT32)
if numel(candVars)==1 && candVars<1
if candVars>=0.25
r=randperm(p); candVars=r(1:ceil(candVars*end));
else
%candVars=ceil(p*rand(1,ceil(p*candVars))); % candVars is ... |
github | uci-cbcl/Rainfall-master | calcErrors.m | .m | Rainfall-master/zach/calcErrors.m | 2,154 | utf_8 | 76db7c21d7b0502aea8218aff744f4e2 | % INPUTS
% p1 is probability of class 1 predicted by model
% y is true 0-1 class labels of same size as predProb
% w is weights of each data point - default: ones
% DOES NOT DO WEIGHTING ON ROC MEASURE
%OUTPUTS
% dev - deviance; -2*log likelihood
% roc - area under ROC curve
% acc - accuracy with 0.5 split point
% mse... |
github | uci-cbcl/Rainfall-master | BoostLS.m | .m | Rainfall-master/zach/BoostLS.m | 3,008 | utf_8 | 36728feb16391082e635c0c68bf6ae87 | % funfitval takes in: X,XTest,z,w,wTrimInd,prevfuns,args{:}
% and returns newfun,f,fTest, f,ftest are newfun evaluated on X,XTest
% args: struct
% nIter: how many boost iter to do
% v: "learn rate": 0.25 is good
% funargs: to be passed to funfitval
% evaliter: which iter to eval performance at
%... |
github | uci-cbcl/Rainfall-master | boostMulti.m | .m | Rainfall-master/zach/boostMulti.m | 6,107 | utf_8 | 91899aa05e3855402589dfd9d465945f | % IMPLEMENTS MULTI CLASS LOGIT BOOST WITH ARBITRARY BASE LEARNER.
%
%
% funfitval takes in: X,XTest,z,w,wtrimind,prevfuns,args{:}
% and returns newfun,f,fTest, f,ftest are newfun evaluated on X,XTest
% args: struct
% nIter: how many boost iter to do
% v: "learn rate": 0.25 is good
% funargs: to be pas... |
github | uci-cbcl/Rainfall-master | display.m | .m | Rainfall-master/zach/@logisticClassify/display.m | 189 | utf_8 | 6c31ce607a2fe92b33c56097035a7a67 | % display function, print out coefficients
function display(obj)
fprintf('Logistic Regression Object; %d classes, %d features\n',length(obj.classes),size(obj.wts,2)-1);
disp(obj.wts);
|
github | uci-cbcl/Rainfall-master | predictSoft.m | .m | Rainfall-master/zach/@logisticClassify/predictSoft.m | 177 | utf_8 | a36f86cd1ae08b6c50223159befaf1a0 | % perform "soft" prediction on Xtest (predicts real-valued #s)
% function YteSoft = predictSoft(obj,Xte)
function YteSoft = predictSoft(obj,Xte)
YteSoft = logistic(obj,Xte);
|
github | uci-cbcl/Rainfall-master | train.m | .m | Rainfall-master/zach/@nnetRegress/train.m | 6,153 | utf_8 | d31960e655e7d76c7db608fbe0ea1205 | function obj = train(obj, Xtr, Ytr, stepsize, tolerance, maxSteps, init)
% obj = train(obj, Xtrain, Ytrain, stepsize, tolerance, maxSteps, init)
% Xtrain = [n x d] training data features (constant feature not included)
% Ytrain = [n x 1] training data classes
% stepsize = step size for gradient descent (de... |
github | uci-cbcl/Rainfall-master | predictSoft.m | .m | Rainfall-master/zach/@gaussBayesClassify/predictSoft.m | 1,226 | utf_8 | 3f02da5bfe3139ad599b107aaefe0720 | function p = predictSoft(obj,Xte)
% Prob = predictSoft(obj,Xtest) : make "soft" predictions on test data with the classifier
[m n] = size(Xte);
C = length(obj.classes);
p = zeros(m,C);
for c=1:C, % compute probabilities for each class by Bayes rule
p(:,c) = obj.probs(c) * eval... |
github | uci-cbcl/Rainfall-master | mse.m | .m | Rainfall-master/zach/@nnetClassify/mse.m | 173 | utf_8 | b47380e9309249b13030025253672364 | % err = mse(obj, X,Y) : compute the mean squared error of predictor "obj" on test data (X,Y)
function e = mse(obj,Xte,Yte)
e = mseK(obj,Xte,to1ofK(Yte));
end
|
github | uci-cbcl/Rainfall-master | mseK.m | .m | Rainfall-master/zach/@nnetClassify/mseK.m | 198 | utf_8 | 5d67a394718ae6c0568ae38d0a603323 | % err = mseK(obj, X,Y) : compute the mean squared error of predictor; assumes Y is 1-of-K
function e = mseK(obj,Xte,Yte)
e = mean( sum( (Yte - predictSoft(obj,Xte)).^2 ,2) ,1);
end
|
github | uci-cbcl/Rainfall-master | errK.m | .m | Rainfall-master/zach/@nnetClassify/errK.m | 203 | utf_8 | 6d593a4774fed34a8acb49fc6f7af744 | % e = errK(obj, Xtest, Ytest) : compute misclassification error; assumes Ytest is 1-of-K
function e = errK(obj, Xte, Yte)
Yhat = predict(obj, Xte);
e = mean( Yhat ~= from1ofK(Yte,obj.classes) );
end
|
github | uci-cbcl/Rainfall-master | loglikelihood.m | .m | Rainfall-master/zach/@nnetClassify/loglikelihood.m | 219 | utf_8 | ade8d3a562dbb47607072ba2d68ccf28 | % err = loglikelihood(obj, X,Y) : compute the empirical avg log likelihood of "obj" on test data (X,Y)
function e = loglikelihood(obj,Xte,Yte)
e = mean( sum( log(predictSoft(obj,Xte).^Yte) ,2) ,1);
end
|
github | uci-cbcl/Rainfall-master | train.m | .m | Rainfall-master/zach/@nnetClassify/train.m | 5,980 | utf_8 | ba20c8992768d2cbc3f41484273f0cc0 | function obj = train(obj, Xtr, Ytr, stepsize, tolerance, maxSteps, init)
% obj = train(obj, Xtrain, Ytrain, stepsize, tolerance, maxSteps, init)
% Xtrain = [n x d] training data features (constant feature not included)
% Ytrain = [n x 1] training data classes
% stepsize = step size for gradient descent (de... |
github | uci-cbcl/Rainfall-master | predict.m | .m | Rainfall-master/zach/@treeRegress/predict.m | 440 | utf_8 | ee9868c256dd7b19b5307c5dd2b8cea6 | function Yte = predict(obj,Xte)
% Y = predict(tree, X) : make predictions on data X
Yte = dectreeTest(Xte, obj.L,obj.R,obj.F,obj.T, 1);
function yhat = dectreeTest(data, L,R,F,T, pos)
yhat=zeros(size(data,1),1);
if (F(pos)==0) yhat(:)=T(pos);
else
goLeft = data(:,F(pos)) < T(pos);
yhat(goLeft) = d... |
github | uci-cbcl/Rainfall-master | train.m | .m | Rainfall-master/zach/@treeRegress/train.m | 3,782 | utf_8 | 126811bb839215bea99d8a2ee9316836 | function obj=train(obj, X,Y, varargin)
% Train random forest classification tree
% obj=train(obj, X,Y, ...)
% Optional args:
% 'minParent',<int>: minimum # of data required to split a node
% 'maxDepth',<int>: maximum depth of the decision tree
% 'minScore',<dbl>: minimum value of the score improvement to split ... |
github | uci-cbcl/Rainfall-master | predict.m | .m | Rainfall-master/zach/@treeClassify/predict.m | 459 | utf_8 | e90baa9dff3ea0f03d8657997f0d5e30 | function Yte = predict(obj,Xte)
% Yhat = predict(obj, X) : make predictions on test data X
Yte = dectreeTest(Xte, obj.L,obj.R,obj.F,obj.T, 1);
Yte = obj.classes(Yte);
function yhat = dectreeTest(X, L,R,F,T, pos)
yhat=zeros(size(X,1),1);
if (F(pos)==0) yhat(:)=T(pos);
else
goLeft = X(:,F(pos)) < T(po... |
github | uci-cbcl/Rainfall-master | train.m | .m | Rainfall-master/zach/@treeClassify/train.m | 5,022 | utf_8 | f56840437670a4e1c779c322cb9a8ebb | function obj=train(obj, X,Y, varargin)
% Train random forest classification tree
% obj=train(obj, X,Y, ...)
% Optional args:
% 'minParent',<int>: minimum # of data required to split a node
% 'maxDepth',<int>: maximum depth of the decision tree
% 'minScore',<dbl>: minimum value of the score improvement to spli... |
github | openworm/tracker-commons-master | minimal_c.m | .m | tracker-commons-master/src/octave/wrappers/test-octave-exceptions/minimal_c.m | 263 | utf_8 | e1f328d5692a54dd129ebea47d4f43da | c_exception
function print_and_continue()
disp("Caught Exception: "),disp(lasterror.message)
endfunction
try
c_exception.foo()
catch
print_and_continue()
end_try_catch
try
c_exception.bar()
catch
print_and_continue()
end_try_catch
c_exception.foo()
|
github | openworm/tracker-commons-master | minimal_cpp.m | .m | tracker-commons-master/src/octave/wrappers/test-octave-exceptions/minimal_cpp.m | 652 | utf_8 | 98fec741af04a36fa37b46dd6b964589 | minimal_exception
function check_lasterror(expected)
if (!strcmp(lasterror.message, expected))
# Take account of older versions prefixing with "error: " and adding a newline at the end
if (!strcmp(regexprep(lasterror.message, 'error: (.*)\n$', '$1'), expected))
error(["Bad exception order. Expected: \"... |
github | openworm/tracker-commons-master | exception_order_runme.m | .m | tracker-commons-master/src/octave/wrappers/test-octave-exceptions/exception_order_runme.m | 895 | utf_8 | 50e4b70b3b7b13afcfa6fa08249a3f36 | exception_order
function check_lasterror(expected)
if (!strcmp(lasterror.message, expected))
# Take account of older versions prefixing with "error: " and adding a newline at the end
if (!strcmp(regexprep(lasterror.message, 'error: (.*)\n$', '$1'), expected))
error(["Bad exception order. Expected: \"",... |
github | openworm/tracker-commons-master | save.m | .m | tracker-commons-master/src/Matlab/+wcon/@dataset/save.m | 2,632 | utf_8 | b02549fbfc267dc1bf61c340a9e75457 | function save(obj,file_path)
%
% Save is currently implemented by converting all objects to structs
% and then calling libjson. Eventually this should be changed for better
% performance ...
%
%Round trip issues:
%------------------
%1) Array of objects or a singular object
%
% "prop":{} or "prop":[{}] => both... |
github | openworm/tracker-commons-master | savejson.m | .m | tracker-commons-master/src/Matlab/+wcon/+utils/savejson.m | 19,272 | utf_8 | 34a0e9c6f9a54914acb405ab12dde219 | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | openworm/tracker-commons-master | TestfRMField.m | .m | tracker-commons-master/src/Matlab/+wcon/+utils/fex/TestfRMField.m | 10,987 | utf_8 | 883ea8b7d2284f05a71bfce3062cb2a1 | function TestfRMField(doSpeed)
% Automatic test: fRMField
% This is a routine for automatic testing. It is not needed for processing and
% can be deleted or moved to a folder, where it does not bother.
%
% TestfRMField(doSpeed)
% INPUT:
% doSpeed: Optional logical flag to trigger time consuming speed tests.
% ... |
github | openworm/tracker-commons-master | processVarargin.m | .m | tracker-commons-master/src/Matlab/+wcon/+sl/+in/processVarargin.m | 6,432 | utf_8 | d7c7ea5a899d507b903abe1ab132a1cd | function [in,extras] = processVarargin(in,v,varargin)
%processVarargin Processes varargin and overrides defaults
%
% Function to override default options.
%
% [in,extras] = sl.in.processVarargin(in,v,varargin)
%
% Inputs:
% -------
% in : structure containing default values that may be overridden
% ... |
github | openworm/tracker-commons-master | datenum8601.m | .m | tracker-commons-master/src/Matlab/+wcon/+sl/+datetime/datenum8601.m | 10,076 | utf_8 | f3963c7ff4bef8d009f8ffc7d1e17a80 | function [DtN,Spl,TkC] = datenum8601(Str,Tok)
% Convert an ISO 8601 formatted Date String (timestamp) to a Serial Date Number.
%
% (c) 2015 Stephen Cobeldick
%
% ### Function ###
%
% Syntax:
% DtN = datenum8601(Str)
% DtN = datenum8601(Str,Tok)
% [DtN,Spl,TkC] = datenum8601(...)
%
% By default the functi... |
github | openworm/tracker-commons-master | base.m | .m | tracker-commons-master/src/Matlab/tests/+wcon_tests/+tracker_commons/@base/base.m | 897 | utf_8 | ad2eaff0c8017b44487c5f673cc8cdbd | classdef base
%
% Class
% wcon_tests.tracker_commons.base
%
% See Also
% --------
% wcon_tests.tracker_commons
properties
root_path
end
methods
function obj = base(parent)
obj.root_path = parent.root_path;
end
functi... |
github | SemRoCo/qpOASES-master | make.m | .m | qpOASES-master/interfaces/simulink/make.m | 8,452 | utf_8 | a8efccfa552a55026cb9596c8806b55c | function [] = make( varargin )
%MAKE Compiles the Simulink interface of qpOASES.
%
%Type make to compile all interfaces that
% have been modified,
%type make clean to delete all compiled interfaces,
%type make clean all to first delete and then compile
% ... |
github | SemRoCo/qpOASES-master | qpOASES_options.m | .m | qpOASES-master/interfaces/octave/qpOASES_options.m | 10,357 | utf_8 | f4676c178ac23389cbe6a19d89f60fb1 | %qpOASES -- An Implementation of the Online Active Set Strategy.
%Copyright (C) 2007-2015 by Hans Joachim Ferreau, Andreas Potschka,
%Christian Kirches et al. All rights reserved.
%
%qpOASES is distributed under the terms of the
%GNU Lesser General Public License 2.1 in the hope that it will be
%useful, but WITHOUT ANY... |
github | SemRoCo/qpOASES-master | make.m | .m | qpOASES-master/interfaces/octave/make.m | 8,327 | utf_8 | 6c5c7ae9a674f3f1023e9c53b9051fc2 | function [] = make( varargin )
%MAKE Compiles the octave interface of qpOASES.
%
%Type make to compile all interfaces that
% have been modified,
%type make clean to delete all compiled interfaces,
%type make clean all to first delete and then compile
% ... |
github | SemRoCo/qpOASES-master | qpOASES_auxInput.m | .m | qpOASES-master/interfaces/octave/qpOASES_auxInput.m | 4,436 | utf_8 | 97652f7208f989e1af4467fce8498bd8 | %qpOASES -- An Implementation of the Online Active Set Strategy.
%Copyright (C) 2007-2015 by Hans Joachim Ferreau, Andreas Potschka,
%Christian Kirches et al. All rights reserved.
%
%qpOASES is distributed under the terms of the
%GNU Lesser General Public License 2.1 in the hope that it will be
%useful, but WITHOUT ANY... |
github | SemRoCo/qpOASES-master | qpOASES_options.m | .m | qpOASES-master/interfaces/matlab/qpOASES_options.m | 10,357 | utf_8 | f4676c178ac23389cbe6a19d89f60fb1 | %qpOASES -- An Implementation of the Online Active Set Strategy.
%Copyright (C) 2007-2015 by Hans Joachim Ferreau, Andreas Potschka,
%Christian Kirches et al. All rights reserved.
%
%qpOASES is distributed under the terms of the
%GNU Lesser General Public License 2.1 in the hope that it will be
%useful, but WITHOUT ANY... |
github | SemRoCo/qpOASES-master | make.m | .m | qpOASES-master/interfaces/matlab/make.m | 8,220 | utf_8 | 4bbf8fc48a0c11e3ef48dd262157eb7f | function [] = make( varargin )
%MAKE Compiles the Matlab interface of qpOASES.
%
%Type make to compile all interfaces that
% have been modified,
%type make clean to delete all compiled interfaces,
%type make clean all to first delete and then compile
% ... |
github | SemRoCo/qpOASES-master | qpOASES_auxInput.m | .m | qpOASES-master/interfaces/matlab/qpOASES_auxInput.m | 4,436 | utf_8 | 97652f7208f989e1af4467fce8498bd8 | %qpOASES -- An Implementation of the Online Active Set Strategy.
%Copyright (C) 2007-2015 by Hans Joachim Ferreau, Andreas Potschka,
%Christian Kirches et al. All rights reserved.
%
%qpOASES is distributed under the terms of the
%GNU Lesser General Public License 2.1 in the hope that it will be
%useful, but WITHOUT ANY... |
github | SemRoCo/qpOASES-master | runAllTests.m | .m | qpOASES-master/testing/matlab/runAllTests.m | 5,548 | utf_8 | a7bc62fc4ff95cf20f1d7c316d05e16d | function [ successFlag ] = runAllTests( doPrint )
if ( nargin < 1 )
doPrint = 0;
end
successFlag = 1;
curWarnLevel = warning;
warning('off');
% add sub-folders to Matlab path
setupTestingPaths();
clc;
%% run interface tests
fprintf(... |
github | SemRoCo/qpOASES-master | runInterfaceTest.m | .m | qpOASES-master/testing/matlab/tests/runInterfaceTest.m | 16,774 | utf_8 | 695fea461f4e440770b787dcafe361d2 | function [ successFlag ] = runInterfaceTest( nV,nC, doPrint,seed )
if ( nargin < 4 )
seed = 42;
if ( nargin < 3 )
doPrint = 1;
if ( nargin < 2 )
nC = 10;
if ( nargin < 1 )
nV = 5;
end
... |
github | SemRoCo/qpOASES-master | runRandomZeroHessian.m | .m | qpOASES-master/testing/matlab/tests/runRandomZeroHessian.m | 14,399 | utf_8 | 62c1efb1adf03ca9009d830d211f3ef8 | function [ successFlag ] = runRandomZeroHessian( nV,nC, doPrint,seed )
if ( nargin < 4 )
seed = 42;
if ( nargin < 3 )
doPrint = 1;
if ( nargin < 2 )
nC = 10;
if ( nargin < 1 )
nV = 5;
end
... |
github | SemRoCo/qpOASES-master | runInterfaceSeqTest.m | .m | qpOASES-master/testing/matlab/tests/runInterfaceSeqTest.m | 15,458 | utf_8 | 7fd12067642b559d3dd08130be565119 | function [ successFlag ] = runInterfaceSeqTest( nV,nC, doPrint,seed )
if ( nargin < 4 )
seed = 42;
if ( nargin < 3 )
doPrint = 1;
if ( nargin < 2 )
nC = 10;
if ( nargin < 1 )
nV = 5;
end
... |
github | SemRoCo/qpOASES-master | runRandomIdHessian.m | .m | qpOASES-master/testing/matlab/tests/runRandomIdHessian.m | 14,687 | utf_8 | 1bf0849e7175e73709bbae55057eeff5 | function [ successFlag ] = runRandomIdHessian( nV,nC, doPrint,seed )
if ( nargin < 4 )
seed = 42;
if ( nargin < 3 )
doPrint = 1;
if ( nargin < 2 )
nC = 10;
if ( nargin < 1 )
nV = 5;
end
... |
github | SemRoCo/qpOASES-master | isoctave.m | .m | qpOASES-master/testing/matlab/auxFiles/isoctave.m | 508 | utf_8 | c857dec2b164c5835c0d5235cd7ad8f0 |
% ISOCTAVE True if the operating environment is octave.
% Usage: t=isoctave();
%
% Returns 1 if the operating environment is octave, otherwise
% 0 (Matlab)
%
% ---------------------------------------------------------------
function t=isoctave()
%ISOCTAVE True if the operating environment is octave.
% U... |
github | OpenGridMap/pgis-master | transform.m | .m | pgis-master/resources/matlab/transform.m | 18,681 | utf_8 | 4b6ea4cfeb2b41ca9b99aa4c38201baa | function transform()
diary logs;
try
slCharacterEncoding('UTF-8')
destdir = './models/';
fprintf('Parsing cim model ...')
% simplify cim model to be better readable by MATLAB
system(['sh preparsescript.sh ',destdir,'/cim_pretty.xml ',destdir,'/matcim.xml'])
% ree... |
github | OpenGridMap/pgis-master | xml_read.m | .m | pgis-master/resources/matlab/xml_read.m | 23,858 | utf_8 | d68b7e27ad197bc94b445c3a833b9f23 | function [tree, RootName, DOMnode] = xml_read(xmlfile, Pref)
%XML_READ reads xml files and converts them into Matlab's struct tree.
%
% DESCRIPTION
% tree = xml_read(xmlfile) reads 'xmlfile' into data structure 'tree'
%
% tree = xml_read(xmlfile, Pref) reads 'xmlfile' into data structure 'tree'
% according to your pref... |
github | KMikalsen/TTK4135-Helikopterlab-master | matlab2tikz.m | .m | TTK4135-Helikopterlab-master/Rapport/plots/matlab2tikz.m | 228,343 | utf_8 | f02dd0c10aca3bebe50920de57998d36 | function matlab2tikz(varargin)
%MATLAB2TIKZ Save figure in native LaTeX (TikZ/Pgfplots).
% MATLAB2TIKZ() saves the current figure as LaTeX file.
% MATLAB2TIKZ comes with several options that can be combined at will.
%
% MATLAB2TIKZ(FILENAME,...) or MATLAB2TIKZ('filename',FILENAME,...)
% stores the LaTeX code... |
github | KMikalsen/TTK4135-Helikopterlab-master | figure2dot.m | .m | TTK4135-Helikopterlab-master/Rapport/plots/figure2dot.m | 5,034 | windows_1250 | eb9eb8e933bf48ddec4adb6c9a9d21ba | function figure2dot(filename)
%FIGURE2DOT Save figure in Graphviz (.dot) file.
% FIGURE2DOT() saves the current figure as dot-file.
%
% Copyright (c) 2008--2014, Nico Schlömer <nico.schloemer@gmail.com>
% All rights reserved.
%
% Redistribution and use in source and binary forms, with or without
% modific... |
github | KMikalsen/TTK4135-Helikopterlab-master | m2tInputParser.m | .m | TTK4135-Helikopterlab-master/Rapport/plots/m2tInputParser.m | 9,321 | windows_1250 | cb0bfe25e4baa11d5c8b65d4d6c2c5ca | function parser = m2tInputParser()
%MATLAB2TIKZINPUTPARSER Input parsing for matlab2tikz..
% This implementation exists because Octave is lacking one.
% Copyright (c) 2008--2014 Nico Schlömer
% All rights reserved.
%
% Redistribution and use in source and binary forms, with or without
% modification, are p... |
github | KMikalsen/TTK4135-Helikopterlab-master | cleanfigure.m | .m | TTK4135-Helikopterlab-master/Rapport/plots/cleanfigure.m | 18,172 | windows_1250 | efaf9f664d0ee99054078152a52a7d16 | function cleanfigure(varargin)
% CLEANFIGURE() removes the unnecessary objects from your MATLAB plot
% to give you a better experience with matlab2tikz.
% CLEANFIGURE comes with several options that can be combined at will.
%
% CLEANFIGURE('handle',HANDLE,...) explicitly specifies the
% handle of the figure t... |
github | alexalex222/My-MATLAB-Tooboxes-master | cond_indep_fisher_z.m | .m | My-MATLAB-Tooboxes-master/KalmanAll/KPMstats/cond_indep_fisher_z.m | 3,647 | utf_8 | e3291330222ba7b37c56cc824decff44 | function [CI, r, p] = cond_indep_fisher_z(X, Y, S, C, N, alpha)
% COND_INDEP_FISHER_Z Test if X indep Y given Z using Fisher's Z test
% CI = cond_indep_fisher_z(X, Y, S, C, N, alpha)
%
% C is the covariance (or correlation) matrix
% N is the sample size
% alpha is the significance level (default: 0.05)
%
% See p133 of ... |
github | alexalex222/My-MATLAB-Tooboxes-master | logistK.m | .m | My-MATLAB-Tooboxes-master/KalmanAll/KPMstats/logistK.m | 7,253 | utf_8 | 9539c8105ebca14d632373f5f9f4b70d | function [beta,post,lli] = logistK(x,y,w,beta)
% [beta,post,lli] = logistK(x,y,beta,w)
%
% k-class logistic regression with optional sample weights
%
% k = number of classes
% n = number of samples
% d = dimensionality of samples
%
% INPUT
% x dxn matrix of n input column vectors
% y kxn vector of class assignment... |
github | alexalex222/My-MATLAB-Tooboxes-master | multipdf.m | .m | My-MATLAB-Tooboxes-master/KalmanAll/KPMstats/multipdf.m | 1,192 | utf_8 | 1fce56db4c9a59d35960bd25df11b1f9 | function p = multipdf(x,theta)
%MULTIPDF Multinomial probability density function.
% p = multipdf(x,theta) returns the probabilities of
% vector x, under the multinomial distribution
% with parameter vector theta.
%
% Author: David Ross
%--------------------------------------------------------
% Check the arg... |
github | alexalex222/My-MATLAB-Tooboxes-master | subv2ind.m | .m | My-MATLAB-Tooboxes-master/KalmanAll/KPMtools/subv2ind.m | 1,574 | utf_8 | e85d0bab88fc0d35b803436fa1dc0e15 | function ndx = subv2ind(siz, subv)
% SUBV2IND Like the built-in sub2ind, but the subscripts are given as row vectors.
% ind = subv2ind(siz,subv)
%
% siz can be a row or column vector of size d.
% subv should be a collection of N row vectors of size d.
% ind will be of size N * 1.
%
% Example:
% subv = [1 1 1;
% ... |
github | alexalex222/My-MATLAB-Tooboxes-master | zipload.m | .m | My-MATLAB-Tooboxes-master/KalmanAll/KPMtools/zipload.m | 1,611 | utf_8 | 67412c21b14bebb640784443e9e3bbd8 | %ZIPLOAD Load compressed data file created with ZIPSAVE
%
% [data] = zipload( filename )
% filename: string variable that contains the name of the
% compressed file (do not include '.zip' extension)
% Use only with files created with 'zipsave'
% pkzip25.exe has to be in the matlab path. This file is a compression ut... |
github | alexalex222/My-MATLAB-Tooboxes-master | plot_ellipse.m | .m | My-MATLAB-Tooboxes-master/KalmanAll/KPMtools/plot_ellipse.m | 507 | utf_8 | 3a27bbd5c1bdfe99983171e96789da6d | % PLOT_ELLIPSE
% h=plot_ellipse(x,y,theta,a,b)
%
% This routine plots an ellipse with centre (x,y), axis lengths a,b
% with major axis at an angle of theta radians from the horizontal.
%
% Author: P. Fieguth
% Jan. 98
%
%http://ocho.uwaterloo.ca/~pfieguth/Teaching/372/plot_ellipse.m
function h=plot_ellipse(x,... |
github | alexalex222/My-MATLAB-Tooboxes-master | bipartiteMatchingHungarian.m | .m | My-MATLAB-Tooboxes-master/KalmanAll/KPMtools/bipartiteMatchingHungarian.m | 2,593 | utf_8 | 983df7bc538a844b42427ae58d69c75b | % MATCH - Solves the weighted bipartite matching (or assignment)
% problem.
%
% Usage: a = match(C);
%
% Arguments:
% C - an m x n cost matrix; the sets are taken to be
% 1:m and 1:n; C(i, j) gives the cost of matching
% items i (of the first set) and j (of the se... |
github | alexalex222/My-MATLAB-Tooboxes-master | conf2mahal.m | .m | My-MATLAB-Tooboxes-master/KalmanAll/KPMtools/conf2mahal.m | 2,424 | utf_8 | 682226ca8c1183325f4204e0c22de0a7 | % CONF2MAHAL - Translates a confidence interval to a Mahalanobis
% distance. Consider a multivariate Gaussian
% distribution of the form
%
% p(x) = 1/sqrt((2 * pi)^d * det(C)) * exp((-1/2) * MD(x, m, inv(C)))
%
% where MD(x, m, P) is the Mahalanobis distance from x
% ... |
github | alexalex222/My-MATLAB-Tooboxes-master | plotgauss2d.m | .m | My-MATLAB-Tooboxes-master/KalmanAll/KPMtools/plotgauss2d.m | 4,119 | utf_8 | 1bf48827c7a74f224086a54411e4ac82 | function h=plotgauss2d(mu, Sigma)
% PLOTGAUSS2D Plot a 2D Gaussian as an ellipse with optional cross hairs
% h=plotgauss2(mu, Sigma)
%
h = plotcov2(mu, Sigma);
return;
%%%%%%%%%%%%%%%%%%%%%%%%
% PLOTCOV2 - Plots a covariance ellipse with major and minor axes
% for a bivariate Gaussian distribution.
%
% Us... |
github | alexalex222/My-MATLAB-Tooboxes-master | zipsave.m | .m | My-MATLAB-Tooboxes-master/KalmanAll/KPMtools/zipsave.m | 1,480 | utf_8 | cc543374345b9e369d147c452008bc36 | %ZIPSAVE Save data in compressed format
%
% zipsave( filename, data )
% filename: string variable that contains the name of the resulting
% compressed file (do not include '.zip' extension)
% pkzip25.exe has to be in the matlab path. This file is a compression utility
% made by Pkware, Inc. It can be dowloaded from... |
github | alexalex222/My-MATLAB-Tooboxes-master | matprint.m | .m | My-MATLAB-Tooboxes-master/KalmanAll/KPMtools/matprint.m | 1,020 | utf_8 | e92a96dad0e0b9f25d2fe56280ba6393 | % MATPRINT - prints a matrix with specified format string
%
% Usage: matprint(a, fmt, fid)
%
% a - Matrix to be printed.
% fmt - C style format string to use for each value.
% fid - Optional file id.
%
% Eg. matprint(a,'%3.1f') will print each entry to 1 decimal place
... |
github | alexalex222/My-MATLAB-Tooboxes-master | plotcov3.m | .m | My-MATLAB-Tooboxes-master/KalmanAll/KPMtools/plotcov3.m | 4,040 | utf_8 | 1f186acd56002148a3da006a9fc8b6a2 | % PLOTCOV3 - Plots a covariance ellipsoid with axes for a trivariate
% Gaussian distribution.
%
% Usage:
% [h, s] = plotcov3(mu, Sigma[, OPTIONS]);
%
% Inputs:
% mu - a 3 x 1 vector giving the mean of the distribution.
% Sigma - a 3 x 3 symmetric positive semi-definite matrix giving
% the... |
github | alexalex222/My-MATLAB-Tooboxes-master | exportfig.m | .m | My-MATLAB-Tooboxes-master/KalmanAll/KPMtools/exportfig.m | 30,663 | utf_8 | 838a8ee93ca6a9b6a85a90fa68976617 | function varargout = exportfig(varargin)
%EXPORTFIG Export a figure.
% EXPORTFIG(H, FILENAME) writes the figure H to FILENAME. H is
% a figure handle and FILENAME is a string that specifies the
% name of the output file.
%
% EXPORTFIG(H, FILENAME, OPTIONS) writes the figure H to FILENAME
% with options init... |
github | alexalex222/My-MATLAB-Tooboxes-master | montageKPM.m | .m | My-MATLAB-Tooboxes-master/KalmanAll/KPMtools/montageKPM.m | 2,917 | utf_8 | 3863707e80820a96eac8635dfccbbf11 | function h = montageKPM(arg)
% montageKPM is like the built-in montage, but assumes input is MxNxK or filenames
%
% Converts patches (y,x,i) into patches(y,x,1,i)
% Also, adds a black border aroudn them
if iscell(arg)
h= montageFilenames(arg);
else
nr = size(arg,1); nc = size(arg,2); Npatches = size(arg,3);
patc... |
github | alexalex222/My-MATLAB-Tooboxes-master | optimalMatching.m | .m | My-MATLAB-Tooboxes-master/KalmanAll/KPMtools/optimalMatching.m | 2,593 | utf_8 | 983df7bc538a844b42427ae58d69c75b | % MATCH - Solves the weighted bipartite matching (or assignment)
% problem.
%
% Usage: a = match(C);
%
% Arguments:
% C - an m x n cost matrix; the sets are taken to be
% 1:m and 1:n; C(i, j) gives the cost of matching
% items i (of the first set) and j (of the se... |
github | alexalex222/My-MATLAB-Tooboxes-master | plotcov2.m | .m | My-MATLAB-Tooboxes-master/KalmanAll/KPMtools/plotcov2.m | 3,013 | utf_8 | 4305f11ba0280ef8ebcad4c8a4c4013c | % PLOTCOV2 - Plots a covariance ellipse with major and minor axes
% for a bivariate Gaussian distribution.
%
% Usage:
% h = plotcov2(mu, Sigma[, OPTIONS]);
%
% Inputs:
% mu - a 2 x 1 vector giving the mean of the distribution.
% Sigma - a 2 x 2 symmetric positive semi-definite matrix giving
% ... |
github | alexalex222/My-MATLAB-Tooboxes-master | ind2subv.m | .m | My-MATLAB-Tooboxes-master/KalmanAll/KPMtools/ind2subv.m | 1,206 | utf_8 | 5c2e8689803ece8fca091e60c913809d | function sub = ind2subv(siz, ndx)
% IND2SUBV Like the built-in ind2sub, but returns the answer as a row vector.
% sub = ind2subv(siz, ndx)
%
% siz and ndx can be row or column vectors.
% sub will be of size length(ndx) * length(siz).
%
% Example
% ind2subv([2 2 2], 1:8) returns
% [1 1 1
% 2 1 1
% ...
% 2 2 2]
% ... |
github | alexalex222/My-MATLAB-Tooboxes-master | process_options.m | .m | My-MATLAB-Tooboxes-master/KalmanAll/KPMtools/process_options.m | 4,394 | utf_8 | 483b50d27e3bdb68fd2903a0cab9df44 | % PROCESS_OPTIONS - Processes options passed to a Matlab function.
% This function provides a simple means of
% parsing attribute-value options. Each option is
% named by a unique string and is given a default
% value.
%
% Usage: [var1, var2, ...... |
github | alexalex222/My-MATLAB-Tooboxes-master | nonmaxsup.m | .m | My-MATLAB-Tooboxes-master/KalmanAll/KPMtools/nonmaxsup.m | 1,708 | utf_8 | ad451680a9d414f907da2969e0809c22 | % NONMAXSUP - Non-maximal Suppression
%
% Usage: cim = nonmaxsup(im, radius)
%
% Arguments:
% im - image to be processed.
% radius - radius of region considered in non-maximal
% suppression (optional). Typical values to use might
% be 1-3. Default i... |
github | alexalex222/My-MATLAB-Tooboxes-master | learn_kalman.m | .m | My-MATLAB-Tooboxes-master/KalmanAll/Kalman/learn_kalman.m | 5,515 | utf_8 | d0a3eadd7f797f9383d3eaa4c716787b | function [A, C, Q, R, initx, initV, LL] = ...
learn_kalman(data, A, C, Q, R, initx, initV, max_iter, diagQ, diagR, ARmode, constr_fun, varargin)
% LEARN_KALMAN Find the ML parameters of a stochastic Linear Dynamical System using EM.
%
% [A, C, Q, R, INITX, INITV, LL] = LEARN_KALMAN(DATA, A0, C0, Q0, R0, INITX0, INI... |
github | alexalex222/My-MATLAB-Tooboxes-master | compression_phase.m | .m | My-MATLAB-Tooboxes-master/MB_VDP/compression_phase.m | 7,616 | utf_8 | 271d715048458de4befb9e7324aa794e | function data = compression_phase(data,prior,posterior,model_q_z,options,T)
K = size(posterior.m,2) - 1;
display('Compression phase.');
options.mag_factor = options.N/T;
% book keeping variables
sub_partition = cell(1,K);
member_singlets = cell(1,K);
member_clumps = cell(1,K);
... |
github | alexalex222/My-MATLAB-Tooboxes-master | delta_partial_fe.m | .m | My-MATLAB-Tooboxes-master/MB_VDP/delta_partial_fe.m | 6,880 | utf_8 | 7d9d0aa5d5a7cff399485f738af97549 | function [delta_free_energy] = delta_partial_fe(data, after_posterior, before_posterior, ...
hp_prior, before_Nc, after_Nc, insert_indices, opts)
if isfield('opts','mag_factor')
mag_factor = opts.mag_factor;
else
mag_factor = 1;
end
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.