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 | artmunich/MachineLearning-master | savejson.m | .m | MachineLearning-master/machine-learning-ex4/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | artmunich/MachineLearning-master | loadjson.m | .m | MachineLearning-master/machine-learning-ex4/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | artmunich/MachineLearning-master | loadubjson.m | .m | MachineLearning-master/machine-learning-ex4/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | artmunich/MachineLearning-master | saveubjson.m | .m | MachineLearning-master/machine-learning-ex4/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | artmunich/MachineLearning-master | submit.m | .m | MachineLearning-master/machine-learning-ex5/submit.m | 1,765 | utf_8 | b1804fe5854d9744dca981d250eda251 | function submit()
addpath('./lib');
conf.assignmentSlug = 'regularized-linear-regression-and-bias-variance';
conf.itemName = 'Regularized Linear Regression and Bias/Variance';
conf.partArrays = { ...
{ ...
'1', ...
{ 'linearRegCostFunction.m' }, ...
'Regularized Linear Regression Cost Fun... |
github | artmunich/MachineLearning-master | submitWithConfiguration.m | .m | MachineLearning-master/machine-learning-ex5/lib/submitWithConfiguration.m | 3,734 | utf_8 | 84d9a81848f6d00a7aff4f79bdbb6049 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | artmunich/MachineLearning-master | savejson.m | .m | MachineLearning-master/machine-learning-ex5/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | artmunich/MachineLearning-master | loadjson.m | .m | MachineLearning-master/machine-learning-ex5/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | artmunich/MachineLearning-master | loadubjson.m | .m | MachineLearning-master/machine-learning-ex5/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | artmunich/MachineLearning-master | saveubjson.m | .m | MachineLearning-master/machine-learning-ex5/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | artmunich/MachineLearning-master | submit.m | .m | MachineLearning-master/machine-learning-ex3/submit.m | 1,567 | utf_8 | 1dba733a05282b2db9f2284548483b81 | function submit()
addpath('./lib');
conf.assignmentSlug = 'multi-class-classification-and-neural-networks';
conf.itemName = 'Multi-class Classification and Neural Networks';
conf.partArrays = { ...
{ ...
'1', ...
{ 'lrCostFunction.m' }, ...
'Regularized Logistic Regression', ...
}, ..... |
github | artmunich/MachineLearning-master | submitWithConfiguration.m | .m | MachineLearning-master/machine-learning-ex3/lib/submitWithConfiguration.m | 3,734 | utf_8 | 84d9a81848f6d00a7aff4f79bdbb6049 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | artmunich/MachineLearning-master | savejson.m | .m | MachineLearning-master/machine-learning-ex3/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | artmunich/MachineLearning-master | loadjson.m | .m | MachineLearning-master/machine-learning-ex3/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | artmunich/MachineLearning-master | loadubjson.m | .m | MachineLearning-master/machine-learning-ex3/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | artmunich/MachineLearning-master | saveubjson.m | .m | MachineLearning-master/machine-learning-ex3/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | artmunich/MachineLearning-master | submit.m | .m | MachineLearning-master/machine-learning-ex1/submit.m | 1,876 | utf_8 | 8d1c467b830a89c187c05b121cb8fbfd | function submit()
addpath('./lib');
conf.assignmentSlug = 'linear-regression';
conf.itemName = 'Linear Regression with Multiple Variables';
conf.partArrays = { ...
{ ...
'1', ...
{ 'warmUpExercise.m' }, ...
'Warm-up Exercise', ...
}, ...
{ ...
'2', ...
{ 'computeCost.m... |
github | artmunich/MachineLearning-master | submitWithConfiguration.m | .m | MachineLearning-master/machine-learning-ex1/lib/submitWithConfiguration.m | 3,734 | utf_8 | 84d9a81848f6d00a7aff4f79bdbb6049 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | artmunich/MachineLearning-master | savejson.m | .m | MachineLearning-master/machine-learning-ex1/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | artmunich/MachineLearning-master | loadjson.m | .m | MachineLearning-master/machine-learning-ex1/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | artmunich/MachineLearning-master | loadubjson.m | .m | MachineLearning-master/machine-learning-ex1/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | artmunich/MachineLearning-master | saveubjson.m | .m | MachineLearning-master/machine-learning-ex1/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | ShenLab/network-master | MICRF.m | .m | network-master/MICRF.m | 8,682 | utf_8 | 9a3164ee4f86fbcd411b1603bce54a44 | function [out,w]=MICRF(nodefile,netfile,outputfile,pi0)
%%
% Inputs:
% nodefile: node score file with two columns: Gene and score, tab separated.
% When this is the only input, genes should be listed with GeneName. (Required)
% netfile: network speific input by users with three clolumns gene1 gene2
% ... |
github | charmgil/MLME-master | MCC_compute_gate_posterior_h_x.m | .m | MLME-master/MLME/MCC_compute_gate_posterior_h_x.m | 1,892 | utf_8 | f5c7fa4a70b4b186cea982f9619b6cb6 | function [ h_x ] = MCC_compute_gate_posterior_h_x(Experts, gate, X, Y)
global runParallel;
global num_batches;
if ~exist(num_batches, 'var') || ~exist(num_batches, 'var')
is_parallelized = false;
elseif runParallel && num_batches <= size(X,1)
is_parallelized = true;
else
is_parallelized = false;
end
if i... |
github | charmgil/MLME-master | MCTBN_compute_ECLL_ME.m | .m | MLME-master/MLME/MCTBN_compute_ECLL_ME.m | 2,156 | utf_8 | e0a09717e6fb472b3d82bd79f097004f | %LL: ECLL (Q in EM) of [X,Y]
%avg_prob: the average probability for the true labels P(yi|xi)
function [ Q ] = MCTBN_compute_ECLL_ME( Experts, gate, h_x, X, Y, is_switching )
global runParallel;
global num_batches;
if ~exist(num_batches, 'var') || ~exist(num_batches, 'var')
is_parallelized = false;
elseif runParal... |
github | charmgil/MLME-master | MCC_compute_ECLL_ME.m | .m | MLME-master/MLME/MCC_compute_ECLL_ME.m | 1,773 | utf_8 | b953e15eff99d865da4c5f462a31c506 | %LL: ECLL (Q in EM) of [X,Y]
%avg_prob: the average probability for the true labels P(yi|xi)
function [ Q ] = MCC_compute_ECLL_ME( Experts, gate, h_x, X, Y )
global runParallel;
global num_batches;
if ~exist(num_batches, 'var') || ~exist(num_batches, 'var')
is_parallelized = false;
elseif runParallel && num_batch... |
github | charmgil/MLME-master | MCTBN_learn_ME.m | .m | MLME-master/MLME/MCTBN_learn_ME.m | 5,332 | utf_8 | 44cbd95acf9c401625015daf830c3a24 | % Mixture of CTBN, EM algorithm
function [Experts, gate, gate_lambda, Q_over_time, LL_train_over_time, LL_test_over_time, t_testing] = MCTBN_learn_ME(X, Y, Experts, is_switching, X_test, Y_test, max_iter, gate_lambda )
% Configuration
is_verbose = true;
%is_learn_lambda = true;
is_init_train = false; % init_train: tr... |
github | charmgil/MLME-master | MAP_prediction_MCTBN_SA.m | .m | MLME-master/MLME/MAP_prediction_MCTBN_SA.m | 2,919 | utf_8 | 6ef427903caa6a079f6da9b056339e85 | function [Y_pred, Y_log_prob, gate_xi]= MAP_prediction_MCTBN_SA( Experts, gate, X, Y, is_switching, max_iter )
if ~exist('max_iter','var')
max_iter = 150;
end
is_verbose = false;
K = length(Experts);
n = size(X,1);
Y_log_prob = zeros(n, 1);
gate_xi = zeros(n, K);
for i = 1:n
x = X(i,:);
y = Y(i,:);
e... |
github | charmgil/MLME-master | MCTBN_compute_gate_posterior_h_x.m | .m | MLME-master/MLME/MCTBN_compute_gate_posterior_h_x.m | 1,970 | utf_8 | e636e5f15907c6d84117e334eb3ac94c | function [ h_x ] = MCTBN_compute_gate_posterior_h_x(Experts, gate, X, Y, is_switching)
global runParallel;
global num_batches;
if ~exist(num_batches, 'var') || ~exist(num_batches, 'var')
is_parallelized = false;
elseif runParallel && num_batches <= size(X,1)
is_parallelized = true;
else
is_parallelized = ... |
github | charmgil/MLME-master | MCTBN_compute_loglikelihood.m | .m | MLME-master/MLME/MCTBN_compute_loglikelihood.m | 2,366 | utf_8 | c96f3955852e429d2c548ca0b28875dc | %LL: loglikelihood of [X,Y]
%avg_prob: the average probability for the true labels P(yi|xi)
function [ LL, avg_prob, Y_log_prob ] = MCTBN_compute_loglikelihood( Experts, gate, X, Y, is_switching )
global runParallel;
global num_batches;
if ~exist(num_batches, 'var') || ~exist(num_batches, 'var')
is_parallelized =... |
github | charmgil/MLME-master | learn_gate_parameters_LBFGS.m | .m | MLME-master/MLME/learn_gate_parameters_LBFGS.m | 2,162 | utf_8 | 0f63ac52b5a5b3df1d68579e8b554631 | function [ gate ]= learn_gate_parameters_LBFGS( gate0, h_x, X, gate_lambda, max_iter )
[~, m] = size(X);
% if lambda is not set, set it to 1
if ~exist( 'gate_lambda', 'var' )
gate_lambda = 1;
end
% linearize gate0
lin_gate0 = reshape(gate0', [], 1);
% L-BFGS
options = [];
options.display = 'none';
if exist( 'ma... |
github | charmgil/MLME-master | MCC_learn_ME.m | .m | MLME-master/MLME/MCC_learn_ME.m | 5,157 | utf_8 | 66a470886fa47dcfce836a2f09ef3ca5 | % Mixture of CTBN, EM algorithm
%function [Experts, gate, gate_lambda, Q_over_time, LL_train_over_time, LL_test_over_time, t_testing] = learn_output_tree_ME(X, Y, Experts, X_test, Y_test, max_iter, gate_lambda )
function [Experts, gate, t_testing] = MCC_learn_ME( Experts, X, Y, X_test, Y_test, max_iter, gate_lambda )
... |
github | charmgil/MLME-master | MAP_prediction_MCC_SA.m | .m | MLME-master/MLME/MAP_prediction_MCC_SA.m | 2,897 | utf_8 | 6be26b34f36b411a933f849e8673db07 | function [Y_pred, Y_log_prob, gate_xi] = MAP_prediction_MCC_SA( CC, gate, X, Y, max_iter )
if ~exist('max_iter','var')
max_iter = 150;
end
is_verbose = false;
K = length(CC);
[N,d] = size(Y);
Y_pred = zeros(N, d);
Y_log_prob = zeros(N, 1);
gate_xi = zeros(N, K);
for i = 1:N
x = X(i,:);
y = Y(i,:);
ex... |
github | charmgil/MLME-master | getMeasuresMLC.m | .m | MLME-master/utils/getMeasuresMLC.m | 2,116 | utf_8 | a2b31e60af26bed64cc73a65ee834e3c | %Y: true labels, Y_pred: predicted labels, Y_log_prob: log probability of the true class
%according to the model
function [ obj ] = getMeasuresMLC( Y, Y_pred, Y_log_prob )
[N d] = size(Y);
%% Compute Exact Matching rate and Hamming
cnt = 0;
cnt2 = 0;
for i=1:N
y = Y(i,:);
y_pred = Y_pred(i,:);
if (... |
github | charmgil/MLME-master | CC_train_weighted.m | .m | MLME-master/CC/CC_train_weighted.m | 527 | utf_8 | c0a14b6db555fe10cb2ecd2891ba2551 | %% CC_train: the classifier chain model [Read et al, 2009]
function [M, P, cost] = CC_train_weighted(X_tr, Y_tr, W_tr, P)
[~,d] = size(Y_tr);
if ~exist('P','var') || isempty(P)
P = randperm(d);
end
M = cell(1, d);
cost = zeros(1, d);
for i = 1:d
%M{i} = LR_train([X_tr Y_tr(:,1:i-1)], Y_tr(:,i));
% hard-w... |
github | charmgil/MLME-master | CC_predict.m | .m | MLME-master/CC/CC_predict.m | 887 | utf_8 | b81f0ffd40c1c6a507be8967a6a85314 | %% CC_test: the classifier chain model [Read et al, 2009]
function [Y_pred, Y_log_prob, Yi_log_prob] = CC_predict(M, X, Y, P)
d = size(M,2);
n = size(X,1);
prob = zeros(n, d);
for i = 1:d
%prob(:,i) = LR_predict(M{i}, [X_ts round(prob(:,1:i-1))]);
% hardwiring
prob(:,P(i)) = LR_predict(M{i}, [X round(prob... |
github | charmgil/MLME-master | CCs2_train_weighted.m | .m | MLME-master/CC/CCs2_train_weighted.m | 1,359 | utf_8 | eab64c669705d1b3e804c7a63f9f2cb7 | %% CC_train: the classifier chain model [Read et al, 2009]
function [M, P, cost] = CCs2_train_weighted(X_tr, Y_tr, W_tr)
is_profiling = true;
[N, d] = size(Y_tr);
% learn (or generate) chain order
%P=perm(d);
%P=1:d;
P = zeros(1,d);
if is_profiling, t1 = clock; end;
% 3-folds internal cross validation
k = 3;
ind... |
github | charmgil/MLME-master | evaluate_probability.m | .m | MLME-master/CTBN/evaluate_probability.m | 422 | utf_8 | 46d99bb3dd49ff1841373d34ee3628ae | %T is the tree (orgnaized in breadth-first fashion), Y is the assignment to compute it probability
function [ log_prob ] = evaluate_probability( T, Y )
log_prob=0;
for i=1:length(T)
y_val=Y(T{i}.node);
if(isempty(T{i}.parent))
log_prob=log_prob+T{i}.log_potential(y_val+1);
else
y_parent_va... |
github | charmgil/MLME-master | compute_loglikelihood.m | .m | MLME-master/CTBN/compute_loglikelihood.m | 573 | utf_8 | 8cc4e75bf319df58b252acab064802b2 | %LL: loglikelihood of [X,Y]
%avg_prob: the average probability for the true labels P(yi|xi)
function [ LL, avg_prob, prob ] = compute_loglikelihood( T, X, Y, is_switching )
% param set
if ~exist('is_switching', 'var');
is_switching = true;
end
% init
LL = 0;
sum_prob = 0;
prob = [];
n = size(X, 1);
% proc
for i ... |
github | charmgil/MLME-master | learn_weighted_structure.m | .m | MLME-master/CTBN/learn_weighted_structure.m | 3,745 | utf_8 | a036a9d9a4779609785a8c5a381cd7f2 | function T = learn_weighted_structure( X, Y, W, prev_T, is_switching )
% param setting
if ~exist('is_switching', 'var');
is_switching = true;
end
is_profiling = false;
% init
[N, d] = size(Y);
W = W/N;
% proc
if is_profiling, t1 = clock; end;
%3-folds cross validation
K=3;
%rand('seed',1);
indices = crossvalind(... |
github | charmgil/MLME-master | maxsum_forest.m | .m | MLME-master/CTBN/maxsum_forest.m | 7,004 | utf_8 | 980db79dbcfdfbfd1e2998b3fdab8ed7 | % maxsum_forest: returns the joint assignment with the highest probability
% (wrapper for maxsum_tree)
function [ assn logprob ] = maxsum_forest( T )
% options
is_verbose = false;
% init
n_nodes = size(T, 2);
% traverse + examine T
lookup = nan(n_nodes, 1); % node# -> cell_index lookup table
max_node_i = -1;
for i... |
github | charmgil/MLME-master | compute_crossvalidation_loglikelihood_sw.m | .m | MLME-master/CTBN/compute_crossvalidation_loglikelihood_sw.m | 2,947 | utf_8 | d0c6cd57b0d4f9791f5766ef02d4af55 | %compute the likelihood of LR which learns from X to Y on the
%Crossvalidation splits in indices
function [ LL ] = compute_crossvalidation_loglikelihood_sw( X, Y, Y_parent, indices, k)
%save time
learn_cost=false;
for i=1:k
index_validation = find(indices==i);
index_train = find(indices~=i);
Y_train=Y(... |
github | charmgil/MLME-master | compute_crossvalidation_loglikelihood_sw_weighted.m | .m | MLME-master/CTBN/compute_crossvalidation_loglikelihood_sw_weighted.m | 3,295 | utf_8 | 9e85dd45cf03e7bc9daadccbeeb00d83 | %compute the likelihood of LR which learns from X to Y on the
%Crossvalidation splits in indices
function [ LL ] = compute_crossvalidation_loglikelihood_sw_weighted( X, Y, Y_parent, W, indices, k)
%save time
learn_cost=false;
%init
N = size(X,1);
for i=1:k
index_validation = find(indices==i);
index_train = f... |
github | charmgil/MLME-master | compute_crossvalidation_loglikelihood.m | .m | MLME-master/CTBN/compute_crossvalidation_loglikelihood.m | 636 | utf_8 | 7273bf3c8d9495cc91f3672ac1e7f579 | %compute the likelihood of LR which learns from X to Y on the
%Crossvalidation splits in indices
function [ LL ] = compute_crossvalidation_loglikelihood( X, Y, indices, k)
%save time
learn_cost=false;
for i=1:k
index_validation = find(indices==i);
index_train = find(indices~=i);
Y_train=Y(index_train);... |
github | charmgil/MLME-master | search_tree.m | .m | MLME-master/CTBN/tree/search_tree.m | 213 | utf_8 | dc5cecfb5fe22268a99374c9159bba62 | %search the tree for node n, return -1 if not found
function [ idx ] = search_tree( n, T )
%search the tree for the node
idx=-1;
for i=1:length(T)
if(T{i}.node==n)
idx=i;
break;
end
end
|
github | charmgil/MLME-master | check_cycle.m | .m | MLME-master/CTBN/tree/check_cycle.m | 522 | utf_8 | bc191d2aa6a2c9bb920db48ef9a3e439 | %check if node "from" can be reached from node "to": meaning there is a
%cycle
function [ err ] = check_cycle( T, to, from)
%do a BFS starting from node to, if we encounter node from, then there is a
%cycle
err=false;
[ idx ] = search_tree( to, T );
%BFS
list=T{idx}.children;
while(~isempty(list))
%take out the... |
github | charmgil/MLME-master | LR_likelihood_weighted.m | .m | MLME-master/base/LR_likelihood_weighted.m | 932 | utf_8 | 796ef2c6a6f542e3bef6694285169764 | %compute the likelihood of Y under probabilities P
%P(i) is Prob(Y(i)=1)
function [ LL ] = LR_likelihood_weighted( P, Y, W )
MIN_LL = -100;
[r,c] = size(P);
if min(r,c) == 1 || min(r,c) == 2
%LogLikelihood
LL=0;
n=length(Y);
for i=1:n
if(Y(i)==1)
if P(i) <= 0
L... |
github | charmgil/MLME-master | LR_predict.m | .m | MLME-master/base/LR_predict.m | 436 | utf_8 | 4d4e8b57b81f70da8ff79835382ac1fd | %return P(y=1|x,w)
function [ P ] = LR_predict( w,X )
n=size(X,1);
P = [];
if size(w,1) == 1
for i=1:n
x=X(i,:);
z=dot(w,[1 x]);
P(i)=1.0 ./ (1.0 + exp(-z));
end
else % for multi-class
for i=1:n
for m = 1:size(w,1)
x=X(i,:);
z(m)=exp(dot(w(m,:... |
github | charmgil/MLME-master | compute_crossvalidation_loglikelihood_weighted.m | .m | MLME-master/base/compute_crossvalidation_loglikelihood_weighted.m | 796 | utf_8 | 9acc6bb9ae28a0013673ee809a8ff9a8 | %compute the likelihood of LR which learns from X to Y on the
%Crossvalidation splits in indices
function [ LL ] = compute_crossvalidation_loglikelihood_weighted( X, Y, W, indices, k)
%save time
learn_cost=false;
%init
N = size(X,1);
for i=1:k
index_validation = find(indices==i);
index_train = find(indices~=... |
github | charmgil/MLME-master | LR_likelihood.m | .m | MLME-master/base/LR_likelihood.m | 890 | utf_8 | aa273328e304b5563f820d37c3b379e1 | %compute the likelihood of Y under probabilities P
%P(i) is Prob(Y(i)=1)
function [ LL ] = LR_likelihood( P, Y )
MIN_LL = -100;
[r,c] = size(P);
if min(r,c) == 1 || min(r,c) == 2
%LogLikelihood
LL=0;
n=length(Y);
for i=1:n
if(Y(i)==1)
if P(i) <= 0
LL=LL+MIN_LL;... |
github | charmgil/MLME-master | LR_train.m | .m | MLME-master/base/LR_train.m | 3,104 | utf_8 | ebbdf9fa5b5307bc4ac2831115b0e6f7 | %learn_cost is a boolean variable, if false, do not optimize over for
%learning the cost, use the standard 1 cost (save time)
function [ weights, best_cost ] = LR_train( X, Y, varargin )
global LR_implementation;
cardinality = length(unique(Y));
is_learn_cost = true;
is_weighted = false;
% param setting
if nargin >... |
github | mattbrejza/bcjr-matlab-c-master | test_ir.m | .m | bcjr-matlab-c-master/test_ir.m | 4,670 | utf_8 | 659b22d0e8d06bae96079685449087da | function test_ir()
addpath('testing')
% fractions
frac_urc = [0 0 0 0 0.6094 0.0725 0.0226 0 0.2955 0];
frac_uec = [0.25 0 0 0.50 0 0.25 0]; %[0.9191 0 0.0415 0.0118 0 0 0.0276];
% indexs of codewords in codebooks
codes_ind = find(frac_uec);
codebooks = cell(1,7);
codebooks{1, 1} = [0 0; 0 0]%; 0 0; 0 0];%;0 0];%
co... |
github | mattbrejza/bcjr-matlab-c-master | get_vlec_trellis.m | .m | bcjr-matlab-c-master/testing/get_vlec_trellis.m | 4,748 | utf_8 | ae295d5f7a761ab09cc6c08bf253b42d | function [ vlec_trellis ] = get_vlec_trellis( codewords, probabilites )
%GET_VLEC_TRELLIS Summary of this function goes here
% Detailed explanation goes here
% codewords={[1 0 0 0 0 1]...
% [0 1 0 1 1 1]...
% [1 1 1 0 0]...
% [0 0 1 1 1]...
% [1 1 1 1]...
% [0 1 0 0]...
% [1 1 0]...
% [0 0 0]...
% [0 1 1]...
% [1 0 ... |
github | mattbrejza/bcjr-matlab-c-master | CC2_decoder_bcjr.m | .m | bcjr-matlab-c-master/testing/CC2_decoder_bcjr.m | 4,356 | utf_8 | 49a80b6bede2e67263ea12c740279f22 | % BCJR algorithm for an accumulator.
% Copyright (C) 2013 Robert G. Maunder
% This program is free software: you can redistribute it and/or modify it
% under the terms of the GNU General Public License as published by the
% Free Software Foundation, either version 3 of the License, or (at your
% option) any later ver... |
github | mattbrejza/bcjr-matlab-c-master | trellis_decoder.m | .m | bcjr-matlab-c-master/testing/trellis_decoder.m | 6,331 | utf_8 | e017ef048440f03191bc27d51918ff44 | % Copyright (C) 2013 Robert G. Maunder
% This program is free software: you can redistribute it and/or modify it
% under the terms of the GNU General Public License as published by the
% Free Software Foundation, either version 3 of the License, or (at your
% option) any later version.
% This program is distributed ... |
github | mattbrejza/bcjr-matlab-c-master | URC8_decoder_dual.m | .m | bcjr-matlab-c-master/testing/URC8_decoder_dual.m | 8,171 | utf_8 | 843d806315c7a7d2fdb81ca8725fc057 | % Encoder function for a terminated unity-rate recursive convolutional code
% having 3 memory elements, a generator polynomial of [1,0] and a feedback
% polynomial of [1,0].
% As specified in <VLC>.P354
% c_tilde_a is a matrix of a priori encoded LLRs
% b_tilde_a is a vector of a priori uncoded LLRs
% b_tilde_e is ... |
github | mattbrejza/bcjr-matlab-c-master | URC8_decoder_dual_max.m | .m | bcjr-matlab-c-master/testing/URC8_decoder_dual_max.m | 8,129 | utf_8 | ee933f737b5f76e860f8f4a6e74e2ad3 | % Encoder function for a terminated unity-rate recursive convolutional code
% having 3 memory elements, a generator polynomial of [1,0] and a feedback
% polynomial of [1,0].
% As specified in <VLC>.P354
% c_tilde_a is a matrix of a priori encoded LLRs
% b_tilde_a is a vector of a priori uncoded LLRs
% b_tilde_e is ... |
github | mattbrejza/bcjr-matlab-c-master | ir_trellis_decoder_bcjr.m | .m | bcjr-matlab-c-master/testing/ir_trellis_decoder_bcjr.m | 11,489 | utf_8 | 54eb37f23be8e0dcd4da8405c7960803 | % Copyright (C) 2013 Robert G. Maunder
% This program is free software: you can redistribute it and/or modify it
% under the terms of the GNU General Public License as published by the
% Free Software Foundation, either version 3 of the License, or (at your
% option) any later version.
% This program is distributed ... |
github | mattbrejza/bcjr-matlab-c-master | maxstar.m | .m | bcjr-matlab-c-master/testing/maxstar.m | 1,302 | utf_8 | 287694f777629f6452db878a3ecb551e | % Copyright (C) 2013 Robert G. Maunder
% This program is free software: you can redistribute it and/or modify it
% under the terms of the GNU General Public License as published by the
% Free Software Foundation, either version 3 of the License, or (at your
% option) any later version.
% This program is distributed ... |
github | mattbrejza/bcjr-matlab-c-master | unary_encoder.m | .m | bcjr-matlab-c-master/testing/unary_encoder.m | 918 | utf_8 | 78cee6e59000b0d6dc376171d1137741 | % Copyright (C) 2013 Robert G. Maunder
% This program is free software: you can redistribute it and/or modify it
% under the terms of the GNU General Public License as published by the
% Free Software Foundation, either version 3 of the License, or (at your
% option) any later version.
% This program is distributed ... |
github | mattbrejza/bcjr-matlab-c-master | CC3_decoder_bcjr.m | .m | bcjr-matlab-c-master/testing/CC3_decoder_bcjr.m | 4,483 | utf_8 | c0409054f6213ff54cbaefa482594918 | % BCJR algorithm for an accumulator.
% Copyright (C) 2013 Robert G. Maunder
% This program is free software: you can redistribute it and/or modify it
% under the terms of the GNU General Public License as published by the
% Free Software Foundation, either version 3 of the License, or (at your
% option) any later ver... |
github | mattbrejza/bcjr-matlab-c-master | CC2_encoder.m | .m | bcjr-matlab-c-master/testing/CC2_encoder.m | 1,875 | utf_8 | 410aafe75be35c33a1352de95b25bc41 | % Encoder function for a terminated unity-rate recursive convolutional code
% having 3 memory elements, a generator polynomial of [1,1,0,1] and a feedback
% polynomial of [1,0,1,1]. This is as used in the UMTS turbo code, as specified
% in ETSI TS 125 212 (search for it on Google if you like). For more
% information,... |
github | mattbrejza/bcjr-matlab-c-master | vlec_viterbi_decoder.m | .m | bcjr-matlab-c-master/testing/vlec_viterbi_decoder.m | 4,650 | utf_8 | 807121cbad83f01d8a13dbe8186c737e |
% c_tilde_a is a matrix of a priori encoded LLRs
% b_tilde_a is a vector of a priori uncoded LLRs
% c_tilde_e is a matrix of extrinsic encoded LLRs
% b_tilde_p is a vector of a posteriori uncoded LLRs
function b_hat = vlec_viterbi_decoder(b_tilde_a, transitions)
bit_count = length(b_tilde_a);
% All calculations ... |
github | mattbrejza/bcjr-matlab-c-master | distribution_zeta.m | .m | bcjr-matlab-c-master/testing/distribution_zeta.m | 883 | utf_8 | 96b6217ef13c082815554fbd55e389c3 | % Copyright (C) 2013 Robert G. Maunder
% This program is free software: you can redistribute it and/or modify it
% under the terms of the GNU General Public License as published by the
% Free Software Foundation, either version 3 of the License, or (at your
% option) any later version.
% This program is distribute... |
github | mattbrejza/bcjr-matlab-c-master | ir_trellis_encoder.m | .m | bcjr-matlab-c-master/testing/ir_trellis_encoder.m | 1,782 | utf_8 | 97fe992fd2a9761654839eaba2bac705 | % Wenbo, 2013.08.2
% This encoder is based on Rob's new trellis_encoder that on his personal website
function [z_cell, elmt_vec] = ir_trellis_encoder(y,C_cell, frac)
% calculate the index of each fractions
y_frac = round(cumsum(length(y) * frac));
y_frac = [0 y_frac];
% Always start from a previous state of 1
mprim... |
github | mattbrejza/bcjr-matlab-c-master | generate_random_symbols.m | .m | bcjr-matlab-c-master/testing/generate_random_symbols.m | 1,276 | utf_8 | b3528ba9519f5fdad306c519951393c8 | % Copyright (C) 2013 Robert G. Maunder
% This program is free software: you can redistribute it and/or modify it
% under the terms of the GNU General Public License as published by the
% Free Software Foundation, either version 3 of the License, or (at your
% option) any later version.
% This program is distributed ... |
github | mattbrejza/bcjr-matlab-c-master | unary_decoder_soft.m | .m | bcjr-matlab-c-master/testing/unary_decoder_soft.m | 1,152 | utf_8 | 2e55b8eeada83dd4fbf9aacc3837d4f5 | % Copyright (C) 2013 Robert G. Maunder
% This program is free software: you can redistribute it and/or modify it
% under the terms of the GNU General Public License as published by the
% Free Software Foundation, either version 3 of the License, or (at your
% option) any later version.
% This program is distributed ... |
github | andresmendes/Vehicle-Dynamics-Lateral-master | ArticulatedVehicleSFunction.m | .m | Vehicle-Dynamics-Lateral-master/Examples/TemplateArticulatedSimulink/ArticulatedVehicleSFunction.m | 3,861 | utf_8 | ca87d03cf89c01a1be44fb05a0763a2c | function [sys,x0,str,ts] = ArticulatedVehicleSFunction(t,x,u,flag)
% This file is a s-function template for simulating the articulated vehicle
% model in Simulink.
% Choosing tire model
TireModel = VehicleDynamicsLateral.TirePacejka();
% Defining tire parameters
TireModel.a0 = 1;
TireModel.a1 = 2;
TireMo... |
github | andresmendes/Vehicle-Dynamics-Lateral-master | SimpleVehicleSFunction.m | .m | Vehicle-Dynamics-Lateral-master/Examples/TemplateSimpleSimulink/SimpleVehicleSFunction.m | 3,258 | utf_8 | ca50d13e891f767061eca1ecbf8823f8 | function [sys,x0,str,ts] = SimpleVehicleSFunction(t,x,u,flag)
% This file is a s-function template for simulating the simple vehicle
% model in Simulink.
% Choosing tire model
TireModel = VehicleDynamicsLateral.TirePacejka();
% Defining tire parameters
TireModel.a0 = 1;
TireModel.a1 = 0;
TireModel.a2 ... |
github | LaurentClaessens/mazhe-master | G31-3.m | .m | mazhe-master/tex/matlab/G31-3.m | 212 | utf_8 | 388efb7d07e34ae6ab809461ac22b9c0 | function retour=phi(t)
retour = sqrt(t)*cos(t);
end
function retour = f(x)
retour = x.^2*quad('phi',0,x);
end
f(1) #0.53120
X=0:0.1:3
Y=[]
for i = 1:length(X)
Y(i)=f(X(i)) ;
end
plot(X,Y)
print -dps G31-3.ps
|
github | LaurentClaessens/mazhe-master | exo3novQ5.m | .m | mazhe-master/tex/matlab/exo3novQ5.m | 188 | utf_8 | 5842882e94c73a4d24e1969b5e077dbc | function z=cauchy(x,y)
z= -sin(x)*y
end
function y=exact(x)
y=exp(cos(x))
end
e = exp(1)
[x,y]=ode45(@cauchy,[0,2],e)
X = 0:0.1:2
Y = exact(X)
plot(x,y,'o',X,Y)
print -dps exo3novQ5.ps
|
github | LaurentClaessens/mazhe-master | G32-2.m | .m | mazhe-master/tex/matlab/G32-2.m | 155 | utf_8 | 1b8add1b78d8f56aaa5e81cdb96e0bfd | u=1:100;
v=2.^(cos(2*u));
sum(v) % 111.89
function retour=s(N)
u=1:N;
v=2.^(cos(2*u));
retour=sum(v);
end
for i=100:200
s(i)
end
% Le dernier est 223.88
|
github | LaurentClaessens/mazhe-master | SC_exo_5-1.m | .m | mazhe-master/tex/matlab/SC_exo_5-1.m | 468 | utf_8 | 8cb6403e871a06f36d0567f38548d032 | % Cette fonction donne x_{n+1} en fonction de x_n.
function y = recurrence(x)
y=sqrt(2+x);
end
n = 12
x = 0;
% On va appliquer n fois la récurrence
for i = 1:n
x = recurrence(x);
endfor
x
% Pour faire une fonction qui calcule le terme n, il suffit de faire
% une fonction qui contient n fois la récurrence.
functio... |
github | LaurentClaessens/mazhe-master | G32-1.m | .m | mazhe-master/tex/matlab/G32-1.m | 220 | utf_8 | ce56925612077c1473606d5d6ef88916 | function retour=Cauchy(x,y)
retour = y/2 + 2*exp(x/2).*cos(2*x)
end
function retour=solution(x)
retour = sin(2*x).*exp(x/2)
end
[x,y]=ode45(@Cauchy,[0,4],0)
X = 0:0.1:4
Y=solution(X)
plot(x,y,X,Y)
print -dps G32-1.ps
|
github | LaurentClaessens/mazhe-master | G22-2.m | .m | mazhe-master/tex/matlab/G22-2.m | 215 | utf_8 | 911bb9cfeaf3499c7cfbc378a1ec744f | function y=f(x)
y=4.144*(10^(14))./x.^2
endfunction
function y=W(x)
R=6500000
y=quad(@f,R,R+x)
endfunction
h=10000
X=0:100:10000
Y=1:length(X)
for i=1:length(X)
Y(i)=W(X(i))
endfor
plot(X,Y)
print -dps G22-2.ps
|
github | LaurentClaessens/mazhe-master | SC_exo_4-1.m | .m | mazhe-master/tex/matlab/SC_exo_4-1.m | 288 | iso_8859_1 | 55ecf74e6853490ed7428f5bc36b1b30 | function y=f(x)
y = (exp(x)*x.^4)/(exp(x)-1).^2;
endfunction
% La fonction suivante donne la valeur de l'intégrale
% de la fonction demandée entre 0 et xm.
function y=Integrale(xm)
y = quad('f',0,xm);
endfunction
R = 8.314;
xm = 313/300;
reponse = (9*R/xm^3)*Integrale(xm) % 23.636
|
github | LaurentClaessens/mazhe-master | SC_exo_4-2.m | .m | mazhe-master/tex/matlab/SC_exo_4-2.m | 382 | utf_8 | 3cc74f95bf6ec4c50b05c240f625c194 | function y=Integrande(t)
y = exp(t.^2);
end
% La fonction qui à x fait correspondre l'intégrale de f entre 0 et x
function y=Integrale(x)
y=quad('Integrande',0,x);
end
% La fonction Dawson de l'énoncé
function y=Dawson(x)
y=exp(-x.^2)*Integrale(x);
end
reponseA = Dawson(1) % 0.53808
function y=Dawsonbis(x)
y=Dawson... |
github | LaurentClaessens/mazhe-master | G21-1.m | .m | mazhe-master/tex/matlab/G21-1.m | 207 | utf_8 | 1bcb611b75fe8ffa29e45fff5078a143 | function y=f(x)
a=3
y=x.*exp(-x/a)
endfunction
function y=fp(x)
y=-(1/3)*x.*exp(-x/3)+exp(-x/3)
endfunction
X=-2:0.1:10
Y=f(X)
xmax=fzero('fp',2)
ymax=f(xmax)
plot(X,Y,xmax,ymax,'o')
print -dps G21-1.ps
|
github | LaurentClaessens/mazhe-master | SC_exo_2-4.m | .m | mazhe-master/tex/matlab/SC_exo_2-4.m | 952 | utf_8 | 8118ee49eee02a3822e6d2436d79fa2a | function y = f1(x)
y = sin(x)+sin(3*x)/3+sin(5*x)/5+sin(7*x)/7
end
function y = f2(x)
y = (x.^2.*abs(x-2)).^(1/3)
end
function y = f3(x)
y = sqrt(x).*sin(1./x)
end
# Créer un vecteur avec les valeurs où on va calculer la fonction
echantillon = 0:0.1:2*pi
# Créer le vecteur avec les valeurs de la fonction
v = f1(e... |
github | LaurentClaessens/mazhe-master | SC_exo_5-4.m | .m | mazhe-master/tex/matlab/SC_exo_5-4.m | 428 | utf_8 | 552df94c1a80d3322755d648a500a337 | % La fonction suivante retourne le plus grand en valeur absolue de a et b.
function y=maxvalabs(a,b)
if abs(a)>abs(b)
y = a;
else
y = b;
end
end
% deux vecteurs de tests.
x = [1,4,8,-4,-4];
y = [-2,3,7,-5,5];
% On crée le vecteur z qui a la m\ême longueur que x.
% Peu importe ce qu'il y a dedans parce qu'on va... |
github | LaurentClaessens/mazhe-master | exo2-1.m | .m | mazhe-master/tex/matlab/exo2-1.m | 311 | utf_8 | 0a4ac6a5780055bae7b5c8ce35746147 | function y=f1(x)
y=sin(x.^2)
endfunction
function y=f2(x)
y=exp(x)/4
endfunction
function y=f(x)
y=f1(x)-f2(x)
endfunction
X = 0:0.05:2
Y1 = f1(X)
Y2 = f2(X)
t1 = 0.7
t2 = 1.3
r1 = fzero('f',t1)
r2 = fzero('f',t2)
r1 %0.74452
r2 %1.3525
plot(X,Y1,X,Y2,r1,f1(r1),'o',r2,f1(r2),'o')
print -dps exo2-1.ps
|
github | LaurentClaessens/mazhe-master | 3nov14h00-q1.m | .m | mazhe-master/tex/matlab/3nov14h00-q1.m | 194 | utf_8 | b4277d338e4d80ab5c8b274ca9a23334 | function y=intergrande(t)
y=cos(sin(t));
end
function y=f(x)
y=quad('intergrande',0,x)-1/4;
end
reponse = fzero('f',0.3) % 0.25265
X = 0:0.1:5;
Y = f(X);
plot(X,Y,'o')
print -dps exo0013.ps
|
github | dgolden1/vlf_software-master | pare_data_gui.m | .m | vlf_software-master/pare_data_gui/pare_data_gui.m | 14,415 | utf_8 | 65d7815329a18ac2f5ea05486ffcff58 | function varargout = pare_data_gui(varargin)
% PARE_DATA_GUI M-file for pare_data_gui.fig
% PARE_DATA_GUI, by itself, creates a new PARE_DATA_GUI or raises the existing
% singleton*.
%
% H = PARE_DATA_GUI returns the handle to a new PARE_DATA_GUI or the handle to
% the existing singleton*.
%
% ... |
github | dgolden1/vlf_software-master | extract_freq.m | .m | vlf_software-master/common_vlf/common_marek/extract_freq.m | 1,019 | utf_8 | 9d4e442ff7cf61cfda72d19d44069d8e | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Code intended to extract a frequency time series by mixing and low pass
% filtering
%Author: Mark Golkowski
%Stanford University
%make taps=0 to mix down only and not filter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... |
github | dgolden1/vlf_software-master | trace_L_shell.m | .m | vlf_software-master/l_shell_mapping/trace_L_shell.m | 2,920 | utf_8 | 1dbccfac3fcc8f812d7ab987a2c4d7bd | function [L,latf,lonf,m] = trace_L_shell(Rstart,lat,lon,ds,geo_sm_flag,Rf,T)
%
%traces from point (Rstart,lat,lon) to (Rf,latf,lonf)
%T = [year, month, day, hour, minute, second];
%Rstart, Rf in terms of earth radii
%For conjugate points:
% geo_sm_flag should be 1
%ds should be (.05 - 3)*sign(lat)
%For L-s... |
github | dgolden1/vlf_software-master | ezglobe.m | .m | vlf_software-master/l_shell_mapping/ezglobe.m | 90,178 | utf_8 | 35aaac95f28137a237ac324665a85437 | % EZGLOBE - Plots a simple rotatable globe with political boundaries.
% This function is compatible with Mapping Toolbox 2.x
%
% USAGE: ezglobe
%
% NOTES: (1) This version of EZGLOBE is compatible with the Mapping
% Toolbox version 2.x
% (2) Coastlines are extracted from the "landareas.shp" ... |
github | dgolden1/vlf_software-master | whAnalysisGUI.m | .m | vlf_software-master/VLFtool_dan/whAnalysisGUI.m | 10,946 | utf_8 | 6b23b3b43696477c1e02f2e3422fdedb | function varargout = whAnalysisGUI(varargin)
% WHANALYSISGUI M-file for whAnalysisGUI.fig
% WHANALYSISGUI, by itself, creates a new WHANALYSISGUI or raises the existing
% singleton*.
%
% H = WHANALYSISGUI returns the handle to a new WHANALYSISGUI or the handle to
% the existing singleton*.
%
% ... |
github | dgolden1/vlf_software-master | vlfGui.m | .m | vlf_software-master/VLFtool_dan/vlfGui.m | 21,998 | utf_8 | 99853177ade9e3e841b224835e38c533 | function varargout = vlfGui(varargin)
%VLFGUI M-file for vlfGui.fig
% VLFGUI, by itself, creates a new VLFGUI or raises the existing
% singleton*.
%
% H = VLFGUI returns the handle to a new VLFGUI or the handle to
% the existing singleton*.
%
% VLFGUI('Property','Value',...) creates a new VLFGU... |
github | dgolden1/vlf_software-master | vlfPlotSpecgram.m | .m | vlf_software-master/VLFtool_dan/vlfPlotSpecgram.m | 4,308 | utf_8 | f0e293cb8f6786717fb4e69e8ea4cf4c | function vlfPlotSpecgram(iiRow, iiCol)
% Modified by Daniel Golden (dgolden1 at stanford dot edu) May 3 2007
% $Id$
global DF;
%% Determine position of axis
pos = [ DF.left+(iiCol-1)*DF.width 1-DF.top-DF.height DF.width DF.height];
pos(1) = DF.left+((iiCol-1)*DF.width);
pos(2) = 1-DF.top-(DF.height*(iiRow))-(DF.vspa... |
github | dgolden1/vlf_software-master | whOverlayGUI.m | .m | vlf_software-master/VLFtool_dan/whOverlayGUI.m | 10,035 | utf_8 | b1a279f21b4da305bf61b85972839636 | function varargout = whOverlayGUI(varargin)
% WHOVERLAYGUI M-file for whOverlayGUI.fig
% WHOVERLAYGUI, by itself, creates a new WHOVERLAYGUI or raises the existing
% singleton*.
%
% H = WHOVERLAYGUI returns the handle to a new WHOVERLAYGUI or the handle to
% the existing singleton*.
%
% WHOVERL... |
github | dgolden1/vlf_software-master | vlfSettingsGui.m | .m | vlf_software-master/VLFtool_dan/vlfSettingsGui.m | 12,387 | utf_8 | eb9c5678a9445fed591f371ceb0a2125 | function varargout = vlfSettingsGui(varargin)
% VLFSETTINGSGUI M-file for vlfSettingsGui.fig
% VLFSETTINGSGUI, by itself, creates a new VLFSETTINGSGUI or raises the existing
% singleton*.
%
% H = VLFSETTINGSGUI returns the handle to a new VLFSETTINGSGUI or the handle to
% the existing singleton*.
%
... |
github | dgolden1/vlf_software-master | vlfPlotDir.m | .m | vlf_software-master/VLFtool_dan/vlfPlotDir.m | 3,232 | utf_8 | 5a21bf38538b297cd5aad5deddb3e263 | function vlfPlotSpecgram(iiRow, iiCol)
global DF;
pos = [ DF.left+(iiCol-1)*DF.width 1-DF.top-DF.height DF.width DF.height];
pos(1) = DF.left+((iiCol-1)*DF.width);
pos(2) = 1-DF.top-(DF.height*(iiRow))-(DF.vspace*(iiRow-1));
pos(3) = DF.width;
pos(4) = DF.height;
%figure( DF.fig );
% MAKE AXES
h_ax = axes('Positio... |
github | dgolden1/vlf_software-master | fminsearchbnd.m | .m | vlf_software-master/VLFtool_dan/tarcsai/fminsearchbnd.m | 7,344 | utf_8 | b4c858393978ffabf8496e17333b954e | function [x,fval,exitflag,output]=fminsearchbnd(fun,x0,LB,UB,options,varargin)
% FMINSEARCHBND: FMINSEARCH, but with bound constraints by transformation
% usage: x=FMINSEARCHBND(fun,x0)
% usage: x=FMINSEARCHBND(fun,x0,LB)
% usage: x=FMINSEARCHBND(fun,x0,LB,UB)
% usage: x=FMINSEARCHBND(fun,x0,LB,UB,options)
% usage: x=F... |
github | dgolden1/vlf_software-master | whTarcsaiGUI.m | .m | vlf_software-master/VLFtool_dan/tarcsai/whTarcsaiGUI.m | 17,503 | utf_8 | 756df7e3df0e4852f6bda1f95d4bc26c | function varargout = whTarcsaiGUI(varargin)
% WHTARCSAIGUI M-file for whTarcsaiGUI.fig
% WHTARCSAIGUI, by itself, creates a new WHTARCSAIGUI or raises the existing
% singleton*.
%
% H = WHTARCSAIGUI returns the handle to a new WHTARCSAIGUI or the handle to
% the existing singleton*.
%
% WHTARCS... |
github | dgolden1/vlf_software-master | whTarcsaiFindFileWithDate.m | .m | vlf_software-master/VLFtool_dan/tarcsai/whTarcsaiFindFileWithDate.m | 3,795 | utf_8 | 91c36c482f2a4c15ffbdac1a27441875 | function [filename, file_start_time, file_end_time] = whTarcsaiFindFileWithDate(date, sourcedir)
% filename = whTarcsaiFindFileWithDate(date)
% Finds a data file that contains the given date
%
% INPUTS
% date: date to search for, in Matlab serial date number format
% sourcedir: source directory of the .mat file. This ... |
github | dgolden1/vlf_software-master | whTarcsaiSelectWhistler.m | .m | vlf_software-master/VLFtool_dan/tarcsai/whTarcsaiSelectWhistler.m | 7,675 | utf_8 | 384df3df8a08e91901bdd97f7ad9a2ad | function varargout = whTarcsaiSelectWhistler
% bMadeImage = whTarcsaiSelectWhistler
%
% bMadeImage is true if this function plotted data; false otherwise
%
% function called when the user selects a data set. Prints the answers to
% the gui
% By Adam Richards
% Modified by Daniel Golden (dgolden1 at stanford dot edu)... |
github | dgolden1/vlf_software-master | get_pol_lat_lon.m | .m | vlf_software-master/common_dig/get_pol_lat_lon.m | 89,372 | utf_8 | ba361188bb1bed4b80a196ddb0df5fca | function [lat, lon] = get_pol_lat_lon
% [lat, lon] = get_pol_lat_lon
% Get latitude and longitude values suitable for plotting with the mapping
% toolbox
%
% Example:
% worldmap 'world'
% land = shaperead('landareas.shp', 'UseGeoCoords', true);
% geoshow([land.Lat], [land.Lon], 'Color', [0.1 0.1 0.1]);
% [pol_lat, pol... |
github | dgolden1/vlf_software-master | lanl_read.m | .m | vlf_software-master/common_dig/lanl_read.m | 3,723 | utf_8 | b6ff49af9a667babe7b8785d0204c0fb | % function [UT, glat, glon, radius, e050_075, e075_105, e105_150, e150_225, e225_315, e315_500, e500_750, e750_11, e11_15, e15] = lanl_read(filename)
function [UT, glat, glon, radius, energies] = lanl_read(filename)
% [UT, glat, glon, radius, energies] = lanl_read(filename)
% function to parse LoE data from LANL satell... |
github | dgolden1/vlf_software-master | reduce_30min_to_synoptic.m | .m | vlf_software-master/common_dig/reduce_30min_to_synoptic.m | 5,105 | utf_8 | 5a0ded3674eb21d325543a6b417e530a | function new_filelist = reduce_30min_to_synoptic(sourcedir, filenames, destdir, num_channels, syn_min, syn_len, yymmdd, b_remove_original)
% new_filelist = reduce_30min_to_synoptic(sourcedir, filenames, destdir, num_channels, syn_min, syn_len, yymmdd, b_remove_original)
% Function to take 30-minute continuous files fro... |
github | dgolden1/vlf_software-master | data_viewer_dan.m | .m | vlf_software-master/common_dig/data_viewer_dan.m | 4,310 | utf_8 | 02697ab74bf3c27353ba4101036554f6 | function varargout = data_viewer_dan(sitename, start_datenum, varargin)
% DF = data_viewer_dan(sitename, start_datenum, 'param', value, ...)
% Dan's data viewer
% Make a spectrogram of some data from a broadband file, either interleaved
% or two-channel
%
% If the data is interleaved, the spectrogram is of the N/S (fi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.