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 | pengsun/MatConvDAG-master | mnist_small_tr_MLP.m | .m | MatConvDAG-master/examples/mnist_small_tr_MLP.m | 1,295 | utf_8 | 84add6420a5d8b3528e10b6854cc8c3a | function mnist_small_tr_MLP()
%% init dag: from file or from scratch
beg_epoch = 4;
dir_mo = fullfile(dag_path.root,'examples/mo_zoo/mnist_small/MLP');
fn_mo = fullfile(dir_mo, sprintf('dag_epoch_%d.mat', beg_epoch-1) );
if ( exist(fn_mo, 'file') )
h = create_dag_from_file (fn_mo);
else
beg_epoch = 1;
h = create... |
github | pengsun/MatConvDAG-master | mnist_small_te.m | .m | MatConvDAG-master/examples/mnist_small_te.m | 936 | utf_8 | fc82c1d3eb953c139d66c82e77f60824 | function mnist_small_te()
%% init dag: from file
fn_mo = 'dag_epoch_510.mat';
dir_mo = fullfile(dag_path.root(),'\examples_dag\mo_zoo\mnist_small\lenetDropout');
ffn_mo = fullfile(dir_mo, fn_mo);
load(ffn_mo, 'ob');
% get ob from here
%% config
% TODO: add more properties here
ob.batch_sz = 128;
fn_data = fullfile(da... |
github | pengsun/MatConvDAG-master | mnist_small_tr_lenetTriCon.m | .m | MatConvDAG-master/examples/mnist_small_tr_lenetTriCon.m | 1,318 | utf_8 | cc745a36ac0dc882ade71f4666fa1629 | function mnist_small_tr_lenetTriCon()
%% init dag: from file or from scratch
beg_epoch = 8;
dir_mo = fullfile(dag_path.root,'examples/mo_zoo/mnist_small/lenetTriCon');
fn_mo = fullfile(dir_mo, sprintf('dag_epoch_%d.mat', beg_epoch-1) );
if ( exist(fn_mo, 'file') )
h = create_dag_from_file (fn_mo);
else
beg_epoch = ... |
github | tylin/coco-dpm-master | demo.m | .m | coco-dpm-master/demo.m | 1,752 | utf_8 | 6a44907e706280a4fcd5f3fcde1eea7f | function demo()
startup;
fprintf('compiling the code...');
compile;
fprintf('done.\n\n');
load('VOC2007/car_final');
model.vis = @() visualizemodel(model, ...
1:2:length(model.rules{model.start}));
test('000034.jpg', model, -0.3);
load('INRIA/inriaperson_final');
model.vis = @() visualizemodel(mode... |
github | tylin/coco-dpm-master | voc_config.m | .m | coco-dpm-master/voc_config.m | 9,108 | utf_8 | 6dc85c4af90ab6aae6cdf28ecfed34ee | function conf = voc_config(varargin)
% Set up configuration variables.
% conf = voc_config(varargin)
%
% Each variable is named by a path that identifies a field
% in the returned conf structure. For example, 'pascal.year'
% corresponds to conf.pascal.year. You can set configuration
% variables in 3 ways:
% ... |
github | tylin/coco-dpm-master | max_fv_dim.m | .m | coco-dpm-master/fv_cache/max_fv_dim.m | 1,989 | utf_8 | f6dd094768a6db8737ee016673dca806 | function [dim, nblocks] = max_fv_dim(model)
% Each derivation is represented by a block sparse feature vector.
% This function computes the max dimension of that feature vector over all
% derivations. It also computes the maximum number of blocks used by any
% derivation.
% [dim, nblocks] = max_fv_dim(model)
%
% Retu... |
github | tylin/coco-dpm-master | fv_model_args.m | .m | coco-dpm-master/fv_cache/fv_model_args.m | 1,979 | utf_8 | 2ed6b83a01688bb47f2b8422ae6f1f5e | function [blocks, lower_bounds, reg_mult, learn_mult, comps] ...
= fv_model_args(model)
% fv_model_args(model) returns the arguments (ARGS) needed by the call
% fv_cache('set_model', ARGS).
% [blocks, lower_bounds, reg_mult, learn_mult, comps] = fv_model_args(model)
%
% Return values
% blocks Cell array ... |
github | tylin/coco-dpm-master | gdetect_pos_c.m | .m | coco-dpm-master/star-cascade/gdetect_pos_c.m | 2,786 | utf_8 | 23df2e8db4b715db3272dd1be025dea1 | function [ds, bs, trees] = gdetect_pos_c(pyra, model, valid)
% Compute belief and loss adjusted detections for a foreground example.
% [ds, bs, trees] = gdetect_pos(pyra, model, count, ...
% fg_box, fg_overlap, ...
% bg_boxes, max_bg_overlap)
%
% This ... |
github | tylin/coco-dpm-master | cascade_demo.m | .m | coco-dpm-master/star-cascade/cascade_demo.m | 2,421 | utf_8 | f0b98f33ee120c6b7f1a7956e954e549 | function cascade_demo()
% Run cascade demo.
%
% Note that unless you have compiled fconv.cc as your convolution
% function, you will be comparing a multi-threaded version of the
% DP algorithm to a single-threaded version of the cascade algorithm.
load('VOC2007/car_final');
test('000034.jpg', model);
fprintf('\nPres... |
github | tylin/coco-dpm-master | get_block_scores.m | .m | coco-dpm-master/star-cascade/get_block_scores.m | 2,074 | utf_8 | 371577857788e1521049759909162cfa | function scores = get_block_scores(pyra, model, trees)
% Get block scores used for computing cascade thresholds.
%
% pyra feature pyramid
% model object model
% info detection info from gdetect.m
scores = zeros(length(trees), model.numblocks);
loc_f = loc_feat(model, pyra.num_levels);
for d = 1:length(tre... |
github | tylin/coco-dpm-master | cascade_model.m | .m | coco-dpm-master/star-cascade/cascade_model.m | 8,308 | utf_8 | 315810d4693c3b3bf0ec7cd9c9a1bb59 | function model = cascade_model(model, data_year, pca, thresh)
% model = cascade_model(model, data_year, pca, p)
% Compute thresholds on partial scores for cascade detection.
%
% model object detector
% data_year dataset year as a string (e.g., '2007')
% pca number of PCA components to project onto (if pca... |
github | tylin/coco-dpm-master | model_cmp.m | .m | coco-dpm-master/utils/model_cmp.m | 1,561 | utf_8 | 00429b876e3f574b627b8c6dc3493c07 | function t = model_cmp(m1, m2)
[v1, b1, map1] = model2blocks(m1);
[v2, b2, map2] = model2blocks(m2);
e = sum(abs(v1-v2));
if e > 0
fprintf('error: %.14f\n', e);
for i = 1:length(b1)
I = find(b1{i} ~= b2{i});
if ~isempty(I)
for j = 1:length(I)
fprintf('at %s : index %d [%.5f vs %.5f]\n', ...
... |
github | tylin/coco-dpm-master | viewerrors.m | .m | coco-dpm-master/utils/viewerrors.m | 7,703 | utf_8 | 51da01fe5d2dc50239c63c03fff18084 | function ap = viewerrors(model, boxes, testset, year, saveim)
% For visualizing mistakes on a validation set
warning on verbose;
warning off MATLAB:HandleGraphics:noJVM;
cls = model.class;
conf = voc_config('pascal.year', year, ...
'eval.test_set', testset);
VOCopts = conf.pascal.VOCopts;
cachedir... |
github | tylin/coco-dpm-master | test_stats.m | .m | coco-dpm-master/utils/bootstrap/test_stats.m | 1,643 | utf_8 | 9b3127ed775d02f9d680cb503931a68b | function test_stats(cls, testset, year, B)
conf = voc_config('project', 'fv_cache', ...
'pascal.year', year, ...
'eval.test_set', testset);
VOCopts = conf.pascal.VOCopts;
cachedir = conf.paths.model_dir;
if nargin < 4
B = 1000;
end
try
load([cachedir cls '_' testset '_bootstr... |
github | tylin/coco-dpm-master | visualize_person_grammar_model.m | .m | coco-dpm-master/person_grammar/visualize_person_grammar_model.m | 4,202 | utf_8 | cd676ff4b0775cff00311bdc72070187 | function visualize_simple_grammar_model_def(model, comps, direction)
clf;
if nargin < 3
direction = 1;
end
% collapse model
for i = 1:length(model.rules{model.start}(6).rhs)
X = model.rules{model.start}(6).rhs(i);
for j = 1:length(model.rules{X})
Y = model.rules{X}(j).rhs(1);
if model.symbols(Y).type =... |
github | tylin/coco-dpm-master | person_grammar_init.m | .m | coco-dpm-master/person_grammar/person_grammar_init.m | 9,549 | utf_8 | 9a311cc59ed2c3e3a39966ee4189b867 | function model = person_init_grammar()
% Initialize the structure and filters of the person grammar model.
% model = person_init_grammar()
model = train_full_person_2x_res();
model = make_person_grammar_occ_def(model);
% --------------------------------------------------------------------
function model = train_ful... |
github | tylin/coco-dpm-master | bboxpred_train.m | .m | coco-dpm-master/bbox_pred/bboxpred_train.m | 1,894 | utf_8 | 75570255727166a2bf8eb362415f34d9 | function model = bboxpred_train(name, method)
% Train a bounding box predictor.
% model = bboxpred_train(name, year, method)
%
% Return value
% model Model with the bounding box predictor stored in model.bboxpred
%
% Arguments
% name Object class
% method Regression method (default is least squares regres... |
github | tylin/coco-dpm-master | gdetect_dp.m | .m | coco-dpm-master/gdetect/gdetect_dp.m | 6,503 | utf_8 | d61c8b02ce4851f1e9f5c12994fee36e | function model = gdetect_dp(pyra, model)
% Compute dynamic programming tables used for finding detections.
% model = gdetect_dp(pyra, model)
%
% This function implements the dynamic programming algorithm for
% computing high-scoring derivations using an Object Detection Grammar.
% It is assumed that the detecti... |
github | tylin/coco-dpm-master | gdetect_write.m | .m | coco-dpm-master/gdetect/gdetect_write.m | 5,645 | utf_8 | 34f0b952d4562825523e8be9bdcc6048 | function [bs, count] = gdetect_write(pyra, model, bs, trees, from_pos, ...
dataid, maxsize, maxnum)
% Write detections from gdetect.m to the feature vector cache.
% [bs, count] = gdetect_write(pyra, model, bs, trees, from_pos, ...
% dataid, maxsize, m... |
github | tylin/coco-dpm-master | validate_levels.m | .m | coco-dpm-master/gdetect/validate_levels.m | 1,871 | utf_8 | 5c34b3cd9e591db27705e28245b8afc8 | function do_levels = validate_levels(model, pyra, boxes, overlap)
% Determine which feature pyramid levels permit high overlap between
% the model and any of the input boxes.
% do_levels = validate_levels(model, pyra, boxes, overlap)
%
% Return value
% do_levels Boolean array indicating on which feature pyramid l... |
github | tylin/coco-dpm-master | gdetect_pos.m | .m | coco-dpm-master/gdetect/gdetect_pos.m | 5,763 | utf_8 | 69892de9778b4a24bb72a8a69bb14b35 | function [ds, bs, trees] = gdetect_pos(pyra, model, count, ...
fg_box, fg_overlap, ...
bg_boxes, max_bg_overlap)
% Compute belief and loss adjusted detections for a foreground example.
% [ds, bs, trees] = gdetect_pos(pyra, model, count, ...... |
github | tylin/coco-dpm-master | visualizemodel.m | .m | coco-dpm-master/vis/visualizemodel.m | 2,771 | utf_8 | 8f879c664992c75c4dc8d60bd3134ad0 | function visualizemodel(model, components, layers)
% Visualize a mixture of star models.
% visualizemodel(model)
%
% Arguments
% model Model to visualize
% components Which components to draw
clf;
if nargin < 2
components = 1:length(model.rules{model.start});
end
if nargin < 3
layers = 1;
end
k = 1;... |
github | tylin/coco-dpm-master | vis_grammar.m | .m | coco-dpm-master/vis/vis_grammar.m | 1,327 | utf_8 | 385736ede915cdff16301f08494ba294 | function vis_grammar(model)
% visualize random derivations...forever
while true
f = vis_grammar_rand(model);
visualizeHOG(max(0, f));
pause;
end
function f = vis_grammar_rand(model, s, p, f)
conf = voc_config();
if nargin < 2
s = model.start;
p = [0 0 0];
f = zeros([0 0 conf.features.dim]);
end
if mod... |
github | tylin/coco-dpm-master | context_labels.m | .m | coco-dpm-master/context/context_labels.m | 4,044 | utf_8 | 8a7ce1b496367192f01441b7158e0a42 | function labels = context_labels(cls, ds, train_set, train_year)
% Get classification training labels for training the context rescoring
% classifier.
% labels = context_labels(cls, ds, train_set, train_year)
%
% Return value
% labels Binary labels {-1,+1} for each detection in boxes
%
% Arguments
% cls ... |
github | tylin/coco-dpm-master | trainval.m | .m | coco-dpm-master/train/trainval.m | 1,056 | utf_8 | 43f99e636b03823c7387d34db4ca4671 | function [ap1, ap2] = trainval(cls)
% Evaluate the detector for class cls on the trainval dataset.
% [ap1, ap2] = trainval(cls)
%
% This function is used to collect detections for context rescoring.
%
% Return values
% ap1 Score without bounding box prediction
% ap2 Score with bounding box prediction
%
% Ar... |
github | tylin/coco-dpm-master | lrsplit.m | .m | coco-dpm-master/train/lrsplit.m | 3,050 | utf_8 | 28d2b2801379ca7b3b015b56b3b7a959 | function [A, B] = lrsplit(model, pos)
% Orientation clustering.
% [A, B] = lrsplit(model, pos, i)
%
% Attempt to split examples in pos into a left-facing cluster and a
% right-facing cluster.
%
% Return values
% A Cluster 1 indicies in pos
% B Cluster 2 indicies in pos
%
% Arguments
% model Objec... |
github | tylin/coco-dpm-master | train.m | .m | coco-dpm-master/train/train.m | 27,079 | utf_8 | 66ef5b5cfd934539eab1465d86a11fc7 | function model = train(model, pos, neg, warp, randneg, iter, ...
negiter, max_num_examples, fg_overlap, ...
num_fp, cont, tag, C)
% Train a model optimizing a WL-SSVM or LSVM.
% model = train(model, pos, neg, warp, randneg, iter,
% negiter, max_num_example... |
github | tylin/coco-dpm-master | myProcessOptions.m | .m | coco-dpm-master/external/minConf/myProcessOptions.m | 674 | utf_8 | b94d252a960faa95a3074129247619e6 | function [varargout] = myProcessOptions(options,varargin)
% Similar to processOptions, but case insensitive and
% using a struct instead of a variable length list
options = toUpper(options);
for i = 1:2:length(varargin)
if isfield(options,upper(varargin{i}))
v = getfield(options,upper(varargin{i}));
... |
github | tylin/coco-dpm-master | minConf_TMP.m | .m | coco-dpm-master/external/minConf/minConf/minConf_TMP.m | 8,349 | utf_8 | 052a45fe25f1cdc5f4335315689fd0d0 | function [x,f,funEvals] = minConF_BC(funObj,x,LB,UB,options)
% function [x,f] = minConF_BC(funObj,x,LB,UB,options)
%
% Function for using Two-Metric Projection to solve problems of the form:
% min funObj(x)
% s.t. LB_i <= x_i <= UB_i
%
% @funObj(x): function to minimize (returns gradient as second argument)
%
% ... |
github | tylin/coco-dpm-master | minConf_PQN.m | .m | coco-dpm-master/external/minConf/minConf/minConf_PQN.m | 8,454 | utf_8 | 1183c3fab815bb64f89ba0f331bcfa0b | function [x,f,funEvals] = minConf_PQN(funObj,x,funProj,options)
% function [x,f] = minConf_PQN(funObj,funProj,x,options)
%
% Function for using a limited-memory projected quasi-Newton to solve problems of the form
% min funObj(x) s.t. x in C
%
% The projected quasi-Newton sub-problems are solved the spectral projecte... |
github | tylin/coco-dpm-master | car_grammar_init.m | .m | coco-dpm-master/car_grammar/car_grammar_init.m | 13,056 | utf_8 | 1b454adf79d59de0d09fca2abb1ff4f5 | function model = car_grammar_init()
[front, angled, side] = train_car_views();
%model = make_car_grammar(front, side);
model = make_car_grammar_subtypes(front, angled, side);
%model = make_car_grammar_sharing(front, side);
%-------------------------------------------------------------------------
%
%----------------... |
github | tylin/coco-dpm-master | pascal_eval.m | .m | coco-dpm-master/test/pascal_eval.m | 2,032 | utf_8 | 35bafcc36b94e8cc5b9c6cbf88489724 | % ===================================================================
% TODO create a new evaluation function to output identical result as pascal_eval.m
% ===================================================================
function [ap, prec, recall] = pascal_eval(cls, ds, testset, year, suffix)
% Score detections us... |
github | tylin/coco-dpm-master | mkpartfilters.m | .m | coco-dpm-master/model/mkpartfilters.m | 3,172 | utf_8 | 8459b0bb36cc1aee00ad61c926975636 | function pfilters = mkpartfilters(filter, psize, num, scale)
% Make part filters from a source filter.
% pfilters = mkpartfilters(filter, psize, num, scale)
%
% Return value
% pfilters Part filters
%
% Arguments
% filter Source filter to make part filters from
% psize Part filter size
% num ... |
github | gcyuan/diHMM-master | plotModel.m | .m | diHMM-master/plotting/plotModel.m | 2,363 | utf_8 | 0546b1b333efee7e23c71e224ad78088 | function plotModel(model)
% PLOTMODEL plots model parameters given the model as input
%
% Author: Eugenio Marco
% We reorder the model to displayed it sorted by annotation
[~, newBinOrder] = sort(model.assignedBinAnnotations);
[~, newDomainOrder] = sort(model.assignedDomainAnnotations);
model = reorderModel(model... |
github | gcyuan/diHMM-master | plotStateLabels.m | .m | diHMM-master/plotting/plotStateLabels.m | 2,799 | utf_8 | 13ea264e8ccd29438682d2cc01d66d00 | function plotStateLabels(modelIn, orientation, indices, stateLabels, labelType)
% PLOTSTATELABELS helper function to display nice labels for states
%
% Author: Eugenio Marco
if ~exist('orientation', 'var')
orientation = 'horizontal';
end
if ~exist('stateLabels', 'var')
nB = modelIn.param.nB;
stateLab... |
github | gcyuan/diHMM-master | plotNucleosomeAnnotations.m | .m | diHMM-master/plotting/plotNucleosomeAnnotations.m | 1,074 | utf_8 | 3b577fd45aaa12154e63d5b53e1edac7 | function plotNucleosomeAnnotations
% PLOTNUCLEOSOMEANNOTATIONS function to display a legend with the available
% domain annotations
%
% Author: Eugenio Marco
binAnnotation = getBinAnnotations;
annotationsColor = reshape([binAnnotation.color],3,length(binAnnotation))'/255;
nAnnotations = size(annotationsColor,... |
github | gcyuan/diHMM-master | plotDomainAnnotations.m | .m | diHMM-master/plotting/plotDomainAnnotations.m | 1,080 | utf_8 | 13fc379ce2382a544ab33ffddc977ee5 | function plotDomainAnnotations
% PLOTDOMAINANNOTATIONS function to display a legend with the available
% domain annotations
%
% Author: Eugenio Marco
domainAnnotation = getDomainAnnotations;
annotationsColor = reshape([domainAnnotation.color],3,length(domainAnnotation))'/255;
nAnnotations = size(annotationsCol... |
github | gcyuan/diHMM-master | updateInitialModelParameters.m | .m | diHMM-master/main/updateInitialModelParameters.m | 3,540 | utf_8 | a144fcf59663a3d5022f048dc2f4c885 | function modelOut = updateInitialModelParameters(modelIn, data, param)
% UPDATEINITIALMODELPARAMETERS
% Given a state sequence, calculate the emission and transition
% probabilities
%
% Author: Eugenio Marco
cellTypes = fieldnames(data);
chrList = fieldnames(data.(cellTypes{1}));
modelOut = modelIn;
% Domain... |
github | gcyuan/diHMM-master | getInitialModel.m | .m | diHMM-master/main/getInitialModel.m | 10,052 | utf_8 | 2d41e3e3009fb98b7e21ad72ab685f36 | function model = getInitialModel(data, param)
% GETINITIALMODEL estimates the initial model parameters using different
% methods
% optional methods are
%
% KCENTER
% KMEANS
% RANDOM
% PCA
%
% kcenter implemented by Luca Pinello, using function from Yuan Yao PKU
%
% Other methods implementd by Eugenio ... |
github | gcyuan/diHMM-master | diHMMTrain.m | .m | diHMM-master/main/diHMMTrain.m | 10,226 | utf_8 | 98741c996c3539e9f31071223ae6f906 | function results = diHMMTrain(data, initialModel, param, chrList)
% DIHMMTRAIN function to train the Hierarchical Hidden Markov Model, diHMM
% Calculates a results structure containing the scaled forward and backward
% variables, scaling factors, posterior probabilities and loglikelihood for diHMM
%
% Author: E... |
github | gcyuan/diHMM-master | runDiHMMTrain.m | .m | diHMM-master/main/runDiHMMTrain.m | 4,742 | utf_8 | 4c8e480bbef7c45a4c019dc5fb487d6d | function runDiHMMTrain(cellTypes, genome, nB, nD, projectName, runNumber, varargin)
% RUNDIHMMTRAIN Main function to a train a model using diHMM
%
% Inputs are
%
% CELLTYPES, cell array with the names of the cell types to use for
% training the model
%
% GENOME, genome to use, needed to get chromosome lis... |
github | gcyuan/diHMM-master | saveBedFiles.m | .m | diHMM-master/io/saveBedFiles.m | 8,222 | utf_8 | 53dbed93a37722900114bb5699b3da38 | function saveBedFiles(baseName, model)
% SAVEBEDFILES function to generate bed files from the state calls
%
% Author: Eugenio Marco
[pathstr, ~, ~] = fileparts(baseName);
sepLocs = strfind(pathstr, filesep);
cellType = pathstr((sepLocs(end)+1):end);
filenameBinLevelStatesColor = [baseName '_binLevelStatesColor.bed'... |
github | gcyuan/diHMM-master | pdftops.m | .m | diHMM-master/extern/export_fig/pdftops.m | 3,574 | utf_8 | 92ff676904575e16046dfff010b4e145 | function varargout = pdftops(cmd)
%PDFTOPS Calls a local pdftops executable with the input command
%
% Example:
% [status result] = pdftops(cmd)
%
% Attempts to locate a pdftops executable, finally asking the user to
% specify the directory pdftops was installed into. The resulting path is
% stored for future refere... |
github | gcyuan/diHMM-master | crop_borders.m | .m | diHMM-master/extern/export_fig/crop_borders.m | 3,666 | utf_8 | ebb9c61581b6f0d4a2db2fd1d9e30685 | function [A, vA, vB, bb_rel] = crop_borders(A, bcol, padding)
%CROP_BORDERS Crop the borders of an image or stack of images
%
% [B, vA, vB, bb_rel] = crop_borders(A, bcol, [padding])
%
%IN:
% A - HxWxCxN stack of images.
% bcol - Cx1 background colour vector.
% padding - scalar indicating how much padding to ha... |
github | gcyuan/diHMM-master | isolate_axes.m | .m | diHMM-master/extern/export_fig/isolate_axes.m | 4,721 | utf_8 | 253cd7b7d8fc7cb00d0cc55926f32de5 | function fh = isolate_axes(ah, vis)
%ISOLATE_AXES Isolate the specified axes in a figure on their own
%
% Examples:
% fh = isolate_axes(ah)
% fh = isolate_axes(ah, vis)
%
% This function will create a new figure containing the axes/uipanels
% specified, and also their associated legends and colorbars. The objects
%... |
github | gcyuan/diHMM-master | im2gif.m | .m | diHMM-master/extern/export_fig/im2gif.m | 6,048 | utf_8 | 5a7437140f8d013158a195de1e372737 | %IM2GIF Convert a multiframe image to an animated GIF file
%
% Examples:
% im2gif infile
% im2gif infile outfile
% im2gif(A, outfile)
% im2gif(..., '-nocrop')
% im2gif(..., '-nodither')
% im2gif(..., '-ncolors', n)
% im2gif(..., '-loops', n)
% im2gif(..., '-delay', n)
%
% This function converts a mu... |
github | gcyuan/diHMM-master | read_write_entire_textfile.m | .m | diHMM-master/extern/export_fig/read_write_entire_textfile.m | 924 | utf_8 | 779e56972f5d9778c40dee98ddbd677e | %READ_WRITE_ENTIRE_TEXTFILE Read or write a whole text file to/from memory
%
% Read or write an entire text file to/from memory, without leaving the
% file open if an error occurs.
%
% Reading:
% fstrm = read_write_entire_textfile(fname)
% Writing:
% read_write_entire_textfile(fname, fstrm)
%
%IN:
% fname - Pathn... |
github | gcyuan/diHMM-master | pdf2eps.m | .m | diHMM-master/extern/export_fig/pdf2eps.m | 1,471 | utf_8 | a1f41f0c7713c73886a2323e53ed982b | %PDF2EPS Convert a pdf file to eps format using pdftops
%
% Examples:
% pdf2eps source dest
%
% This function converts a pdf file to eps format.
%
% This function requires that you have pdftops, from the Xpdf suite of
% functions, installed on your system. This can be downloaded from:
% http://www.foolabs.com/xpdf ... |
github | gcyuan/diHMM-master | print2array.m | .m | diHMM-master/extern/export_fig/print2array.m | 9,369 | utf_8 | ca18a1e6c5a944b591a0557bd69f1c2c | function [A, bcol] = print2array(fig, res, renderer, gs_options)
%PRINT2ARRAY Exports a figure to an image array
%
% Examples:
% A = print2array
% A = print2array(figure_handle)
% A = print2array(figure_handle, resolution)
% A = print2array(figure_handle, resolution, renderer)
% A = print2array(figure_handle... |
github | gcyuan/diHMM-master | append_pdfs.m | .m | diHMM-master/extern/export_fig/append_pdfs.m | 2,678 | utf_8 | 949c7c4ec3f5af6ff23099f17b1dfd79 | %APPEND_PDFS Appends/concatenates multiple PDF files
%
% Example:
% append_pdfs(output, input1, input2, ...)
% append_pdfs(output, input_list{:})
% append_pdfs test.pdf temp1.pdf temp2.pdf
%
% This function appends multiple PDF files to an existing PDF file, or
% concatenates them into a PDF file if the output fi... |
github | gcyuan/diHMM-master | using_hg2.m | .m | diHMM-master/extern/export_fig/using_hg2.m | 1,002 | utf_8 | b1620dd31f4d0b8acea2723e354a3518 | %USING_HG2 Determine if the HG2 graphics engine is used
%
% tf = using_hg2(fig)
%
%IN:
% fig - handle to the figure in question.
%
%OUT:
% tf - boolean indicating whether the HG2 graphics engine is being used
% (true) or not (false).
% 19/06/2015 - Suppress warning in R2015b; cache result for improved per... |
github | gcyuan/diHMM-master | eps2pdf.m | .m | diHMM-master/extern/export_fig/eps2pdf.m | 7,661 | utf_8 | ab0c84a2a57942e7e121faef8e0742df | function eps2pdf(source, dest, crop, append, gray, quality, gs_options)
%EPS2PDF Convert an eps file to pdf format using ghostscript
%
% Examples:
% eps2pdf source dest
% eps2pdf(source, dest, crop)
% eps2pdf(source, dest, crop, append)
% eps2pdf(source, dest, crop, append, gray)
% eps2pdf(source, dest, crop... |
github | gcyuan/diHMM-master | export_fig.m | .m | diHMM-master/extern/export_fig/export_fig.m | 54,007 | utf_8 | 32f46fe89fce17e6b2e57b732facbcf6 | function [imageData, alpha] = export_fig(varargin)
%EXPORT_FIG Exports figures in a publication-quality format
%
% Examples:
% imageData = export_fig
% [imageData, alpha] = export_fig
% export_fig filename
% export_fig filename -format1 -format2
% export_fig ... -nocrop
% export_fig ... -transparent
% ex... |
github | gcyuan/diHMM-master | ghostscript.m | .m | diHMM-master/extern/export_fig/ghostscript.m | 7,492 | utf_8 | 7a1e094c8bf153e1b239765ff6fd43df | function varargout = ghostscript(cmd)
%GHOSTSCRIPT Calls a local GhostScript executable with the input command
%
% Example:
% [status result] = ghostscript(cmd)
%
% Attempts to locate a ghostscript executable, finally asking the user to
% specify the directory ghostcript was installed into. The resulting path
% is s... |
github | gcyuan/diHMM-master | fix_lines.m | .m | diHMM-master/extern/export_fig/fix_lines.m | 6,290 | utf_8 | 8437006b104957762090e3d875688cb6 | %FIX_LINES Improves the line style of eps files generated by print
%
% Examples:
% fix_lines fname
% fix_lines fname fname2
% fstrm_out = fixlines(fstrm_in)
%
% This function improves the style of lines in eps files generated by
% MATLAB's print function, making them more similar to those seen on
% screen. Grid ... |
github | gcyuan/diHMM-master | freezeColors.m | .m | diHMM-master/extern/freezeColors/freezeColors.m | 9,815 | utf_8 | 2068d7a4f7a74d251e2519c4c5c1c171 | function freezeColors(varargin)
% freezeColors Lock colors of plot, enabling multiple colormaps per figure. (v2.3)
%
% Problem: There is only one colormap per figure. This function provides
% an easy solution when plots using different colomaps are desired
% in the same figure.
%
% freezeColors freeze... |
github | gcyuan/diHMM-master | kcenter.m | .m | diHMM-master/extern/kcenter/kcenter.m | 8,762 | utf_8 | 70e66cc0bb0a478dc724acdd6288450b | function [L, R, IDX, C, DL]=kcenter(X,k,L0,EorD)
% Farthest-First Traversal Algorithm as a 2-approximation for
% kcenter clustering
% [L,R,IDX,C,DL] = KCENTER(X,k,L0,EorD)
%
% INPUT:
% X - see description for input EorD.
% k - the number of centers to be chosen.
% L0 - the first centroid index.
% EorD - char... |
github | gcyuan/diHMM-master | getDomainBinEnrichments.m | .m | diHMM-master/statistics/getDomainBinEnrichments.m | 4,261 | utf_8 | 5d5665461196b94df567fe9810e33ad4 | function domainBinEnrichments = getDomainBinEnrichments(modelFinal)
% GETDOMAINBINENRICHMENTS Function to calculate for each domain
% enrichment into nucleosome-level states
%
% Author: Eugenio Marco
cellTypes = fieldnames(modelFinal.states);
chrList = fieldnames(modelFinal.states.(cellTypes{1}));
binSize = mo... |
github | gcyuan/diHMM-master | calculateBasicModelStatistics.m | .m | diHMM-master/statistics/calculateBasicModelStatistics.m | 16,312 | utf_8 | c50ba6120a1adf079f84059ad11e0ae0 | function calculateBasicModelStatistics(cellTypes, nB, nD, projectName, runNumber)
% CALCULATEBASICMODELSTATISTICS Function that creates plots for state coverages and
% enrichments of domains into nucleosome-level states
%
% Author: Eugenio Marco
baseName = getRunBaseName(projectName, cellTypes, runNumber, nB, n... |
github | qinhongwei/depth-enhancement-master | AnisotropicDiffusion.m | .m | depth-enhancement-master/AnisotropicDiffusion.m | 1,344 | utf_8 | 3a46a7014aa884e486a69f00410476fc | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Function Name: AnisotropicDiffusion
%Aim: Guided depth upsample based on anisotropic diffusion
%Output:
% Result - The output depth map
%Input:
% color - Color image
% depth - Sparse depth map
% sigma_w - Coeffi... |
github | qinhongwei/depth-enhancement-master | BilateralFilter.m | .m | depth-enhancement-master/BilateralFilter.m | 2,053 | utf_8 | ad76e85d170f0f056ff0467a5c4a6a79 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Function Name: BilateralFilter
%Aim: Use the bilateral filter to upsample the depth map
%Output:
% Result - The output depth map after bilateral filtering
%Input:
% color - Color image
% depth - Depth map
% sigma_w ... |
github | qinhongwei/depth-enhancement-master | JointBilateralUpsample.m | .m | depth-enhancement-master/JointBilateralUpsample.m | 2,484 | utf_8 | c7266b32dcb4f88a426fade4b71ebd73 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Function Name: JointBilateralUpsample
%Aim: Use the joint bilateral upsample method to upsample the depth map
%Output:
% Result - The output depth map after bilateral filtering
%Input:
% color - High resolution color image
% d... |
github | qinhongwei/depth-enhancement-master | NoiseAwareFilter.m | .m | depth-enhancement-master/NoiseAwareFilter.m | 3,150 | utf_8 | 9f0369228da55d8c844182f92a2bc154 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Function Name: NoiseAwareFilter
%Aim: Use the NoiseAware bilateral filter to upsample the depth map
%Output:
% Result - The output depth map after bilateral filtering
%Input:
% color - Color image
% depth - Depth map
% ... |
github | qinhongwei/depth-enhancement-master | AP_GCP.m | .m | depth-enhancement-master/AP_GCP.m | 5,856 | utf_8 | 32655ef4efeca3b73fef7768b61b214f | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Function Name: AP_GCP
%Aim: adaptive propagation from sparse ground controls points
%Output:
% Result - the output depth data
%Input:
% Image - Input color image
% SampleDepth - Depth map need upsampling
% Height - ... |
github | qinhongwei/depth-enhancement-master | ColorSmoothnessList.m | .m | depth-enhancement-master/ColorSmoothnessList.m | 1,300 | utf_8 | d451cb8d3726c4dc0ad9b0b97ecc9803 | function list = ColorSmoothnessList(color,sigma)
%Calculate the smoothness list of a 3 - channel color image
%Output:
% output - the output list
%Input:
% color - Input color image
% sigma - Coefficient of gaussian kernel for color similarity
%Code Author:
% Liu Junyi, Zhejiang ... |
github | qinhongwei/depth-enhancement-master | ADMatrix.m | .m | depth-enhancement-master/ADMatrix.m | 2,079 | utf_8 | e0cae3cc89219cc97935c6ba0eb5b3a0 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Function Name: ADMatrix
%Aim: Calculate the N * N matrix (A) for anisotropic difffusion model
%Output:
% output - the output sparse matrix
%Input:
% color - Input color image
% depth - Input sparse depth map
% sigma... |
github | qinhongwei/depth-enhancement-master | FastBilateralFilter.m | .m | depth-enhancement-master/FastBilateralFilter.m | 6,880 | utf_8 | e2cb409016e7b7c9670137292be8f469 | %
% output = bilateralFilter( data, edge, ...
% edgeMin, edgeMax, ...
% sigmaSpatial, sigmaRange, ...
% samplingSpatial, samplingRange )
%
% Bilateral and Cross-Bilateral Filter using the Bilateral Grid.
%
% Bilaterally filters the image... |
github | qinhongwei/depth-enhancement-master | WeightedModeFilter.m | .m | depth-enhancement-master/WeightedModeFilter.m | 2,410 | utf_8 | a93c45f573b53e4d515a4ba8ee848961 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Function Name: WeightedModeFilter
%Aim: Use the weighted mode filter to upsample the depth map
%Output:
% Result - The output depth map
%Input:
% color - Color image
% depth - Depth map (the same size as the color image)
... |
github | foucart/Basc-master | basc.m | .m | Basc-master/basc_v1.0/basc/basc.m | 19,823 | utf_8 | 080fffacb047e907be5b9fe6c025a55c | %%
% basc.m
% Computes best constrained approximants by solving semidefinite programs
%
% Finds the best approximation to a target function
% by a polynomial or spline of given degree
% under a certain number of convex constraints
% relative to a weighted max-norm on [-1,1],
% a q-norm on [-1,1] for an even integer q... |
github | foucart/Basc-master | Bernstein_conv.m | .m | Basc-master/basc_v1.0/documentation/Bernstein_conv.m | 4,471 | utf_8 | 1650468b4c43000f784829f86fee9a02 | % Bernstein_conv.m
% Computes E_n^{conv}(|.|) by solving a semidefinite program
% Finds the error of best approximation to the absolute value function
% by a convex algebraic polynomial of degree n in the infinity-norm on [-1,1]
% and rescales by a factor n
%
% Usage: [minimum,minimizer] = Bernstein_conv(n)
%
% n: t... |
github | foucart/Basc-master | leg2cheb.m | .m | Basc-master/basc_v1.0/chebfun-master/leg2cheb.m | 9,860 | utf_8 | 99376f6a286d208e1ee49a1968cb53f8 | function c_cheb = leg2cheb(c_leg, normalize, M)
%LEG2CHEB convert Legendre coefficients to Chebyshev coefficients.
% C_CHEB = LEG2CHEB(C_LEG) converts the vector C_LEG of Legendre coefficients
% to a vector C_CHEB of Chebyshev coefficients such that C_CHEB(N)*T0 + ... +
% C_CHEB(1)*T{N-1} = C_LEG(N)*P0 + ... + C... |
github | foucart/Basc-master | lagpts.m | .m | Basc-master/basc_v1.0/chebfun-master/lagpts.m | 7,075 | utf_8 | 303b63b5b2ebb6f74dc942b5ded71c38 | function [x, w, v] = lagpts(n, int, meth)
%LAGPTS Laguerre points and Gauss-Laguerre Quadrature Weights.
% LAGPTS(N) returns N Laguerre points X in (0,inf).
%
% [X, W] = LAGPTS(N) returns also a row vector W of weights for Gauss-Laguerre
% quadrature. [X, W, V] = LAGPTS(N) returns in addition a column vector V
%... |
github | foucart/Basc-master | ratinterp.m | .m | Basc-master/basc_v1.0/chebfun-master/ratinterp.m | 21,005 | utf_8 | 3da651c74cefb90af5f17368564b2568 | function [p, q, r, mu, nu, poles, residues] = ratinterp(varargin)
%RATINTERP Robust rational interpolation or least-squares approximation.
% [P, Q, R_HANDLE] = RATINTERP(F, M, N) computes the (M, N) rational
% interpolant of F on the M + N + 1 Chebyshev points of the second kind. F
% can be a CHEBFUN, a function... |
github | foucart/Basc-master | lebesgue.m | .m | Basc-master/basc_v1.0/chebfun-master/lebesgue.m | 2,643 | utf_8 | 60c4eb7c11bc20be93df314f25c3a374 | function [L, Lconst] = lebesgue(x, varargin)
%LEBESGUE Lebesgue function for a set of interpolation points.
% L = LEBESGUE(X), where X is a set of points in [-1, 1], returns the
% Lebesgue function associated with polynomial interpolation in those points.
%
% L = LEBESGUE(X, a, b) or LEBESGUE(X, [a, b]), where ... |
github | foucart/Basc-master | chebguiWindow.m | .m | Basc-master/basc_v1.0/chebfun-master/chebguiWindow.m | 65,937 | utf_8 | afacf5588d24b7918a3b0251b09deeab | function varargout = chebguiWindow(varargin)
%CHEBGUIWINDOW Driver file for Chebfun's CHEBGUI
% This m-file populates and controls Chebfun's CHEBGUI.
%
% See also CHEBGUI.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DEVELOPER NOTE:
% This method implements most callback meth... |
github | foucart/Basc-master | fov.m | .m | Basc-master/basc_v1.0/chebfun-master/fov.m | 4,246 | utf_8 | b90392af69ce3f13c76e83fbfe7ea11f | function [f, lineSegs, theta] = fov(A, pref)
%FOV Field of values (numerical range) of matrix A.
% F = FOV(A), where A is a square matrix, returns a CHEBFUN F with domain [0
% 2*pi]. The image F([0 pi]) is a curve describing the extreme points of the
% boundary of the field of values A, a convex region in the c... |
github | foucart/Basc-master | jacpts.m | .m | Basc-master/basc_v1.0/chebfun-master/jacpts.m | 26,231 | utf_8 | d2578abedb523f93d9899936c5517cbf |
function [x, w, v] = jacpts(n, a, b, int, meth)
%JACPTS Gauss-Jacobi Quadrature Nodes and Weights.
% X = JACPTS(N, ALPHA, BETA) returns the N roots of the degree N Jacobi
% polynomial with parameters ALPHA and BETA (which must both be greater than
% or equal -1) where the Jacobi weight function is defined by w(... |
github | foucart/Basc-master | chebtest.m | .m | Basc-master/basc_v1.0/chebfun-master/chebtest.m | 14,467 | utf_8 | 024892758fdf600684cc0cbee601cb86 | function varargout = chebtest(varargin)
%CHEBTEST Run Chebfun test suite.
% CHEBTEST executes all of the m-files found in the top level folders of the
% directory $chebfunroot/tests/. These m-files should return a scalar,
% vector, or matrix of logical values. A test is deemed to pass if all the
% returned va... |
github | foucart/Basc-master | chebsnake.m | .m | Basc-master/basc_v1.0/chebfun-master/chebsnake.m | 7,204 | utf_8 | 292909ba4fbaadb0dd8dbaa5de673cb8 | function chebsnake(nodes,alpha)
%CHEBSNAKE Chebfun snake game.
% CHEBSNAKE() plays a twist on a classic game where you must feed the snake
% with more and more interpolation nodes, but avoid that it hits the boundary
% or itself! Use the arrow keys to control the snake. Any other key will quit
% the game.
%
%... |
github | foucart/Basc-master | chebguiEdit.m | .m | Basc-master/basc_v1.0/chebfun-master/chebguiEdit.m | 4,852 | utf_8 | 4f3f0456ae9d19fb6d06e8d4fe5ef325 | function varargout = chebguiEdit(varargin)
%CHEBGUIEDIT CHEBGUI edittor.
% A CHEBGUIEDIT figure gets created when a user right-clicks the input fields
% of the CHEBGUI figure. It is not intended for use in any other context.
% Copyright 2014 by The University of Oxford and The Chebfun Developers.
% See http://w... |
github | foucart/Basc-master | pdeset.m | .m | Basc-master/basc_v1.0/chebfun-master/pdeset.m | 3,977 | utf_8 | 3d30f4f1815aad700ce1cb1f107e9663 | function varargout = pdeset(varargin)
%PDESET Set options for PDE15S
% PDESET('NAME1', VALUE1, 'NAME2', VALUE2,...) creates options for the
% CHEBFUN/PDE15S() routine. It acts as a gateway to ODESET() for the usual ODE
% options for use in advancing through time, in addition to some new options.
%
% OPTIONS ... |
github | foucart/Basc-master | diffmat.m | .m | Basc-master/basc_v1.0/chebfun-master/diffmat.m | 19,505 | utf_8 | f5329392f8565bb9a7da05ed06fe0f21 | function D = diffmat(N, varargin)
%DIFFMAT Spectral differentiation matrix.
% D = DIFFMAT(N) returns the N x N differentiation matrix associated with the
% Chebyshev spectral collocation method at second-kind Chebyshev points.
%
% D = DIFFMAT(N, P) returns the N x N differentiation matrix of order P.
%
% D =... |
github | foucart/Basc-master | legpts.m | .m | Basc-master/basc_v1.0/chebfun-master/legpts.m | 15,231 | utf_8 | e9a5911828697a33814706f4fc82fed7 | function [x, w, v, t] = legpts(n, int, meth)
%LEGPTS Legendre points and Gauss-Legendre Quadrature Weights.
% LEGPTS(N) returns N Legendre points X in (-1,1).
%
% [X, W] = LEGPTS(N) returns also a row vector W of weights for Gauss-Legendre
% quadrature.
%
% [X, W] = LEGPTS(N, INTERVAL) scales the node... |
github | foucart/Basc-master | blowup.m | .m | Basc-master/basc_v1.0/chebfun-master/blowup.m | 4,593 | utf_8 | 273235e5b3abbbba1cab81ad35bb8dc5 | function varargout = blowup(on_off)
%BLOWUP CHEBFUN blowup option.
% CHEBFUN offers limited support for function which diverge to infinity on
% their domain. The 'blowup' flag will determine whether such behaviour is
% detected automatically. In particular;
% BLOWUP(0) (or BLOWUP('off')): bounded function... |
github | foucart/Basc-master | chebpts.m | .m | Basc-master/basc_v1.0/chebfun-master/chebpts.m | 4,212 | utf_8 | b254b94307ef575d1a75bb586d3d9ca2 | function [x, w, v, t] = chebpts(n, dom, type)
%CHEBPTS Chebyshev points.
% CHEBPTS(N) returns N Chebyshev points of the 2nd-kind in [-1,1].
%
% CHEBPTS(N, D), where D is vector of length 2 and N is a scalar integer,
% scales the nodes and weights for the interval [D(1),D(2)]. If length(D) > 2
% and N a vecto... |
github | foucart/Basc-master | hermpts.m | .m | Basc-master/basc_v1.0/chebfun-master/hermpts.m | 7,880 | utf_8 | a2a5480a19eaa0806b87b8c00e75b80b | function [x, w, v] = hermpts(n, varargin)
%HERMPTS Hermite points and Gauss-Hermite Quadrature Weights.
% HERMPTS(N) returns N Hermite points X in (-inf, inf). By default these are
% roots of the 'physicist'-type Hermite polynomials, which are orthogonal with
% respect to the weight exp(-x.^2).
%
% HERMPTS(N,... |
github | foucart/Basc-master | cheb2leg.m | .m | Basc-master/basc_v1.0/chebfun-master/cheb2leg.m | 10,066 | utf_8 | cf3be449083edf7c7f5be0d9536cbad3 | function c_leg = cheb2leg(c_cheb, normalize, M)
%LEG2CHEB Convert Chebyshev coefficients to Legendre coefficients.
% C_LEG = CHEB2LEG(C_CHEB) converts the vector C_CHEB of Chebyshev
% coefficients to a vector C_LEG of Legendre coefficients such that
% C_CHEB(1)*T0 + ... + C_CHEB(N)*T{N-1} = C_LEG(1)*P0 + ... +... |
github | foucart/Basc-master | chebvar.m | .m | Basc-master/basc_v1.0/chebfun-master/chebvar.m | 1,829 | utf_8 | 8f7ee34b80e1919ab2d1633d085567ae | function chebvar(varargin)
%CHEBVAR Short-cut for constructing CHEBFUN variables.
% CHEBVAR arg1 arg2 ...
% is short-hand notation for creating symbolic variables
% arg1 = chebfun('arg1');
% arg2 = chebfun('arg2'); ...
% The outputs are created in the current workspace.
%
% CHEBVAR arg1 arg2... |
github | foucart/Basc-master | classicCheck.m | .m | Basc-master/basc_v1.0/chebfun-master/@fourtech/classicCheck.m | 7,134 | utf_8 | 54b97b0e9966e2cad333693bf7c8eb90 | function [ishappy, epslevel, cutoff] = classicCheck(f, pref)
%CLASSICCHECK Attempt to trim trailing Fourier coefficients in a FOURTECH.
% [ISHAPPY, EPSLEVEL, CUTOFF] = CLASSICCHECK(F, VALUES) returns an estimated
% location, the CUTOFF, at which the FOURTECH F could be truncated to maintain
% an accuracy of EPS... |
github | foucart/Basc-master | cumsum.m | .m | Basc-master/basc_v1.0/chebfun-master/@fourtech/cumsum.m | 5,386 | utf_8 | c9fe9d2e2149a550dc87b55e1d706069 | function f = cumsum(f, m, dim)
%CUMSUM Indefinite integral of a FOURTECH.
% CUMSUM(F) is the indefinite integral of the FOURTECH F, whose mean
% is zero, with the constant of integration chosen so that F(-1) = 0.
% If the mean of F is not zero then an error is thrown since the indefinite
% integral would no l... |
github | foucart/Basc-master | refine.m | .m | Basc-master/basc_v1.0/chebfun-master/@fourtech/refine.m | 2,858 | utf_8 | 9d58e6df6b81e0044387a37de00e665e | function [values, giveUp] = refine(op, values, pref)
%REFINE Refinement method for FOURTECH construction.
% Copyright 2014 by The University of Oxford and The Chebfun Developers.
% See http://www.chebfun.org/ for Chebfun information.
% Obtain some preferences:
if ( nargin < 3 )
pref = fourtech.techPref();
end
... |
github | foucart/Basc-master | fourstripplot.m | .m | Basc-master/basc_v1.0/chebfun-master/@fourtech/fourstripplot.m | 2,292 | utf_8 | 32a76fad6d806a6184a95c54b74ed419 | function varargout = fourstripplot(u, varargin)
%FOURSTRIPPLOT Plot the strip of analyticity.
% FOURSTRIPPLOT(U) plots estimated strip of analyticity in the complex plane
% for U. The width of the strip is 2*a(k)=1/N(k)/pi*log(4/EPS+1), where EPS is
% the EPSLEVEL of U and N(k) is the number of Fourier modes.
%... |
github | foucart/Basc-master | fourtech.m | .m | Basc-master/basc_v1.0/chebfun-master/@fourtech/fourtech.m | 16,121 | utf_8 | 8d85fb31a7f756e3cb340da97a9f8e89 | classdef fourtech < smoothfun
%FOURTECH Approximate smooth periodic functions on [-1,1] with Fourier
% interpolants.
%
% Class for approximating smooth periodic functions on the interval [-1,1]
% using function values at equally spaced points on [-1,1).
%
% Constructor inputs:
% FOURTECH(OP) construc... |
github | foucart/Basc-master | qr.m | .m | Basc-master/basc_v1.0/chebfun-master/@fourtech/qr.m | 3,256 | utf_8 | f886d0c89d5cddf4826e2550dbca59d8 | function [Q, R, E] = qr(f, outputFlag)
%QR QR factorisation of an array-valued FOURTECH.
% [Q, R] = QR(F) returns a QR factorisation of F such that F = Q*R, where the
% FOURTECH Q is orthogonal (with respect to the continuous L^2 norm on [-1,1])
% and of the same size as F and R is an m x m upper-triangular mat... |
github | foucart/Basc-master | feval.m | .m | Basc-master/basc_v1.0/chebfun-master/@fourtech/feval.m | 2,360 | utf_8 | 3187a0fcc707fa8208e6639ce863b31f | function y = feval(f, x)
%FEVAL Evaluate a FOURTECH.
% Y = FEVAL(F, X) Evaluation of the FOURTECH F at points X via
% Horner's scheme.
%
% If size(F, 2) > 1 then FEVAL returns values in the form [F_1(X), F_2(X),
% ...], where size(F_k(X)) = size(X).
%
% Example:
% f = fourtech(@(x) exp(cos(pi*x)) );
% ... |
github | foucart/Basc-master | diff.m | .m | Basc-master/basc_v1.0/chebfun-master/@fourtech/diff.m | 3,314 | utf_8 | 28638bdc84ac787be661e58177b81bdc | function f = diff(f, k, dim)
%DIFF Derivative of a FOURTECH.
% DIFF(F) is the derivative of F and DIFF(F, K) is the Kth derivative.
%
% DIFF(F, K, DIM), where DIM is one of 1 or 2, takes the Kth difference along
% dimension DIM. For DIM = 1, this is the same as above. For DIM = 2, this
% is a finite differenc... |
github | foucart/Basc-master | refine.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebtech1/refine.m | 5,112 | utf_8 | acbea4ff07d6214e921319e344efa593 | function [values, giveUp] = refine(op, values, pref)
%REFINE Refinement method for CHEBTECH1 construction.
% VALUES = REFINE(OP, VALUES, PREF) determines the new VALUES of the operator
% OP to be checked for happiness in the CHEBTECH1 construction process. The
% exact procedure used is determined by PREF.REFINE... |
github | foucart/Basc-master | chebtech1.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebtech1/chebtech1.m | 7,002 | utf_8 | 6d2a4c731e2a28d186d307a8b669f15d | classdef chebtech1 < chebtech
%CHEBTECH1 Approximate smooth functions on [-1,1] with Chebyshev interpolants.
%
% Class for approximating smooth functions on the interval [-1,1]
% using function values at 1st-kind Chebyshev points and coefficients of the
% corresponding 1st-kind Chebyshev series expansion.
%
% C... |
github | foucart/Basc-master | compose.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebtech1/compose.m | 4,317 | utf_8 | 5d444df3280d7992a861862b8127894d | function f = compose(f, op, g, data, pref)
%COMPOSE Composition of CHEBTECH1 objects.
% COMPOSE(F, OP) returns a CHEBTECH1 representing OP(F), where F is also a
% CHEBTECH1 object, and OP is a function handle.
%
% COMPOSE(F, OP, G) returns a CHEBTECH1 representing OP(F, G), where F and G
% are CHEBTECH object... |
github | foucart/Basc-master | classicCheck.m | .m | Basc-master/basc_v1.0/chebfun-master/@chebtech/classicCheck.m | 6,613 | utf_8 | 6d4d49a67302549b05796bc11246fb0f | function [ishappy, epslevel, cutoff] = classicCheck(f, values, pref)
%CLASSICCHECK Attempt to trim trailing Chebyshev coefficients in a CHEBTECH.
% [ISHAPPY, EPSLEVEL, CUTOFF] = CLASSICCHECK(F, VALUES) returns an estimated
% location, the CUTOFF, at which the CHEBTECH F could be truncated to maintain
% an accur... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.