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 | ethz-micro/matlab_nanonis-master | experiment_clamPoints.m | .m | matlab_nanonis-master/Examples/NanoLib_micro/+clam/+load/experiment_clamPoints.m | 7,518 | utf_8 | 4795dfff6aa10bb7e08ec0b50e10f239 | function varargout = experiment_clamPoints(action,varargin)
narginchk(1,3)
switch action
case 'get experiment'
varargout{1} = 'CLAMPoints-dat';
case 'process header'
header = varargin{1};
varargout{1} = processHeader(header);
case 'process data'
header =... |
github | ethz-micro/matlab_nanonis-master | experiment_clamPoints_pyton.m | .m | matlab_nanonis-master/Examples/NanoLib_micro/+clam/+load/experiment_clamPoints_pyton.m | 5,686 | utf_8 | 65a82ab31a3f16eb0c539ea370e3dc01 | function varargout = experiment_clamPoints_pyton(action,varargin)
narginchk(1,3)
switch action
case 'get experiment'
varargout{1} = 'CLAM-python-txt';
case 'process header'
header = varargin{1};
varargout{1} = processHeader(header);
case 'process data'
h... |
github | ethz-micro/matlab_nanonis-master | DAT.m | .m | matlab_nanonis-master/Examples/Dat_viewer/DAT.m | 16,950 | utf_8 | 4b0a8bea78aac67a8eafb8a6eee69af1 | function DAT(varargin)
%sSize = get(0,'screensize');
% Create and then hide the UI as it is being constructed.
hDAT = figure('Name','DAT_Viewer','Visible','off',...
'Position',[50,50,340,670],'Tag','DAT_Viewer');
DAT_CreateFcn(hDAT);
set(hDAT,'DeleteFcn',@(hObject,eventdata)closeViewer(hObject,eventdata,guida... |
github | ethz-micro/matlab_nanonis-master | plotData.m | .m | matlab_nanonis-master/NanoLib/+sxm/+plot/plotData.m | 2,980 | utf_8 | 55e07bbf31334264d43d6a68a644d071 | function [h, range] = plotData(data,name,unit,header,varargin)
switch header.scan_type
case 'STM'
range = rangeSTM(data);
case {'NFESEM','SEMPA'}
range = rangeNFESEM(data);
otherwise
range=[-1 1]*(prctile(data(:),75)-prctile(data(:),25))+nanmean(data(:));
... |
github | ethz-micro/matlab_nanonis-master | folder2png.m | .m | matlab_nanonis-master/NanoLib/+sxm/+plot/folder2png.m | 3,428 | utf_8 | 05023241d382148616d9cc3e4465d6ca | function folder2png(folderName)
%load all files in folder named 'foldername'
%and saves them as png pictures in an 'images' folder
%Create an images folder
imgFolder = [folderName, '/images/'];
mkdir(imgFolder);
%Search all sxm files
files = dir([folderName, '/*.sxm']);
%L... |
github | ethz-micro/matlab_nanonis-master | processChannel.m | .m | matlab_nanonis-master/NanoLib/+sxm/+load/processChannel.m | 3,134 | utf_8 | 7ff13c9143e99f7039600e375922c4e8 | function channel = processChannel(channel,header,varargin)
%Orientate the data
channel.data = orientateData(channel.data,channel.Direction,header.scan_dir);
%Specific process
switch header.scan_type
case {'NFESEM','SEMPA'}
%The units become number of counts per second = [freque... |
github | ethz-micro/matlab_nanonis-master | loadProcessedSxM.m | .m | matlab_nanonis-master/NanoLib/+sxm/+load/loadProcessedSxM.m | 6,498 | utf_8 | f854d943a3f9a10c76a89ecdbfe29551 | function file=loadProcessedSxM(fn, varargin)
%%
corrStr='';
channelDir = 'both';
ch_idx = nan(size(varargin));
channelNum = [];
if nargin > 1
for i = 1:numel(varargin)
if isfloat(varargin{i})
channelNum = varargin{i};
else
switch ... |
github | ethz-micro/matlab_nanonis-master | getMask.m | .m | matlab_nanonis-master/NanoLib/+sxm/+mask/getMask.m | 1,589 | utf_8 | 9fafb2b6425997ada8ecca33791b2111 | function [maskUp, maskDown, flatData] = getMask(data,pixSize, prctUp, prctDown,varargin)%fn, varargin
%getMask creates a mask for the detection of pattern. It will filter the
%datas using FFT, flatten the datas with a sliding mean and take a
%threshold to cut the datas
% prctUp and -Down specify the f... |
github | ethz-micro/matlab_nanonis-master | convolve2.m | .m | matlab_nanonis-master/NanoLib/+sxm/+convolve2/convolve2.m | 5,539 | utf_8 | 7f79e1cf99c79b899bb83f3ca6757af5 | function y = convolve2(x, m, shape, tol)
%CONVOLVE2 Two dimensional convolution.
% Y = CONVOLVE2(X, M) performs the 2-D convolution of matrices X and
% M. If [mx,nx] = size(X) and [mm,nm] = size(M), then size(Y) =
% [mx+mm-1,nx+nm-1]. Values near the boundaries of the output array are
% calculated as if X was s... |
github | ethz-micro/matlab_nanonis-master | exindex.m | .m | matlab_nanonis-master/NanoLib/+sxm/+convolve2/exindex.m | 9,835 | utf_8 | abe5b0ee2b5b9191c2913af2070fd137 | function arr = exindex(arr, varargin)
%EXINDEX extended array indexing
% ARROUT = EXINDEX(ARRIN, S1, S2, ...) indexes a virtual array made by
% extending ARRIN with zeros in all directions, using subscripts S1, S2
% etc.
%
% ARROUT = EXINDEX(ARRIN, S1, R1, S2, R2, ...) extends ARRIN using rule
% R1 on ... |
github | ethz-micro/matlab_nanonis-master | getRadialNoise.m | .m | matlab_nanonis-master/NanoLib/+sxm/+op/getRadialNoise.m | 5,321 | utf_8 | 778e0e85b3a1eea8c561fd8dcabeedb0 | function [noise_fit,signal_start,signal_error, noise_coeff] =getRadialNoise(wavelength, radial_average,varargin)
% This function tries to extract the noise from the data
% it takes the radius and the corresponding amplitude.
% The third argument is the max number of noises it tries to find (default = 10)
... |
github | ethz-micro/matlab_nanonis-master | getRadialFFT.m | .m | matlab_nanonis-master/NanoLib/+sxm/+op/getRadialFFT.m | 2,084 | utf_8 | 8c93e9665e0243a59b695bf166721ef9 | function [wavelength, radial_spectrum] =getRadialFFT(data,varargin)
%Gives the radial amplitude for a given pixel wavelength
%Removes mean for FFT
data=data-nanmean(data(:));
%Removes nan data
data(isnan(data))=0;
%Get fourrier transform
img=abs(fft2(data));
%Reorder fourrier data
... |
github | ethz-micro/matlab_nanonis-master | nanonisMap.m | .m | matlab_nanonis-master/NanoLib/+sxm/+op/nanonisMap.m | 1,435 | utf_8 | 11e1fe7e5e97c7573e1538d4b2112d92 | function colorMap = nanonisMap(nPti)
% return nPti number of color distributed over the rgm colormap
% defined below
%
% input: nPti = integer number of the number of colors
%
% outpu: colorMap = nPti x 3 rgb color matrix
%
narginchk(0,1)
if nargin == 0
nPti = 64;
end
% RGB map of the nanonis colors
rgbPti = [... |
github | ethz-micro/matlab_nanonis-master | loaddat.m | .m | matlab_nanonis-master/NanoLib/+dat/+load/loaddat.m | 1,785 | utf_8 | bb5755acbf6edd67f8e74f583e588987 | function [header, data, channels] = loaddat(fn)
% loaddat Nanonis DAT ASCII file loader
% [header, data, channels] = loaddat(fn) reads a Nanonis
% DAT ASCII file fn.
% fn: path of the .dat file to read.
% header: header info of the data file.
% data: contains the data of all channels, each column in t... |
github | ethz-micro/matlab_nanonis-master | experiment_biasSpectroscopy.m | .m | matlab_nanonis-master/NanoLib/+dat/+load/experiment_biasSpectroscopy.m | 2,106 | utf_8 | 33e8b0d798b82f9c38f835f7628c56a7 | function varargout = experiment_biasSpectroscopy(action,varargin)
narginchk(1,3)
switch action
case 'get experiment'
varargout{1} = 'bias spectroscopy';
case 'process header'
header = varargin{1};
varargout{1} = processHeader(header);
case 'process data'
... |
github | ethz-micro/matlab_nanonis-master | experiment_history.m | .m | matlab_nanonis-master/NanoLib/+dat/+load/experiment_history.m | 1,501 | utf_8 | 891a490636617dbfa279e99fb590b75a | function varargout = experiment_history(action,varargin)
narginchk(1,3)
switch action
case 'get experiment'
varargout{1} = 'History Data';
case 'process header'
header = varargin{1};
varargout{1} = processHeader(header);
case 'process data'
header =... |
github | ethz-micro/matlab_nanonis-master | experiment_myLongTerm.m | .m | matlab_nanonis-master/NanoLib/+dat/+load/experiment_myLongTerm.m | 1,083 | utf_8 | 948e712fd30c7f9a632fed9c6faa76a5 | function varargout = experiment_myLongTerm(action,varargin)
narginchk(1,3)
switch action
case 'get experiment'
varargout{1} = 'myLongTerm';
case 'process header'
header = varargin{1};
varargout{1} = processHeader(header);
case 'process data'
head... |
github | ethz-micro/matlab_nanonis-master | experiment_oscilloscope.m | .m | matlab_nanonis-master/NanoLib/+dat/+load/experiment_oscilloscope.m | 1,085 | utf_8 | c094adc041c3ac4a1a8ed0acb9b5c5b0 | function varargout = experiment_oscilloscope(action,varargin)
narginchk(1,3)
switch action
case 'get experiment'
varargout{1} = 'Oscilloscope';
case 'process header'
header = varargin{1};
varargout{1} = processHeader(header);
case 'process data'
he... |
github | ethz-micro/matlab_nanonis-master | experiment_spectrum.m | .m | matlab_nanonis-master/NanoLib/+dat/+load/experiment_spectrum.m | 1,077 | utf_8 | 8b86a48089bab8844c34bd4c9fbc7bec | function varargout = experiment_spectrum(action,varargin)
narginchk(1,3)
switch action
case 'get experiment'
varargout{1} = 'Spectrum';
case 'process header'
header = varargin{1};
varargout{1} = processHeader(header);
case 'process data'
header = ... |
github | ethz-micro/matlab_nanonis-master | getAllExperiments.m | .m | matlab_nanonis-master/NanoLib/+dat/+load/getAllExperiments.m | 2,735 | utf_8 | f777cf26a67cd51e69b72f7700e709fb | function experimentList = getAllExperiments()
%GETALLEXPERIMENTS - seraches for the functions called experiments_type
% within the NanoLib libreary. Additionally this function looks for user
% defined package folder in the matlab_nanonis_experiments folder which
% may be created in the same folder where the project was... |
github | ethz-micro/matlab_nanonis-master | experiment_longTerm.m | .m | matlab_nanonis-master/NanoLib/+dat/+load/experiment_longTerm.m | 1,051 | utf_8 | 624ff6d57b677e209f07d98b73f421aa | function varargout = experiment_longTerm(action,varargin)
narginchk(1,3)
switch action
case 'get experiment'
varargout{1} = 'LongTerm Data';
case 'process header'
header = varargin{1};
varargout{1} = processHeader(header);
case 'process data'
header... |
github | hanshuting/hydra_behavior-master | derivative7.m | .m | hydra_behavior-master/embedding/utilities/derivative7.m | 3,752 | utf_8 | 59ac2311726917925b934ce48b7ae87f | % DERIVATIVE5 - 7-Tap 1st and 2nd discrete derivatives
%
% This function computes 1st and 2nd derivatives of an image using the 7-tap
% coefficients given by Farid and Simoncelli. The results are significantly
% more accurate than MATLAB's GRADIENT function on edges that are at angles
% other than vertical or horizont... |
github | hanshuting/hydra_behavior-master | d2p_sparse.m | .m | hydra_behavior-master/embedding/t_sne/d2p_sparse.m | 3,955 | utf_8 | 7f28b70414120214724d18d5268c6326 | function [P, beta] = d2p_sparse(D, u, tol, maxNeighbors)
%D2P Identifies appropriate sigma's to get kk NNs up to some tolerance
%
% [P, beta] = d2p(D, kk, tol)
%
% Identifies the required precision (= 1 / variance^2) to obtain a Gaussian
% kernel with a certain uncertainty for every datapoint. The desired
% uncerta... |
github | chipaudette/OpenAudio_blog-master | setFigureTallPartWide.m | .m | OpenAudio_blog-master/MatlabFunctions/setFigureTallPartWide.m | 430 | utf_8 | 9e78eb3251246dfb36ea6d6dc8c88c83 | %script: setFigureTallPartWide
%purpose: increases the size of the figure on the screen
function setFigureTallPartWide
pos=get(gcf,'position');
if (pos(4) < 500)
old_width = pos(3);
new_width = 1.5*old_width;
set(gcf,'position',[pos(1)-(new_width - old_width)/2 pos(2)-2/3*pos(4) new_width (1+2/3)*pos(4)]);... |
github | chipaudette/OpenAudio_blog-master | setFigureTaller.m | .m | OpenAudio_blog-master/MatlabFunctions/setFigureTaller.m | 282 | utf_8 | 012098319b793477937bc7469044c4e3 | %script: setFigureTaller
%purpose: increases the size of the figure on the screen
function []=setFigureTall;
pos=get(gcf,'position');
if (pos(4) < 500)
set(gcf,'position',[pos(1) pos(2)-1*pos(4) pos(3) (1+1)*pos(4)]);
end
%setFigSize;
set(gcf,'PaperPosition',[1.25 1.5 6 8]);
|
github | chipaudette/OpenAudio_blog-master | weaText.m | .m | OpenAudio_blog-master/MatlabFunctions/weaText.m | 3,354 | utf_8 | 2f3a58215dc7421042834f32e5897c37 | function h = weaText(varargin);
%function h = weaText(string,position);
%parse inputs
string = varargin{1};
position = varargin{2};
if length(varargin) > 2
varargin = {varargin{3:end}};
end
%remove any trailing empty cells
if iscell(string)
for I=length(string):-1:1
if ~isempty(string{I})
... |
github | chipaudette/OpenAudio_blog-master | setFigureTallerPartWide.m | .m | OpenAudio_blog-master/MatlabFunctions/setFigureTallerPartWide.m | 430 | utf_8 | e447ceb5d39a2d6206d826f435964f5a | %script: setFigureTallerPartWide
%purpose: increases the size of the figure on the screen
function setFigureTallerPartWide
pos=get(gcf,'position');
if (pos(4) < 500)
old_width = pos(3);
new_width = 1.5*old_width;
set(gcf,'position',[pos(1)-(new_width - old_width)/2 pos(2)-1*pos(4) new_width (1+1)*pos(4)]);... |
github | chipaudette/OpenAudio_blog-master | setFigureTallestPartWide.m | .m | OpenAudio_blog-master/MatlabFunctions/setFigureTallestPartWide.m | 717 | utf_8 | 4d6acea5ce2bdfecda8df29fface0044 | %script: setFigureTallestPartWide
%purpose: increases the size of the figure on the screen
function setFigureTallestPartWide
pos=get(gcf,'position');
if (pos(4) < 500)
ypos = pos(2)-1.4*pos(4);
height = (1+1.4)*pos(4);
screen = get(0,'ScreenSize');
gutter = 35+3;
max_allowed_height = 0.9*(scre... |
github | chipaudette/OpenAudio_blog-master | setFigureTallestWidest.m | .m | OpenAudio_blog-master/MatlabFunctions/setFigureTallestWidest.m | 978 | utf_8 | 2d1370fe4355c4746574bbba701a0b46 | %script: setFigureTallestWidest
%purpose: increases the size of the figure on the screen
function setFigureTallestWidest
pos=get(gcf,'position');
if (pos(4) < 500)
ypos = pos(2)-1.4*pos(4);
height = (1+1.4)*pos(4);
screen = get(0,'ScreenSize');
gutter = 35+3;
max_allowed_height = 0.9*(screen(4... |
github | chipaudette/OpenAudio_blog-master | setFigureTallestWide.m | .m | OpenAudio_blog-master/MatlabFunctions/setFigureTallestWide.m | 743 | utf_8 | de808c949085a9aa8e3f676950eaa0dd | %script: setFigureTallestWide
%purpose: increases the size of the figure on the screen
function setFigureTallestWide
pos=get(gcf,'position');
if (pos(4) < 500)
ypos = pos(2)-1.4*pos(4);
height = (1+1.4)*pos(4);
screen = get(0,'ScreenSize');
gutter = 35+3;
max_allowed_height = 0.9*(screen(4) - ... |
github | chipaudette/OpenAudio_blog-master | setFigureTall.m | .m | OpenAudio_blog-master/MatlabFunctions/setFigureTall.m | 284 | utf_8 | a9cc7590cf569fa16d82cfe815058321 | %script: setFigureTall
%purpose: increases the size of the figure on the screen
function []=setFigureTall;
pos=get(gcf,'position');
if (pos(4) < 500)
set(gcf,'position',[pos(1) pos(2)-2/3*pos(4) pos(3) (1+2/3)*pos(4)]);
end
%setFigSize;
set(gcf,'PaperPosition',[1.25 1.5 6 8]);
|
github | chipaudette/OpenAudio_blog-master | setFigureTallest.m | .m | OpenAudio_blog-master/MatlabFunctions/setFigureTallest.m | 290 | utf_8 | 9ed919cb251ec620ca4e9104b7c6b6cb | %script: setFigureTallest
%purpose: increases the size of the figure on the screen
function []=setFigureTallest;
pos=get(gcf,'position');
if (pos(4) < 500)
set(gcf,'position',[pos(1) pos(2)-1.4*pos(4) pos(3) (1+1.4)*pos(4)]);
end
%setFigSize;
set(gcf,'PaperPosition',[1.25 1.5 6 8]);
|
github | chipaudette/OpenAudio_blog-master | setFigureTallWidest.m | .m | OpenAudio_blog-master/MatlabFunctions/setFigureTallWidest.m | 616 | utf_8 | 244f47dc9afa557b520adca9cd1f24e2 | %script: setFigureTallWide
%purpose: increases the size of the figure on the screen
function setFigureTallWide
pos=get(gcf,'position');
if (pos(4) < 500)
old_width = pos(3);
new_width = 3.25*old_width;
screen = get(0,'ScreenSize');
gutter = 10;
max_allowed_width = (screen(3)-2*gutter);
if ... |
github | chipaudette/OpenAudio_blog-master | blockData2.m | .m | OpenAudio_blog-master/MatlabFunctions/blockData2.m | 1,991 | utf_8 | 3844ffab64084b4fe3c480a7b5d5b56e | function [data,start_ind,Noverlap,window]=blockData2(indata,N,overlap,windowing)
%function [data,start_ind,Noverlap,window]=blockData2(indata,N,overlap,windowing)
%
%Note: Hanning window assumed by default. Set windowing='no_windowing' to
% have no windowing of data blocks.
% JLB 11/01/02 Modified to allow multi... |
github | chipaudette/OpenAudio_blog-master | setFigureTallWide.m | .m | OpenAudio_blog-master/MatlabFunctions/setFigureTallWide.m | 420 | utf_8 | a78233df74a4b217cb1935a27784424d | %script: setFigureTallWide
%purpose: increases the size of the figure on the screen
function setFigureTallWide
pos=get(gcf,'position');
if (pos(4) < 500)
old_width = pos(3);
new_width = 2*old_width;
set(gcf,'position',[pos(1)-(new_width - old_width)/2 pos(2)-2/3*pos(4) new_width (1+2/3)*pos(4)]);
end
%setF... |
github | chipaudette/OpenAudio_blog-master | setFigureTallerWide.m | .m | OpenAudio_blog-master/MatlabFunctions/setFigureTallerWide.m | 349 | utf_8 | 30d7bfaa5b51c49ef02f614e28133049 | %script: setFigureTallerWide
%purpose: increases the size of the figure on the screen
function setFigureTallerWide
pos=get(gcf,'position');
if (pos(4) < 500)
set(gcf,'position',[pos(1)-pos(3)/2 pos(2)-1*pos(4) 2*pos(3) (1+1)*pos(4)]);
end
%setFigSizeLandscape;
set(gcf,'PaperOrientation','landscape');
set(gcf,'Pape... |
github | albanie/hbench-master | retrieval_eval.m | .m | hbench-master/matlab/retrieval_eval.m | 3,208 | utf_8 | 1ad36e8954075f48fe30d34bcd2f4455 | function out = retrieval_eval( benchpath, labelspath, resultspath )
%RETRIEVAL_EVAL Evaluate the retrieval task results
% RES = RETRIEVAL_EVAL(BENCHPATH, LABELSPATH, RESULTSPATH) Evaluates the
% retrieval benchmark specified in BENCHPATH with labels stored in
% LABELSPATH and results stored in RESULTSPATH.
%
% Retu... |
github | albanie/hbench-master | hb.m | .m | hbench-master/matlab/hb.m | 8,994 | utf_8 | b40d48496876224ba386307cdb631527 | function hb(cmd, descname, taskname, varargin)
%HBenchmarks command line interface
% `HB COMMAND DESCNAME BENCHMARKNAME` Is a general call of the HBenchmarks
% command line interface. The supported commands are:
%
% `HB checkdesc DESCNAME`
% Check the validity of the descriptors located in:
% data/descript... |
github | albanie/hbench-master | matching_compute.m | .m | hbench-master/matlab/matching_compute.m | 2,028 | utf_8 | c8ef06414994a3dbcd7b91bc2b771143 | function matching_compute( benchpath, descfun, outpath, varargin )
%MATCHING_COMPUTE Compute the results file for a matching task file
% MATCHING_COMPUTE(BENCH_FILE, DESC_FUN, OUTPATH) Computes the
% results for a matching task defined in BENCH_FILE using the DESC_FUN for
% computing descriptors. Stores the results ... |
github | albanie/hbench-master | classification_eval.m | .m | hbench-master/matlab/classification_eval.m | 2,751 | utf_8 | f61d09cc4ea676bb1aa753a24a8e3ea4 | function res = classification_eval( benchpath, labelspath, resultspath, varargin )
%CLASSIFICATION_EVAL Evaluate the auc and map for classification results
% RES = CLASSIFICATION_EVAL(BENCHPATH, LABELSPATH, RESULTSPATH)
% computes AUC and AP for the classification task using the computed
% distances from RESULTS_FIL... |
github | albanie/hbench-master | hb_deploy.m | .m | hbench-master/matlab/hb_deploy.m | 1,121 | utf_8 | 715e24f4fc9514fd3f8eb566bba5d7f4 | function hb_deploy()
% HB_DEPLOY Deploy the command line interface of the HBenchmark
% Copyright (C) 2016 Karel Lenc
% All rights reserved.
%
% This file is part of the VLFeat library and is made available under
% the terms of the BSD license (see the COPYING file).
hb_setup();
target_dir = fullfile(hb_path, 'bin');
... |
github | albanie/hbench-master | hpatches_dataset.m | .m | hbench-master/matlab/hpatches_dataset.m | 5,897 | utf_8 | 518162abb8ae457e00c39f69c867cce5 | function imdb = hpatches_dataset(varargin)
%HPATCHES_DATASET HPatches dataset wrapper, singleton
% Copyright (C) 2016 Karel Lenc
% All rights reserved.
%
% This file is part of the VLFeat library and is made available under
% the terms of the BSD license (see the COPYING file).
opts.rootDir = fullfile(hb_path, 'data',... |
github | albanie/hbench-master | retrieval_eval_chance.m | .m | hbench-master/matlab/retrieval_eval_chance.m | 1,088 | utf_8 | f95730a2d0c133b9965b5a541cf51a4c | function out = retrieval_eval_chance( imdb, labelspath )
% RETRIEVAL_EVAL_CHANCE
% Read the files
labels = utls.readfile(labelspath);
poolSignatures = strsplit(labels{1}, ',');
% Compare the headers
numQueries = numel(labels) - 1;
imRetAps = zeros(1, numQueries); patchRetAps = zeros(1, numQueries);
numAllFeats = sum(c... |
github | albanie/hbench-master | textprogressbar.m | .m | hbench-master/matlab/+utls/textprogressbar.m | 10,038 | utf_8 | 1ba907763b8e93689a7b1255d45bc832 | function upd = textprogressbar(n, varargin)
% UPD = TEXTPROGRESSBAR(N) initializes a text progress bar for monitoring a
% task comprising N steps (e.g., the N rounds of an iteration) in the
% command line. It returns a function handle UPD that is used to update and
% render the progress bar. UPD takes a single argument... |
github | albanie/hbench-master | provision.m | .m | hbench-master/matlab/+utls/provision.m | 1,280 | utf_8 | 35f4a55abc945c830e51e296896d63e7 | function downloaded = provision( url_file, tgt_dir )
downloaded = false;
if ~exist(url_file, 'file'), return; end;
[~, url_file_nm] = fileparts(url_file);
vl_xmkdir(tgt_dir);
done_file = fullfile(tgt_dir, ['.', url_file_nm, '.done']);
if exist(done_file, 'file'), return; end;
url = utls.readfile(url_file);
for ui = 1:... |
github | jennynz/VTshapes-master | smoothLine.m | .m | VTshapes-master/MATLAB scripts/smoothLine.m | 1,289 | utf_8 | 8c5b51d688a731bf970249100c0ff9cf | % [xSmoothed, ySmoothed] = SMOOTHLINE(x,y,smoothAmount)
% Creates the data for a smooth line going through the points given.
% Unlike spline this does not create artifacts, it locks
% the line to the data points (i.e. it dosen't go above
% or below the Y data points).
%
% Usage:
% x = (1:10);
% y = rand(1,10);
% [x... |
github | CohenBerkeleyLab/WRF-Chem-R2SMH-master | util.m | .m | WRF-Chem-R2SMH-master/chem/KPP/kpp/kpp-2.1/util/util.m | 1,409 | utf_8 | a200795ced439291d346b29e1b30b1ad | % ****************************************************************
%
% InitSaveData - Opens the data file for writing
%
% ****************************************************************
function InitSaveData ()
global KPP_ROOT_FID
KPP_ROOT_FID = fopen('KPP_ROOT.dat','w');
return %... |
github | CohenBerkeleyLab/WRF-Chem-R2SMH-master | Template_Fun_Chem.m | .m | WRF-Chem-R2SMH-master/chem/KPP/kpp/kpp-2.1/util/Template_Fun_Chem.m | 506 | utf_8 | 537cf51834cd520a33ee2c58c6f47578 |
% Wrapper for calling the ODE function routine
% in a format required by Matlab's ODE integrators
function P = KPP_ROOT_Fun_Chem(T, Y)
global TIME FIX RCONST
Told = TIME;
TIME = T;
KPP_ROOT_Update_SUN;
KPP_ROOT_Update_RCONST;
% This line calls the Matlab ODE function routine
P = KPP_ROOT_... |
github | CohenBerkeleyLab/WRF-Chem-R2SMH-master | Template_Jac_Chem.m | .m | WRF-Chem-R2SMH-master/chem/KPP/kpp/kpp-2.1/util/Template_Jac_Chem.m | 1,073 | utf_8 | 8fb398675e182b1e9a5449c11fa4f573 |
% Wrapper for calling the sparse ODE Jacobian routine
% in a format required by Matlab's ODE integrators
function J = KPP_ROOT_Jac_Chem(T, Y)
global TIME FIX RCONST
% To call the mex file uncomment one of the following lines:
% 1) LU prefix if SPARSE_LU_ROW option was used in code generation
% global ... |
github | Yijunmaverick/DeepJointFilter-master | cnn_joint_train.m | .m | DeepJointFilter-master/examples/Train/cnn_joint_train.m | 15,941 | utf_8 | ce0607265856597ce33007c25f95f2d2 | function [net, info] = cnn_joint_train(net, imdb, getBatch, varargin)
% CNN_TRAIN Demonstrates training a CNN
% CNN_TRAIN() is an example learner implementing stochastic
% gradient descent with momentum to train a CNN. It can be used
% with different datasets and tasks by providing a suitable
% getBa... |
github | Yijunmaverick/DeepJointFilter-master | GoTraining.m | .m | DeepJointFilter-master/examples/Train/GoTraining.m | 613 | utf_8 | 53f93a7e9bbb9c1617fc127546a5f39e | function [net, info] = GoTraining(imdb,varargin)
% clear all;clc;
opts.train.batchSize = 1;
opts.train.numEpochs = 2000;
opts.train.continue = true ;
opts = vl_argparse(opts, varargin) ;
net = cnn_joint_init(opts) ;
[net, info] = cnn_joint_train(net, imdb, @getBatch, opts.train, 'val', find(imdb.images.s... |
github | Yijunmaverick/DeepJointFilter-master | vl_argparse.m | .m | DeepJointFilter-master/matlab/vl_argparse.m | 3,148 | utf_8 | 74459d2b851e027208bd7ca9ea999037 | function [opts, args] = vl_argparse(opts, args)
% VL_ARGPARSE Parse list of parameter-value pairs
% OPTS = VL_ARGPARSE(OPTS, ARGS) updates the structure OPTS based on
% the specified parameter-value pairs ARGS={PAR1, VAL1, ... PARN,
% VALN}. The function produces an error if an unknown parameter name
% is pass... |
github | Yijunmaverick/DeepJointFilter-master | vl_compilenn.m | .m | DeepJointFilter-master/matlab/vl_compilenn.m | 24,638 | utf_8 | 8c3a01c5c76551e7d26e417002a00851 | function vl_compilenn( varargin )
% VL_COMPILENN Compile the MatConvNet toolbox
% The `vl_compilenn()` function compiles the MEX files in the
% MatConvNet toolbox. See below for the requirements for compiling
% CPU and GPU code, respectively.
%
% `vl_compilenn('OPTION', ARG, ...)` accepts the following opt... |
github | Yijunmaverick/DeepJointFilter-master | vl_simplenn_display.m | .m | DeepJointFilter-master/matlab/simplenn/vl_simplenn_display.m | 10,932 | utf_8 | c7ed88fccca92a96ffe9c36dcb72d278 | function info = vl_simplenn_display(net, varargin)
% VL_SIMPLENN_DISPLAY Simple CNN statistics
% VL_SIMPLENN_DISPLAY(NET) prints statistics about the network NET.
%
% INFO=VL_SIMPLENN_DISPLAY(NET) returns instead a structure INFO
% with several statistics for each layer of the network NET.
%
% The function... |
github | Yijunmaverick/DeepJointFilter-master | vl_test_economic_relu.m | .m | DeepJointFilter-master/matlab/xtest/vl_test_economic_relu.m | 790 | utf_8 | 35a3dbe98b9a2f080ee5f911630ab6f3 | % VL_TEST_ECONOMIC_RELU
function vl_test_economic_relu()
x = randn(11,12,8,'single');
w = randn(5,6,8,9,'single');
b = randn(1,9,'single') ;
net.layers{1} = struct('type', 'conv', ...
'filters', w, ...
'biases', b, ...
'stride', 1, ...
... |
github | LynnHongLiu/SMFH-master | SMFH.m | .m | SMFH-master/SMFH.m | 4,583 | utf_8 | e179d785abdf6896c39112fb377857cd | function [U1_final, U2_final, P1_final, P2_final, V_final] = SMFH( X1, X2,param, d ,show)
%% random initialization
% show = 1;
X1 = X1';X2 = X2';
[row, col] = size(X1);
[~, colt] = size(X2);
P1 = abs(rand(d, col));
P2 = abs(rand(d, colt));
threshold = 1e-1;
lastF = 1e8;
iter = 1;
% ===================== parameter defin... |
github | excess-project/data-structures-framework-master | EXCESS_IPDPS15_queue_model_basic_throughput.m | .m | data-structures-framework-master/utils/octave/EXCESS_IPDPS15_queue_model_basic_throughput.m | 614 | utf_8 | 06094f6bfbc024db8665d258ed6e9c09 | %% Estimates average queue operation throughput based on our IPDPS 2015 paper.
%%
%% Copyright (C) 2015-2016 Anders Gidenstam, Chalmers University of Technology
%%
%% The parallel work is in cycles. See Section IV.D in the paper.
%%
function Tp_ob = EXCESS_IPDPS15_queue_model_basic_throughput(pw_o, params)
f = para... |
github | excess-project/data-structures-framework-master | load_MF_cluster_power.m | .m | data-structures-framework-master/utils/octave/load_MF_cluster_power.m | 523 | utf_8 | 473c470294d6561a782e750926eea4c1 | %% Load power measurements for the whole cluster from the external DAQ
%% recorded with the EXCESS Monitoring Framework.
%% Anders Gidenstam 2015
function [t_daq NODE01_power NODE02_power NODE03_power NAS_power] = load_MF_cluster_power(basename)
postfix = '.csv';
daq = load([basename 'MFCLUSTER' postfix]);
... |
github | excess-project/data-structures-framework-master | load_sparse_mtx.m | .m | data-structures-framework-master/utils/octave/load_sparse_mtx.m | 475 | utf_8 | 2c3250e73affdbd06a6f983d822a2ee8 | %% Loads a sparse matrix in MatrixMarket general format.
%%
%% Copyright (C) 2016 Anders Gidenstam, Chalmers University of Technology
%%
function [M m n M_triplets]= load_sparse_mtx(filename)
M_triplets = load('-ascii', filename);
m = M_triplets(1,1);
n = M_triplets(1,2);
% Strip off the line with the dimensi... |
github | excess-project/data-structures-framework-master | EXCESS_IPDPS15_queue_model_instantiate.m | .m | data-structures-framework-master/utils/octave/EXCESS_IPDPS15_queue_model_instantiate.m | 2,314 | utf_8 | 2b36cedc21b63fa6e1bb1c165e9302f2 | %% Instantiate the throughput model based on our IPDPS 2015 paper.
%%
%% Copyright (C) 2016 Anders Gidenstam, Chalmers University of Technology
%%
%% All work parameters are in cycles.
function params = EXCESS_IPDPS15_queue_model_instantiate(f, n, p_s, p_m, p_b, tp_d_ps_ps, tp_d_ps_pm, tp_d_pm_ps, tp_d_pm_pb, tp_e_p... |
github | excess-project/data-structures-framework-master | summarize_mandelbrot_case.m | .m | data-structures-framework-master/utils/octave/summarize_mandelbrot_case.m | 2,159 | utf_8 | 88954c480f02273438188b79e59244af | %% Summarize the result of one Mandelbrot testbench case.
%% Anders Gidenstam 2014 - 2015
function [alg threads pinning pattern contention duration throughputs RAPL_powers] = summarize_mandelbrot_case(basename, algname, casename)
res = load_case_result(basename, algname, casename);
[t_rapl RAPL_PKG_power RAPL_CP... |
github | excess-project/data-structures-framework-master | load_MF_external_power.m | .m | data-structures-framework-master/utils/octave/load_MF_external_power.m | 476 | utf_8 | 7e3c7dc751c540a294b79b9ebd59b65b | %% Load power measurements for one node from the external DAQ recorded with the
%% EXCESS Monitoring Framework.
%% Anders Gidenstam 2015
function [t_daq PKG_power ATX12V_power GPU0_power] = load_MF_external_power(basename)
postfix = '.csv';
daq = load([basename 'MFEXTERNAL' postfix]);
%% Times in seconds ... |
github | excess-project/data-structures-framework-master | SpGEMM_load_pw_distribution.m | .m | data-structures-framework-master/utils/octave/SpGEMM_load_pw_distribution.m | 848 | utf_8 | 8fdfd1af7f4ef368db3208f8c6e888a8 | %% Load parallel work distribution over rows from debug SpGEMM testbench cases.
%% Anders Gidenstam 2016
function pw_distribution = SpGEMM_load_pw_distribution(basename, matrix_no)
%% MMAlg 1 parallel work measurements.
%% Keep these constant for parallel work collection.
calg = 3;
mmalg = 1;
wus ... |
github | excess-project/data-structures-framework-master | EXCESS_IPDPS15_queue_model_throughput.m | .m | data-structures-framework-master/utils/octave/EXCESS_IPDPS15_queue_model_throughput.m | 2,035 | utf_8 | ab2b5246d71e32251aa911f2b5c36feb | %% Estimates average queue operation throughput based on our IPDPS 2015 paper.
%%
%% Copyright (C) 2015-2016 Anders Gidenstam, Chalmers University of Technology
%%
%% The parallel work is in cycles.
%%
function [Tp_d Tp_e Tp_dp Tp_dm Tp_ep Tp_em] = EXCESS_IPDPS15_queue_model_throughput(pw_d, pw_e, params)
f = para... |
github | excess-project/data-structures-framework-master | load_RAPL_power.m | .m | data-structures-framework-master/utils/octave/load_RAPL_power.m | 1,040 | utf_8 | a26fe8faa3f4d660bd5477bdbd65abe2 | %% Load energy/power measurements from RAPL recorded with the state-record-tool.
%% NOTE: Configured for the likwid back-end. The PAPI back-end reports in nJ.
%% Anders Gidenstam 2014
function [t_rapl PKG_power CPU_power UNCORE_power DRAM_power] = load_RAPL_power(basename, algname, casename)
postfix = ['-' algname... |
github | excess-project/data-structures-framework-master | summarize_producerconsumer_case.m | .m | data-structures-framework-master/utils/octave/summarize_producerconsumer_case.m | 3,080 | utf_8 | b739609f06d92275de5a0dffd019e706 | %% Summarize the result of one Producer-Consumer testbench case.
%% Anders Gidenstam 2014 - 2015
function [alg threads pinning pattern pcpw throughputs RAPL_powers RAPL_powers_biased_coef_of_var] = summarize_producerconsumer_case(basename, algname, casename, plot_power)
res = load_case_result(basename, algname, ca... |
github | excess-project/data-structures-framework-master | load_case_result.m | .m | data-structures-framework-master/utils/octave/load_case_result.m | 263 | utf_8 | 9b00c26b4acec2ebe85944156ec7b0a5 | %% Load the result (output of the testbench program) for one case.
%% Anders Gidenstam 2014
function result = load_case_result(basename, algname, casename)
postfix = ['-' algname '-' casename '.txt'];
result = load([basename 'OUT' postfix]);
endfunction
|
github | excess-project/data-structures-framework-master | summarize_SpGEMM_case.m | .m | data-structures-framework-master/utils/octave/summarize_SpGEMM_case.m | 6,463 | utf_8 | 36e9f2d6d66b917dc5d312c1f3b9d448 | %% Summarize the result of one SpGEMM testbench case.
%% Anders Gidenstam 2016
function [alg threads pinning matrix mmalg wus durations operations RAPL_powers RAPL_powers_biased_coef_of_vars] = summarize_SpGEMM_case(basename, algname, casename, plot_power)
res = load_case_result(basename, algname, casename);
%% ... |
github | excess-project/data-structures-framework-master | load_MF_RAPL_power.m | .m | data-structures-framework-master/utils/octave/load_MF_RAPL_power.m | 1,189 | utf_8 | 67486a3502f43e8e653673909b828b25 | %% Load energy/power measurements from RAPL recorded with the
%% EXCESS Monitoring Framework.
%% Anders Gidenstam 2015
function [t_rapl PKG_power CPU_power UNCORE_power DRAM_power] = load_MF_RAPL_power(basename)
postfix = '.csv';
rapl = load([basename 'MFRAPL' postfix]);
%% Times in seconds since the UNIX ... |
github | foursquare/caffe-master | classification_demo.m | .m | caffe-master/matlab/demo/classification_demo.m | 5,412 | utf_8 | 8f46deabe6cde287c4759f3bc8b7f819 | function [scores, maxlabel] = classification_demo(im, use_gpu)
% [scores, maxlabel] = classification_demo(im, use_gpu)
%
% Image classification demo using BVLC CaffeNet.
%
% IMPORTANT: before you run this demo, you should download BVLC CaffeNet
% from Model Zoo (http://caffe.berkeleyvision.org/model_zoo.html)
%
% *****... |
github | qian256/ur5_setup-master | init.m | .m | ur5_setup-master/interface/init.m | 345 | utf_8 | bffcac299bcc822687559bafe7c61769 | % Init the ethernet port on PC
% Author: Long Qian
% Date: June 2016
function s = init()
% Connect to robot
Robot_IP = '172.22.22.2';
Socket_conn = tcpip(Robot_IP,30000,'NetworkRole','server');
fclose(Socket_conn);
disp('Press Play on Robot...')
fopen(Socket_conn);
disp('Connected!');
... |
github | qian256/ur5_setup-master | moverobotJoint.m | .m | ur5_setup-master/interface/moverobotJoint.m | 907 | utf_8 | f96405b4681c8385095bbb86ecff6ac1 | % Goal_Pose should be in mm and Orientation the rotation vector
% Author: Long Qian
% Date: June 2016
% Inputs:
% t: socket
% q: joint state (6 vector)
function moverobotJoint(t,q)
if nargin == 1
error('error; not enough input arguments')
elseif nargin == 2
if length(q)~=6
error('Joint variable... |
github | qian256/ur5_setup-master | readrobotJoint.m | .m | ur5_setup-master/interface/readrobotJoint.m | 768 | utf_8 | df2c25456d9a4f13b49107826d1ad058 | % Author: Long Qian
% Date: June 2016
% I/O:
% t: socket
% q: joint state (6 vector)
function q = readrobotJoint(t)
if t.BytesAvailable>0
fscanf(t,'%c',t.BytesAvailable);
end
fprintf(t,'(2)'); % task = 2 : reading task
while t.BytesAvailable==0
end
rec = fscanf(t,'%c',t.BytesAvailable);
if ~strcmp(rec(1),... |
github | TheBananaMan/caesar_benchmarks_secondround-master | visualisation2D.m | .m | caesar_benchmarks_secondround-master/visualisation/visualisation2D.m | 2,715 | utf_8 | a86a24d40cd50cd47f4bdc4db24b9391 | function [] = visualisation2D(filename)
log = fopen(filename, 'r');
normal_plot(log)
fclose(log);
end
function [] = normal_plot(log)
% parse number of testcases from first line
input = textscan(log,'%s',2,'delimiter','=');
nroftestcases = str2num(input{1}{2});
data = {};
... |
github | TheBananaMan/caesar_benchmarks_secondround-master | visualisationAllCiphers2D.m | .m | caesar_benchmarks_secondround-master/visualisation/visualisationAllCiphers2D.m | 10,838 | utf_8 | 02ba2ee979b91949622e7950675a4fa4 | function [] = visualisationAllCiphers2D(measurementFolder)
%take all files starting with 'log' and with extension '.txt'
extension = 'log*.txt';
measurementFolderPattern = strcat(measurementFolder,extension);
%get list of all log files
logfiles = dir(measurementFolderPattern);
%extrac... |
github | TheBananaMan/caesar_benchmarks_secondround-master | visualisation3D.m | .m | caesar_benchmarks_secondround-master/visualisation/visualisation3D.m | 4,214 | utf_8 | fae820dcd99dee2947f769663943c848 | function [] = visualisation3D(filename)
log = fopen(filename, 'r');
surface_plot(log, 16)
fclose(log);
end
function [] = surface_plot(log, entries)
% parse number of testcases from first line
input = textscan(log,'%s',2,'delimiter','=');
nroftestcases = str2num(input{1}{2});
data = {};
... |
github | rama055/Compressed-Sensing-master | l1eq_pd.m | .m | Compressed-Sensing-master/Compressed Sensing/extras/l1magic/l1eq_pd.m | 5,371 | utf_8 | 0caac7b67672586d3980036f6043c5ba | % l1eq_pd.m
%
% Solve
% min_x ||x||_1 s.t. Ax = b
%
% Recast as linear program
% min_{x,u} sum(u) s.t. -u <= x <= u, Ax=b
% and use primal-dual interior point method
%
% Usage: xp = l1eq_pd(x0, A, At, b, pdtol, pdmaxiter, cgtol, cgmaxiter)
%
% x0 - Nx1 vector, initial point.
%
% A - Either a handle to a function t... |
github | rama055/Compressed-Sensing-master | A_fhp.m | .m | Compressed-Sensing-master/Compressed Sensing/extras/l1magic/Measurements/A_fhp.m | 576 | utf_8 | 546e3a8b121df921d171522cafec09af | % A_fhp.m
%
% Takes measurements in the upper half-plane of the 2D Fourier transform.
%
% Usage: b = A_fhp(x, OMEGA)
%
% x - N vector
%
% b - K vector = [mean; real part(OMEGA); imag part(OMEGA)]
%
% OMEGA - K/2-1 vector denoting which Fourier coefficients to use
% (the real and imag parts of each freq are kept... |
github | rama055/Compressed-Sensing-master | At_fhp.m | .m | Compressed-Sensing-master/Compressed Sensing/extras/l1magic/Measurements/At_fhp.m | 613 | utf_8 | e42938636cace8af895181b10ca2fa1c | % At_fhp.m
%
% Adjoint of At_fhp (2D Fourier half plane measurements).
%
% Usage: x = At_fhp(b, OMEGA, n)
%
% b - K vector = [mean; real part(OMEGA); imag part(OMEGA)]
%
% OMEGA - K/2-1 vector denoting which Fourier coefficients to use
% (the real and imag parts of each freq are kept).
%
% n - Image is nxn pixe... |
github | rama055/Compressed-Sensing-master | A_f.m | .m | Compressed-Sensing-master/Compressed Sensing/extras/l1magic/Measurements/A_f.m | 659 | utf_8 | 21e5a10a1fc2848a7455f0901d893064 | % A_f.m
%
% Takes "scrambled Fourier" measurements.
%
% Usage: b = A_f(x, OMEGA, P)
%
% x - N vector
%
% b - K vector = [real part; imag part]
%
% OMEGA - K/2 vector denoting which Fourier coefficients to use
% (the real and imag parts of each freq are kept).
%
% P - Permutation to apply to the input vector. F... |
github | rama055/Compressed-Sensing-master | LineMask.m | .m | Compressed-Sensing-master/Compressed Sensing/extras/l1magic/Measurements/LineMask.m | 832 | utf_8 | 42787892f182a5dbbca55315f88daaec | % LineMask.m
%
% Returns the indicator of the domain in 2D fourier space for the
% specified line geometry.
% Usage : [M,Mh,mi,mhi] = LineMask(L,N)
%
% Written by : Justin Romberg
% Created : 1/26/2004
% Revised : 12/2/2004
function [M,Mh,mi,mhi] = LineMask(L,N)
thc = linspace(0, pi-pi/L, L);
%thc = linspace(pi/(2... |
github | rama055/Compressed-Sensing-master | At_f.m | .m | Compressed-Sensing-master/Compressed Sensing/extras/l1magic/Measurements/At_f.m | 718 | utf_8 | c3639ceb479abeddedfe954c615b1f6d | % At_f.m
%
% Adjoint for "scrambled Fourier" measurements.
%
% Usage: x = At_f(b, N, OMEGA, P)
%
% b - K vector = [real part; imag part]
%
% N - length of output x
%
% OMEGA - K/2 vector denoting which Fourier coefficients to use
% (the real and imag parts of each freq are kept).
%
% P - Permutation to apply to... |
github | rama055/Compressed-Sensing-master | l1qc_newton.m | .m | Compressed-Sensing-master/Compressed Sensing/extras/l1magic/Optimization/l1qc_newton.m | 4,413 | utf_8 | 750b8c23345a6bdd982b28e78c131e5e | % l1qc_newton.m
%
% Newton algorithm for log-barrier subproblems for l1 minimization
% with quadratic constraints.
%
% Usage:
% [xp,up,niter] = l1qc_newton(x0, u0, A, At, b, epsilon, tau,
% newtontol, newtonmaxiter, cgtol, cgmaxiter)
%
% x0,u0 - starting points
%
% A - Either a handle to a... |
github | rama055/Compressed-Sensing-master | tvqc_newton.m | .m | Compressed-Sensing-master/Compressed Sensing/extras/l1magic/Optimization/tvqc_newton.m | 5,549 | utf_8 | 8a5ce49eabb2be396220c5a0ba033f26 | % tvqc_newton.m
%
% Newton algorithm for log-barrier subproblems for TV minimization
% with quadratic constraints.
%
% Usage:
% [xp,tp,niter] = tvqc_newton(x0, t0, A, At, b, epsilon, tau,
% newtontol, newtonmaxiter, cgtol, cgmaxiter)
%
% x0,t0 - starting points
%
% A - Either a handle to a... |
github | rama055/Compressed-Sensing-master | cgsolve.m | .m | Compressed-Sensing-master/Compressed Sensing/extras/l1magic/Optimization/cgsolve.m | 1,693 | utf_8 | f818f81750d26fa1c5a1c11e4f6d73d5 | % cgsolve.m
%
% Solve a symmetric positive definite system Ax = b via conjugate gradients.
%
% Usage: [x, res, iter] = cgsolve(A, b, tol, maxiter, verbose)
%
% A - Either an NxN matrix, or a function handle.
%
% b - N vector
%
% tol - Desired precision. Algorithm terminates when
% norm(Ax-b)/norm(b) < tol .
%
% ma... |
github | rama055/Compressed-Sensing-master | tvdantzig_newton.m | .m | Compressed-Sensing-master/Compressed Sensing/extras/l1magic/Optimization/tvdantzig_newton.m | 5,825 | utf_8 | 7ee8416bac076fa4edfcebce1cc20961 | % tvdantzig_newton.m
%
% Newton iterations for TV Dantzig log-barrier subproblem.
%
% Usage : [xp, tp, niter] = tvdantzig_newton(x0, t0, A, At, b, epsilon, tau,
% newtontol, newtonmaxiter, cgtol, cgmaxiter)
%
% x0,t0 - Nx1 vectors, initial points.
%
% A - Either a handle to a f... |
github | rama055/Compressed-Sensing-master | l1eq_pd.m | .m | Compressed-Sensing-master/Compressed Sensing/extras/l1magic/Optimization/l1eq_pd.m | 6,002 | utf_8 | 519eccf3e3f28108ab3af997823e117a | % l1eq_pd.m
%
% Solve
% min_x ||x||_1 s.t. Ax = b
%
% Recast as linear program
% min_{x,u} sum(u) s.t. -u <= x <= u, Ax=b
% and use primal-dual interior point method
%
% Usage: xp = l1eq_pd(x0, A, At, b, pdtol, pdmaxiter, cgtol, cgmaxiter)
%
% x0 - Nx1 vector, initial point.
%
% A - Either a handle to a function t... |
github | rama055/Compressed-Sensing-master | l1decode_pd.m | .m | Compressed-Sensing-master/Compressed Sensing/extras/l1magic/Optimization/l1decode_pd.m | 5,068 | utf_8 | 5a7f73e754c11d737b01d0fd89e745e7 | % l1decode_pd.m
%
% Decoding via linear programming.
% Solve
% min_x ||b-Ax||_1 .
%
% Recast as the linear program
% min_{x,u} sum(u) s.t. -Ax - u + y <= 0
% Ax - u - y <= 0
% and solve using primal-dual interior point method.
%
% Usage: xp = l1decode_pd(x0, A, At, y, pdtol, pdmaxiter, cgtol... |
github | rama055/Compressed-Sensing-master | l1dantzig_pd.m | .m | Compressed-Sensing-master/Compressed Sensing/extras/l1magic/Optimization/l1dantzig_pd.m | 7,016 | utf_8 | fd7af40253904ac7727a4b14f7a1254f | % l1dantzig_pd.m
%
% Solves
% min_x ||x||_1 subject to ||A'(Ax-b)||_\infty <= epsilon
%
% Recast as linear program
% min_{x,u} sum(u) s.t. x - u <= 0
% -x - u <= 0
% A'(Ax-b) - epsilon <= 0
% -A'(Ax-b) - epsilon <= 0
% and use primal-dual interior point method.
%
% U... |
github | rama055/Compressed-Sensing-master | tveq_newton.m | .m | Compressed-Sensing-master/Compressed Sensing/extras/l1magic/Optimization/tveq_newton.m | 5,524 | utf_8 | d470ee389c618dbc138a667cbea5e8ea | % tveq_newton.m
%
% Newton algorithm for log-barrier subproblems for TV minimization
% with equality constraints.
%
% Usage:
% [xp,tp,niter] = tveq_newton(x0, t0, A, At, b, tau,
% newtontol, newtonmaxiter, slqtol, slqmaxiter)
%
% x0,t0 - starting points
%
% A - Either a handle to a functio... |
github | rama055/Compressed-Sensing-master | tvqc_logbarrier.m | .m | Compressed-Sensing-master/Compressed Sensing/extras/l1magic/Optimization/tvqc_logbarrier.m | 3,654 | utf_8 | ad1aa6471d767fcc63a34dbe98197e59 | % tvqc_logbarrier.m
%
% Solve quadractically constrained TV minimization
% min TV(x) s.t. ||Ax-b||_2 <= epsilon.
%
% Recast as the SOCP
% min sum(t) s.t. ||D_{ij}x||_2 <= t, i,j=1,...,n
% ||Ax - b||_2 <= epsilon
% and use a log barrier algorithm.
%
% Usage: xp = tvqc_logbarrier(x0, A, At, b, epsil... |
github | rama055/Compressed-Sensing-master | l1qc_logbarrier.m | .m | Compressed-Sensing-master/Compressed Sensing/extras/l1magic/Optimization/l1qc_logbarrier.m | 3,536 | utf_8 | 9bffbc3122958794179c8c7417cb8cd5 | % l1qc_logbarrier.m
%
% Solve quadratically constrained l1 minimization:
% min ||x||_1 s.t. ||Ax - b||_2 <= \epsilon
%
% Reformulate as the second-order cone program
% min_{x,u} sum(u) s.t. x - u <= 0,
% -x - u <= 0,
% 1/2(||Ax-b||^2 - \epsilon^2) <= 0
% and use a log barrier al... |
github | rama055/Compressed-Sensing-master | tvdantzig_logbarrier.m | .m | Compressed-Sensing-master/Compressed Sensing/extras/l1magic/Optimization/tvdantzig_logbarrier.m | 3,633 | utf_8 | 0aa874d89c9fb18aae6b73a6ce0359a0 | % tvdantzig_logbarrier.m
%
% Solve the total variation Dantzig program
%
% min_x TV(x) subject to ||A'(Ax-b)||_\infty <= epsilon
%
% Recast as the SOCP
% min sum(t) s.t. ||D_{ij}x||_2 <= t, i,j=1,...,n
% <a_{ij},Ax - b> <= epsilon i,j=1,...,n
% and use a log barrier algorithm.
%
% Usage: xp = tvd... |
github | rama055/Compressed-Sensing-master | tveq_logbarrier.m | .m | Compressed-Sensing-master/Compressed Sensing/extras/l1magic/Optimization/tveq_logbarrier.m | 3,514 | utf_8 | 271088c0c59558548a5362667ae6e32e | % tveq_logbarrier.m
%
% Solve equality constrained TV minimization
% min TV(x) s.t. Ax=b.
%
% Recast as the SOCP
% min sum(t) s.t. ||D_{ij}x||_2 <= t, i,j=1,...,n
% Ax=b
% and use a log barrier algorithm.
%
% Usage: xp = tveq_logbarrier(x0, A, At, b, lbtol, mu, slqtol, slqmaxiter)
%
% x0 - Nx1 vec... |
github | rama055/Compressed-Sensing-master | l1_ls.m | .m | Compressed-Sensing-master/Compressed Sensing/code/l1_ls.m | 8,569 | utf_8 | 2188d3e090d8097887add14e666cc07a | function [x,status,history] = l1_ls(A,varargin)
%
% l1-Regularized Least Squares Problem Solver
%
% l1_ls solves problems of the following form:
%
% minimize ||A*x-y||^2 + lambda*sum|x_i|,
%
% where A and y are problem data and x is variable (described below).
%
% CALLING SEQUENCES
% [x,status,history] = l1... |
github | rama055/Compressed-Sensing-master | iht_fft.m | .m | Compressed-Sensing-master/Compressed Sensing/code/iht_fft.m | 1,217 | utf_8 | 94370238c0d4158bae24bcc0c0efd689 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% iht_fft.m
%
% Implements iterative hard thresholding with FFT basis
%
% Inputs:
% y - CS measurements (Mx1)
% Phi - CS matrix (MxN)
% K - Signal Sparsity
% epsilon - Convergence parameter
% numiter - Max number of iterations
%
% Outputs:
% x - output estimate
%
% Written ... |
github | rama055/Compressed-Sensing-master | OMP.m | .m | Compressed-Sensing-master/Compressed Sensing/code/OMP.m | 8,339 | utf_8 | 35b248a305849fe309acade59f0d2567 | function [x,r,normR,residHist, errHist] = OMP( A, b, k, errFcn, opts )
% x = OMP( A, b, k )
% uses the Orthogonal Matching Pursuit algorithm (OMP)
% to estimate the solution to the equation
% b = A*x (or b = A*x + noise )
% where there is prior information that x is sparse.
%
% "A" may be a matrix, or... |
github | rama055/Compressed-Sensing-master | coordl1breg.m | .m | Compressed-Sensing-master/Compressed Sensing/code/coordl1breg.m | 3,436 | utf_8 | 5ce2eb78d177859712a16ed570359985 | function [u,Energy] = coordl1breg(A,f,lambda,varargin)
%COORDL1BREG Linearly-constrained L1 minimization with coordinate descent
% u = COORDL1BREG(A,f,lambda) solves the minimization problem
%
% min_u ||u||_1 subject to A*u = f
%
% where A is an MxN matrix and f is a vector of length M. Input lambda
% ... |
github | rama055/Compressed-Sensing-master | l1eq_pd.m | .m | Compressed-Sensing-master/Compressed Sensing/code/l1eq_pd.m | 5,236 | utf_8 | 803f9ecac39e4b133c9e8e427cd2b704 | % l1eq_pd.m
%
% Solve
% min_x ||x||_1 s.t. Ax = b
%
% Recast as linear program
% min_{x,u} sum(u) s.t. -u <= x <= u, Ax=b
% and use primal-dual interior point method
%
% Usage: xp = l1eq_pd(x0, A, At, b, pdtol, pdmaxiter, cgtol, cgmaxiter)
%
% x0 - Nx1 vector, initial point.
%
% A - Either a handle to... |
github | rama055/Compressed-Sensing-master | coordlsl1.m | .m | Compressed-Sensing-master/Compressed Sensing/code/coordlsl1.m | 3,014 | utf_8 | e4285528a538a086f3a7fe125c8db454 | function [v,Energy] = coordlsl1(A,f,lambda,varargin)
%COORDLSL1 Least-squares L1 minimization with coordinate descent
% u = COORDLSL1(A,f,lambda) solves the minimization problem
%
% min_u ||u||_1 + lambda ||A*u - f||_2^2
%
% where A is an MxN matrix and f is a vector of length M.
%
% COORDLSL1(...,'PARAM1',... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.