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
se4u/mvlsa-master
v5_indisvd_level2.m
.m
mvlsa-master/src/process_count/v5_indisvd_level2.m
3,432
utf_8
200b6eb072a8b8f3b59e216078c4ee7b
function [ajtj, kj_diag, aj, sj, column_picked_logical, bj, mu1, mu2, sum2] = v5_indisvd_level2(... align_mat, mc_muc, preprocess_option, svd_size, r, outfile) %% First do the SVD of the align_mat file [aj, sj, mu1, kj_diag, column_picked_logical, bj, mu2, sum2]=... v5_indisvd(align_mat, mc_muc, preprocess_opti...
github
se4u/mvlsa-master
filter_input_filenames.m
.m
mvlsa-master/src/mvlsa/filter_input_filenames.m
1,236
utf_8
af2af0789e282e51944bcc20b5f0b951
function deptoload=filter_input_filenames(input_filenames, ... depgroup_to_pick) exclude_depgroup=(depgroup_to_pick(1)=='E'); groups = strsplit(depgroup_to_pick, '@'); groups = groups(2:end); deptoload = {}; for infi_idx = 1:length(input_filenames) i...
github
UofSSpaceTeam/rover-hardware-master
arm_sim.m
.m
rover-hardware-master/Projects/Arm/ArmOptimization/arm_simulations/arm_sim.m
20,150
utf_8
ecb1bc85fb4a1c1b2988dd72058b149c
function varargout = arm_sim(varargin) % ARM_SIM MATLAB code for arm_sim.fig % ARM_SIM, by itself, creates a new ARM_SIM or raises the existing % singleton*. % % H = ARM_SIM returns the handle to a new ARM_SIM or the handle to % the existing singleton*. % % ARM_SIM('CALLBACK',hObject,eventData,...
github
bittnt/ImageSpirit-master
xml2yaml.m
.m
ImageSpirit-master/CmmCode/Objectness/xml2yaml.m
882
utf_8
24788cfc055b5979909c95d1a16395ae
%% Convert the file type of opencv xml annotations to yaml thus it can be read by opencv % This functions relies on http://code.google.com/p/yamlmatlab/ % The results needs to be further refined to deal with indentation problem function xml2yaml(wkDir) fNs = dir([wkDir '*.xml']); fNum = length(fNs); for ...
github
bblodfon/femto-power-control-master
femtopower.m
.m
femto-power-control-master/femtopower.m
11,597
utf_8
f33870c32aae802c33c0dc3b3f70f2c2
% NTUA Thesis code % John Zobolas, May 2013 function femtopower format long; global results; results = cell(1,10); % the "standard" coordinates of the FAPs x = [200 400 400 700 600 600 300 850 800 200 600 800 500 200 100 400 700 900]; y = [500 300 600 600 800 200 800 400 800 200 400 200 90...
github
Urmish/Mosaic-master
pyr.m
.m
Mosaic-master/pyr.m
6,443
utf_8
0f73e8bada654499087703fc8338c540
function blended = pyr( img1,img2, mask1, mask2, level, a ) %TODO - If the original image measures 2N + 1 by 2N + 1, then the pyramid will have N + 1 levels gKernel = fspecial('gauss',30,15); mask1 = imfilter(mask1,gKernel,'replicate'); mask2 = imfilter(mask2,gKernel,'replicate'); %figure, imshow(mask1(:,:,1)); %figure...
github
lvdmaaten/bhtsne-master
fast_tsne.m
.m
bhtsne-master/fast_tsne.m
5,544
utf_8
a4e616a3b68409e3eb6181a7b3d97dfa
function mappedX = fast_tsne(X, no_dims, initial_dims, perplexity, theta, alg, max_iter) %FAST_TSNE Runs the C++ implementation of Barnes-Hut t-SNE % % mappedX = fast_tsne(X, no_dims, initial_dims, perplexity, theta, alg) % % Runs the C++ implementation of Barnes-Hut-SNE. The high-dimensional % datapoints are ...
github
uvbakutan/QR2.0-master
AccMagnCalib.m
.m
QR2.0-master/arduino/libraries/FreeIMU/calibration_old/AccMagnCalib.m
2,678
utf_8
10491a6b0d7509e66b73724f78c14c1a
% Calibration routine by Andrea and Pasquale Cirillo www.aepwebmasters.it % Adapted to FreeIMU library by Fabio Varesano www.varesano.net % Released under GPL v3 - See See http://www.gnu.org/copyleft/gpl.html function SpherePlot(X, Y, Z, graph_title, filename) figure; subplot(2,2,1); plot3(X,Y,Z); title(graph_ti...
github
t-taniai/SDC_CVPR2015-master
SDC_GEO.m
.m
SDC_CVPR2015-master/SDC_GEO.m
2,592
utf_8
c99c42af46b439ce6ec69be89868f660
function [labeling,energy,dataTerm, cuts] = SDC_GEO(S0, Fz, img, binImg, binNum, neighbor, SmFunc, T, th_a, th_kappa) [height, width, ch] = size(img); N = height*width; Si = true(height, width); if ~isempty(S0) Si = S0; end doubleImg = im2double(img); % construct graph % E is a set of neighbor pairs (p, q), dir...
github
compops/pmh-tutorial-master
kalmanFilter.m
.m
pmh-tutorial-master/matlab/kalmanFilter.m
1,166
utf_8
dd9607f60a0d9d1227c8ba99bf5274f2
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Kalman filtering % % Johan Dahlin <liu (at) johandahlin.com.nospam> % Documentation at https://github.com/compops/pmh-tutorial % Published under GNU General Public License %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%...
github
ericliu03/DigitRecognizer-master
preImg.m
.m
DigitRecognizer-master/preImg.m
2,286
utf_8
94801ba8611c7df7855777bf850d8ff6
function result = preImg(file) %% read the image file if strcmp(file(end-2:end), 'png') [img, map] = imread(file); img = ind2gray(img,map); else img = imread(file); img = rgb2gray(img); end %% preprocess the image % turn to binary image img = im2bw(img); %...
github
s-gupta/caffe-master
classification_demo.m
.m
caffe-master/matlab/demo/classification_demo.m
4,913
utf_8
e867b082ddf96078b3cba23caf99f0ef
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
JaneliaSciComp/Wavesurfer-master
wavesurfer.m
.m
Wavesurfer-master/wavesurfer.m
4,998
utf_8
a018e9094fe053d0b960ca5343e779f4
function varargout = wavesurfer(varargin) %WAVESURFER Launch WaveSurfer, an application for data acquisition. % % "WAVESURFER", by itself, launches the WaveSurfer graphical user % interface (GUI). % % "WAVESURFER <protocolFileName>" launches the WaveSurfer GUI, % opening the named p...
github
JaneliaSciComp/Wavesurfer-master
lineSpecificationFrom.m
.m
Wavesurfer-master/+ws/lineSpecificationFrom.m
603
utf_8
c6af258975751d08d35274edbdb87f03
function result = lineSpecificationFrom(deviceNames, terminalIDs) nLines = length(terminalIDs) ; if nLines==0 , result = '' ; else result = singleLineSpecification(deviceNames{1}, terminalID(1)) ; for i = 2:nLines , thisLineSpecification = singleLineSpecification(d...
github
JaneliaSciComp/Wavesurfer-master
diChannelLineSpecificationFromTerminalIDs.m
.m
Wavesurfer-master/+ws/diChannelLineSpecificationFromTerminalIDs.m
822
utf_8
b063e032ab6a065fc2d246979f3ec341
function result = diChannelLineSpecificationFromTerminalIDs(deviceName, terminalIDs) % Given an array of DIO terminal IDs, returns a string suitable for use in % a call to ws.dabs.ni.daqmx.Task::createDIChan(). % E.g. [0 1 5] -> 'port0/line0, port0/line1, port0/line5' nLines = length(terminal...
github
JaneliaSciComp/Wavesurfer-master
transcodeProtocolFile.m
.m
Wavesurfer-master/+ws/transcodeProtocolFile.m
6,817
utf_8
0f3ce04b2600821e9bc01dea12743874
function transcodeProtocolFile(protocolFileName, newProtocolFileName) % Note: whatever version of WS was used to generate the original % protocol file should be installed when you run this function. s = load(protocolFileName, '-mat') ; s.ws_WavesurferModel = transcode(s.ws_WavesurferModel) ...
github
JaneliaSciComp/Wavesurfer-master
validateAttributes.m
.m
Wavesurfer-master/+ws/validateAttributes.m
14,892
utf_8
59139efa707a4277cc6b747142baa16a
function val = validateAttributes(val,varargin) %VALIDATEATTRIBUTES Mimic of built-in function % val = validateAttributes(val,p1,v1,...) % % The validateAttributes mimic exists largely to "expand the repertoire" of % the built-in validateattributes. Additional Classes, Attributes, etc have % been added. % % In...
github
JaneliaSciComp/Wavesurfer-master
checkForAliasing.m
.m
Wavesurfer-master/+ws/checkForAliasing.m
2,732
utf_8
d3e7118610192927ab9384aaf8ee8284
function [isAliasing,pathOfAliasing]=checkForAliasing(thing1,thing2) pathSoFarInitial=''; [isAliasing,pathOfAliasing]=checkForAliasingHelper(thing1,thing2,pathSoFarInitial); end function [isAliasing,pathOfAliasing]=checkForAliasingHelper(thing1,thing2,pathSoFar) if (isa(thing1,'handle') || isstru...
github
JaneliaSciComp/Wavesurfer-master
ismemberOfCellArray.m
.m
Wavesurfer-master/+ws/ismemberOfCellArray.m
450
utf_8
03fb7c70734057f90c60ffee49987efc
function result = ismemberOfCellArray(A,B) % Like ismember(A,B), but assumes that A and B are cell arrays, and % that their elements should be compared after being accessed with {}. result=false(size(A)); for i=1:numel(A) , result(i)=isSingletonMemberOfCellArray(A{i},B); end end fu...
github
JaneliaSciComp/Wavesurfer-master
loadDataFile.m
.m
Wavesurfer-master/+ws/loadDataFile.m
15,614
utf_8
71ba8c70e36c9a6992aef275eaeb2ea4
function dataFileAsStruct = loadDataFile(filename, formatString, tMin, tMax, minSweepIndex, maxSweepIndex) % loadDataFile Loads WaveSurfer data into Matlab. % % loadDataFile(filename) % Loads the indicated WaveSurfer .h5 file. The returned data is a % structure array with o...
github
JaneliaSciComp/Wavesurfer-master
loadProfileNames.m
.m
Wavesurfer-master/+ws/loadProfileNames.m
548
utf_8
5222c1ccf1514163715b15c23f172b72
function result = loadProfileNames() preferencesFilePath = ws.preferencesFileNameFromProfileName('Default') ; preferencesFolderPath = fileparts(preferencesFilePath) ; matFileNames = ws.simpleDir(fullfile(preferencesFolderPath, '*.wsu')) ; rawProfileNames = cellfun(@stripDotMat, matFileNames, 'UniformOut...
github
JaneliaSciComp/Wavesurfer-master
readMachineDataFile.m
.m
Wavesurfer-master/+ws/readMachineDataFile.m
4,380
utf_8
0fb41062257d1c3830e16940662366ad
function mdfStructure=readMachineDataFile(fileName) % Read the whole file into one big string fid=fopen(fileName,'rt'); try fileContentsAsString=fread(fid,inf,'char=>char')'; catch me fclose(fid); rethrow(me); end fclose(fid); % Convert the file conten...
github
JaneliaSciComp/Wavesurfer-master
SimpleBiasCameraInterface.m
.m
Wavesurfer-master/+ws/+examples/+bias/SimpleBiasCameraInterface.m
5,868
utf_8
15c965d2c3e0b5cb83af671d13573548
% HHMI - Janelia Farms Research Campus 2014 % Author: Arunesh Mittal mittala@janelia.org (Adapted from code written by % Jinyang Liu) classdef SimpleBiasCameraInterface < handle properties (SetAccess=protected) address_ = '' port_ = [] end methods function se...
github
JaneliaSciComp/Wavesurfer-master
BiasCameraInterface.m
.m
Wavesurfer-master/+ws/+examples/+bias/BiasCameraInterface.m
13,609
utf_8
b3089f284e03018375f0e9bc7a8fee2d
% HHMI - Janelia Farms Research Campus 2014 % Author: Arunesh Mittal mittala@janelia.org (Adapted from code written by % Jinyang Liu) classdef BiasCameraInterface < handle properties address = '' port = [] %biasExeDirName = 'bias_fc2_win64-v0.53-plugin-dev-07'; bias...
github
JaneliaSciComp/Wavesurfer-master
BiasInterface.m
.m
Wavesurfer-master/+ws/+examples/+bias/BiasInterface.m
13,597
utf_8
091a896dd62b138e99e15289233fb748
% HHMI - Janelia Farms Research Campus 2014 % Author: Arunesh Mittal mittala@janelia.org (Adapted from code written by % Jinyang Liu) classdef BiasInterface < handle properties address = '' port = [] %biasExeDirName = 'bias_fc2_win64-v0.53-plugin-dev-07'; biasExeDir...
github
JaneliaSciComp/Wavesurfer-master
savejson.m
.m
Wavesurfer-master/+ws/+examples/+bias/private/savejson.m
19,574
utf_8
569199d735ff68badbdf30b84b22b427
function json=savejson(rootname,obj,varargin) % % json=savejson(rootname,obj,filename) % or % json=savejson(rootname,obj,opt) % json=savejson(rootname,obj,'param1',value1,'param2',value2,...) % % convert a MATLAB object (cell, struct or array) into a JSON (JavaScript % Object Notation) string % % author: Q...
github
JaneliaSciComp/Wavesurfer-master
loadjson.m
.m
Wavesurfer-master/+ws/+examples/+bias/private/loadjson.m
17,202
ibm852
7310bf0ab5eac886d93db9b37e25027f
function data = loadjson(fname,varargin) % % data=loadjson(fname,opt) % or % data=loadjson(fname,'param1',value1,'param2',value2,...) % % parse a JSON (JavaScript Object Notation) file or string % % authors:Qianqian Fang (q.fang <at> neu.edu) % created on 2011/09/09, including previous works from % % ...
github
JaneliaSciComp/Wavesurfer-master
loadubjson.m
.m
Wavesurfer-master/+ws/+examples/+bias/private/loadubjson.m
13,746
utf_8
4fad4bd3ce0a7919541f2db32460d9ce
function data = loadubjson(fname,varargin) % % data=loadubjson(fname,opt) % or % data=loadubjson(fname,'param1',value1,'param2',value2,...) % % parse a JSON (JavaScript Object Notation) file or string % % authors:Qianqian Fang (q.fang <at> neu.edu) % created on 2013/08/01 % % $Id$ % % input: % fna...
github
JaneliaSciComp/Wavesurfer-master
saveubjson.m
.m
Wavesurfer-master/+ws/+examples/+bias/private/saveubjson.m
18,336
utf_8
8e7369885d6843d7786452483c79f6af
function json=saveubjson(rootname,obj,varargin) % % json=saveubjson(rootname,obj,filename) % or % json=saveubjson(rootname,obj,opt) % json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...) % % convert a MATLAB object (cell, struct or array) into a Universal % Binary JSON (UBJSON) binary string %...
github
JaneliaSciComp/Wavesurfer-master
savejson.m
.m
Wavesurfer-master/+ws/+examples/+mm/private/savejson.m
19,574
utf_8
569199d735ff68badbdf30b84b22b427
function json=savejson(rootname,obj,varargin) % % json=savejson(rootname,obj,filename) % or % json=savejson(rootname,obj,opt) % json=savejson(rootname,obj,'param1',value1,'param2',value2,...) % % convert a MATLAB object (cell, struct or array) into a JSON (JavaScript % Object Notation) string % % author: Q...
github
JaneliaSciComp/Wavesurfer-master
loadjson.m
.m
Wavesurfer-master/+ws/+examples/+mm/private/loadjson.m
17,202
ibm852
7310bf0ab5eac886d93db9b37e25027f
function data = loadjson(fname,varargin) % % data=loadjson(fname,opt) % or % data=loadjson(fname,'param1',value1,'param2',value2,...) % % parse a JSON (JavaScript Object Notation) file or string % % authors:Qianqian Fang (q.fang <at> neu.edu) % created on 2011/09/09, including previous works from % % ...
github
JaneliaSciComp/Wavesurfer-master
loadubjson.m
.m
Wavesurfer-master/+ws/+examples/+mm/private/loadubjson.m
13,746
utf_8
4fad4bd3ce0a7919541f2db32460d9ce
function data = loadubjson(fname,varargin) % % data=loadubjson(fname,opt) % or % data=loadubjson(fname,'param1',value1,'param2',value2,...) % % parse a JSON (JavaScript Object Notation) file or string % % authors:Qianqian Fang (q.fang <at> neu.edu) % created on 2013/08/01 % % $Id$ % % input: % fna...
github
JaneliaSciComp/Wavesurfer-master
saveubjson.m
.m
Wavesurfer-master/+ws/+examples/+mm/private/saveubjson.m
18,336
utf_8
8e7369885d6843d7786452483c79f6af
function json=saveubjson(rootname,obj,varargin) % % json=saveubjson(rootname,obj,filename) % or % json=saveubjson(rootname,obj,opt) % json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...) % % convert a MATLAB object (cell, struct or array) into a Universal % Binary JSON (UBJSON) binary string %...
github
JaneliaSciComp/Wavesurfer-master
ModularClient.m
.m
Wavesurfer-master/+ws/+examples/+pez/ModularClient.m
16,047
utf_8
5f6e750874adb7e0b7346542366a3ef7
% ModularClient - This is the Matlab modular device client library for % communicating with and calling remote methods on modular device % servers.matlab serial interface for controlling and % % Public properties % ------------------ % % * debug = debug flag, turns on debug messages if true. % % (Dependent) %...
github
JaneliaSciComp/Wavesurfer-master
randomTrialSequence.m
.m
Wavesurfer-master/+ws/+examples/+pez/randomTrialSequence.m
4,528
utf_8
cce3f30f7833996e9a639be24a25c3cd
function trialSequence = randomTrialSequence(trialCount, maximumRunLength, laserTrialSpacing) % Eliminates sequences of longer than maximumRunLength from rawTrialSequence. % Each element of rawTrailSequence should be 1 or 2. if maximumRunLength < 2 , % In theory, maximumRunLength could be ...
github
JaneliaSciComp/Wavesurfer-master
savejson.m
.m
Wavesurfer-master/+ws/+examples/+pez/private/savejson.m
19,101
utf_8
9346cacb95a4048842a32c5c31d5e51a
function json=savejson(rootname,obj,varargin) % % json=savejson(rootname,obj,filename) % or % json=savejson(rootname,obj,opt) % json=savejson(rootname,obj,'param1',value1,'param2',value2,...) % % convert a MATLAB object (cell, struct or array) into a JSON (JavaScript % Object Notation) string % % author: Qianqian Fa...
github
JaneliaSciComp/Wavesurfer-master
loadjson.m
.m
Wavesurfer-master/+ws/+examples/+pez/private/loadjson.m
16,691
ibm852
dd2f29841eebc41459f714f33090e1d3
function data = loadjson(fname,varargin) % % data=loadjson(fname,opt) % or % data=loadjson(fname,'param1',value1,'param2',value2,...) % % parse a JSON (JavaScript Object Notation) file or string % % authors:Qianqian Fang (q.fang <at> neu.edu) % created on 2011/09/09, including previous works from % % Nedial...
github
JaneliaSciComp/Wavesurfer-master
loadubjson.m
.m
Wavesurfer-master/+ws/+examples/+pez/private/loadubjson.m
13,289
utf_8
842713b4791ce7f90f68ee37ac2b6138
function data = loadubjson(fname,varargin) % % data=loadubjson(fname,opt) % or % data=loadubjson(fname,'param1',value1,'param2',value2,...) % % parse a JSON (JavaScript Object Notation) file or string % % authors:Qianqian Fang (q.fang <at> neu.edu) % created on 2013/08/01 % % $Id$ % % input: % fname: input file...
github
JaneliaSciComp/Wavesurfer-master
saveubjson.m
.m
Wavesurfer-master/+ws/+examples/+pez/private/saveubjson.m
17,768
utf_8
9d6ad2481e94361a1d7c8b5f08908230
function json=saveubjson(rootname,obj,varargin) % % json=saveubjson(rootname,obj,filename) % or % json=saveubjson(rootname,obj,opt) % json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...) % % convert a MATLAB object (cell, struct or array) into a Universal % Binary JSON (UBJSON) binary string % % author...
github
JaneliaSciComp/Wavesurfer-master
jtcp.m
.m
Wavesurfer-master/+ws/+jtcp/jtcp.m
19,854
utf_8
fada54e2ac14dea4884f013c14cecb7b
function [varargout] = jtcp(actionStr,varargin) % % jtcp.m--Uses Matlab's Java interface to handle Transmission Control % Protocol (TCP) communications with another application, either on the % same computer or a remote one. This version of jtcp is not restricted to % transmitting and receiving variables of type i...
github
ndwork/dworkLib-master
quadRoots.m
.m
dworkLib-master/quadRoots.m
1,957
utf_8
0174c9c94c111a6ea82bd07e203dd1d9
function [roots,roots2] = quadRoots( p, b, c ) % roots = quadRoots( a, b, c ) or % roots = quadRoots( p ) or % [roots1,roots2] = quadRoots( a, b, c ) or % [roots1,roots2] = quadRoots( p ); % % Numerically stable method of Determining the roots of a quadratic polynomial % Written according to equation 5.6...
github
ndwork/dworkLib-master
imColorResize.m
.m
dworkLib-master/imColorResize.m
1,353
utf_8
cc05fd992ff6e245f9c4165d17ddc38a
function out = imColorResize( img, newSize, varargin ) % out = imColorResize( img, newSize, varargin ) % % Inputs: % img - original color image % newSize - 1, 2, or 3 element array specifying new array size; % If 1 element, then assumed to be the scale % 3rd element must be 3. If two element...
github
ndwork/dworkLib-master
matrixVolProd.m
.m
dworkLib-master/matrixVolProd.m
1,158
utf_8
078c9009f514a89a33bb64d3c0bed037
function out = matrixVolProd( A, vol ) % out = matrixVolProd( A, vol ) % % Left matrix multiply each slice of vol by the matrix A. % If the 3rd dimension of vol is much larger than the dimensions of A, this % is faster than just writing a loop. % % Inputs: % A - 2D array of size MxN % vol - 3D array ...
github
ndwork/dworkLib-master
mri_reconGRAPPA.m
.m
dworkLib-master/mri_reconGRAPPA.m
14,590
utf_8
46eca13b11a94fa0e7d9707addd93610
function k_out = mri_reconGRAPPA( k_in, kernel_sz, acr_sz ) % % Generalized Autocalibrating Partially Parallel Acquisitions (GRAPPA) is a parallel imaging % reconstruction algorithm for magnetic resonance imaging. It reconstructs missing samples as a % linear combination of nearby points in k-space from *all ...
github
ndwork/dworkLib-master
findRadialDistortionFromLines.m
.m
dworkLib-master/findRadialDistortionFromLines.m
3,034
utf_8
f95679a353da040edc13b54b2b39e160
function [ ks, c ] = findRadialDistortionFromLines( lines, varargin ) % k = findRadialDistortionFromLines( img, lines [, order ] ) % % Note: this function assumes the aspect ratio of point coordinates is 1. % % Inputs: % lines - a 1D cell array where each cell contains a set of points belonging to a line ...
github
ndwork/dworkLib-master
panSharpen.m
.m
dworkLib-master/panSharpen.m
4,082
utf_8
f75ad47541f2e3db12b61ef0a08266ee
function out = panSharpen( M, C, varargin ) % out = panSharpen( M, C/R [, G, B, IR, 'chWs', chWs, 'lambda', lambda, 'sigma', sigma ] ) % % The algorithm implemented is described in "Fusion of Multispectral and Panchromatic % Images Using a Restoration-Based Method" by Zhenhua Li et al. % % Inputs: % Eith...
github
ndwork/dworkLib-master
alphaBlend.m
.m
dworkLib-master/alphaBlend.m
919
utf_8
057ca0db387a714f4f816b4ea88b358d
function fused = alphaBlend( img1, img2, alpha ) % out = alphaBlend( img1, img2 [, alpha ] ) % % Perform alpha blending image fusion % % Inputs: % img1 - a 2D or 3D array representing the first image % img2 - a 2D or 3D array representing the third image % % Optional Inputs: % alpha - out = alpha *...
github
ndwork/dworkLib-master
circConv.m
.m
dworkLib-master/circConv.m
1,521
utf_8
50ae6d2901aded0e4b46cbe38bf77dfe
function out = circConv( inArray, kernel, op ) % out = circConv( inArray, kernel [, op ] ) % % Calculates the circular convolution of inArray with kernel. % The origin of inArray is the first element. % The origin of kernel is the center element. % % Inputs: % inArray - a 2D array % kernel - a sm...
github
ndwork/dworkLib-master
norms.m
.m
dworkLib-master/norms.m
1,010
utf_8
f4115da21da53c07f6d7948f77af3e73
function out = norms( A, p, dim ) % out = norms( A [, p, dim ] ) % % Calculates the p norm of A along dimension dim % % Inputs: % A - a matrix of dimension <= dim % % Optional Inputs: % p - Compute the Lp norm (default is 2) % dim - (default is last dimension) % % Written by Nicholas Dwork - Co...
github
ndwork/dworkLib-master
getFeaturesFromImg.m
.m
dworkLib-master/getFeaturesFromImg.m
1,170
utf_8
e5c8f002d0accfd1b8b1a5054737f8ef
function [features,values] = getFeaturesFromImg( n, varargin ) % features = getFeaturesFromImg( n [, scale ] ) % % Inputs: % n - the number of features to select % scale - the scale of the displayed image (default is 1) % % Output: % features - a 2 column array. The first column are the x (or % hori...
github
ndwork/dworkLib-master
isOdd.m
.m
dworkLib-master/isOdd.m
1,478
utf_8
4a8291f5823d79e9dec2fdfb2829c9b8
function [out,error] = isOdd( data, varargin ) % [out,error] = isOdd( data, [ threshold ] ) % Determines whether or not data is odd (with circular boundary % conditions) % Indexes are defined according to fftshift % % Inputs: % data is a 1D or 2D array % threshold is an optional input. The relative ...
github
ndwork/dworkLib-master
size2fftCoordinates.m
.m
dworkLib-master/size2fftCoordinates.m
1,686
utf_8
85f4a47c1401603d446f8c9081dbf49f
function ks = size2fftCoordinates( N ) % ks = size2fftCoordinates( N ) % % Inputs: % N is an an array specifying the number of elements in each dimension. % For example, N can be a two element array [Ny Nx] specifying the % number of row and columns of the Fourier Transformed image. % % Outputs...
github
ndwork/dworkLib-master
drawContour.m
.m
dworkLib-master/drawContour.m
1,890
utf_8
4a3deb46b16c7cfba807585cc952e1c6
function contour = drawContour( img, varargin ) % contour = drawContour( img ) % % displays figure to the screen and lets user create a contour % Type 'h' for help % % Inputs: % img - 2D array representing the grayscale image or 3D array % representing the color image (third dimension has size ...
github
ndwork/dworkLib-master
indx2str.m
.m
dworkLib-master/indx2str.m
1,200
utf_8
e5e56bd9003add1451fb9e1f2a35a28b
function out = indx2str( indx, N ) % out = indx2str( indx [, N ] ) % % Converts index to a string the appropriate size for N with padded zeros % For example, if N is 100, will convert indx=88 into '088'; % % Inputs: % indx - the number to convert into a string % % Optional Inputs: % N - the maximum...
github
ndwork/dworkLib-master
showFeaturesOnImg.m
.m
dworkLib-master/showFeaturesOnImg.m
2,091
utf_8
3b546e14fd04064c2ea3ab5e2b0e554b
function showFeaturesOnImg( features, varargin ) % showFeaturesOnImg( features [, img, 'range', range, 'scale', scale, ... % 'color', color, 'figH', figH, 'connect', true/false, 'offset', offset ] ) % % Inputs: % features - 2D array of size Nx2 % N is the number of points % The first/second column ...
github
ndwork/dworkLib-master
showVolumeSlices.m
.m
dworkLib-master/showVolumeSlices.m
1,462
utf_8
d3ae2c8bebdb32702634dc8abe81f0a7
function out = showVolumeSlices( vol, varargin ) % showVolumeSlices( vol, [ range, 'rots', rots, 'noshow', noshow ] ); % % Show the middle slices in each dimension % % Inputs: % vol - a 3D array % rots - a 3 element array specifying the rotation to apply to each frame % noshow - if true, no image is di...
github
ndwork/dworkLib-master
wtHaar2.m
.m
dworkLib-master/wtHaar2.m
2,350
utf_8
18c6d9617e0490ab1b58eb1e6e925ce4
function wt = wtHaar2( img, varargin ) % wt = wtHaar2( sig [, split ] ); % Performs a Haar wavelet transform of an image % % Inputs: % img - 2D array representing the image to be transformed % % Optional Inputs: % split - array specifying the number of levels of the wavelet transform. % by default,...
github
ndwork/dworkLib-master
crossCorrelate.m
.m
dworkLib-master/crossCorrelate.m
1,805
utf_8
ec87b230823bf7b508c533398ca05d3d
function out = crossCorrelate( inArray, kernel, op ) % out = out = crossCorrelate( inArray, kernel [, op ] ) % % Calculates the cross correlation of inArray with kernel. % The origin of inArray is the first element. % The origin of kernel is the center element. % % Inputs: % inArray - an N dimensio...
github
ndwork/dworkLib-master
findDoGFeatures2D.m
.m
dworkLib-master/findDoGFeatures2D.m
1,089
utf_8
82971839b3749d09e9472fecacad7dde
function features = findDoGFeatures2D( img, varargin ) % features = findDoGFeatures2D( vol, ... % [ 'nFeatures', nFeatures, 'dThresh', dThresh ] ) defaultNFeatures = 100; defaultDThresh = 10; p = inputParser; p.addParamValue( 'nFeatures', defaultNFeatures ); p.addParamValue( 'dThresh', defaultDThresh ...
github
ndwork/dworkLib-master
mri_reconJointSparse.m
.m
dworkLib-master/mri_reconJointSparse.m
4,285
utf_8
5b254b492fbd1930c948472903710291
function [recons,objectiveValues] = mri_reconJointSparse( data, traj, sImg, ... lambda, varargin ) % recons = mri_reconJointSparse( data, traj, sImg, lambda [, % 'alpha', alpha, 'W', W, 'nC', nC ] ) % % Inputs: % data - an NxC array of data values where N is the number of data points and % C is the...
github
ndwork/dworkLib-master
wtDaubechies.m
.m
dworkLib-master/wtDaubechies.m
2,002
utf_8
4b09a957cf3eade4f75f787b14ace0d3
function wt = wtDaubechies( sig, varargin ) % wt = wtDaubechies( sig [, split] ); % % Performs a Daubechies wavelet transform of a signal with circular boundary conditions % Based on the Wikipedia page on the Daubechies wavelet transform and % (http://wavelets.pybytes.com/wavelet/db2/) % Note that this is ...
github
ndwork/dworkLib-master
legendnice.m
.m
dworkLib-master/legendnice.m
1,097
utf_8
cf3e675da6f1f41425572b5d3aa43f86
function legHandle = legendnice( varargin ) % legHandle = legendnice( names [, 'ax', ax ] ) % % Makes a legend with large font and puts it in the best place % % Inputs: % names - a cell array that will be the legend % % Outputs: % legHandle - the handle to the legend % % Optional Inputs: % ax -...
github
ndwork/dworkLib-master
nonlocalMeans.m
.m
dworkLib-master/nonlocalMeans.m
5,629
utf_8
b61ed1b86fd75c1369d3e17103e24c87
function out = nonlocalMeans( img, varargin ) %out = nonlocalMeans( img, [ 'kSize', kSize, 'searchSize', searchSize, ... % 'sigmaS', sigmaS ] ); % % Inputs % img: the input image to be denoised (a 2D array) % kSize: (optional) the length of each side of the kernel % searchSize: (optional) the lengt...
github
ndwork/dworkLib-master
mrs_reconSVD.m
.m
dworkLib-master/mrs_reconSVD.m
1,363
utf_8
0a5f85d567665c4481383e17d5d3d60f
function out = mrs_reconSVD( coilSpectrums ) % out = mrs_reconSVD( coilSpectrums ) % % Combines the spectrums from all coils into a single spectral image % using the SVD method of "Spectral analysis of multichannel MRS data" by % Sandgren et al. % % Inputs: % coilSpectrums - an array of size sImg x nCo...
github
ndwork/dworkLib-master
circularCrop.m
.m
dworkLib-master/circularCrop.m
2,635
utf_8
4e2e1009a0c7aaba204c25e1893c1a78
function out = circularCrop( data, newSize ) % out = circularCrop( data, newSize ) % % Inputs: % data - array % newSize - 1D array with number of elements equal to the number of dimensions of data % or a scalar (which assumes same cropped size in all dimensions) % % Outputs: % out - array o...
github
ndwork/dworkLib-master
findAndTrackFeatures3D.m
.m
dworkLib-master/findAndTrackFeatures3D.m
1,576
utf_8
cce8e97e62d240da7d8e002aecd02e0e
function [pts1, pts2] = findAndTrackFeatures3D( vol1, vol2, varargin ) % corners = findAndTrackCorners( vol1, vol2 ... % [, 'N', N, 'buffer', buffer, 'w', w, ... % 'searchWidth', searchWidth, 'offset', offset ] ) % % Inputs: % vol1/vol2 - 2D arrays; find features in img1 and track into img2 % N - the...
github
ndwork/dworkLib-master
displayNice.m
.m
dworkLib-master/displayNice.m
2,372
utf_8
e3656bf0845d4ef2d1a75c65321808a7
function displayNice( dispFunctionH, in1, varargin ) % disFunctionH - the function handle of the display function % (may be plot or semilogy) % % This function is called by plotnice and semilogynice % % Written by Nicholas Dwork, Copyright 2019 % % This software is offered under the GNU General Publi...
github
ndwork/dworkLib-master
smoothData.m
.m
dworkLib-master/smoothData.m
3,273
utf_8
7d4f0ba6f1190061686165eb78493a59
function out = smoothData( in, varargin ) % out = smoothData( in [, N, 'gaussian', sigma, 'op', op ] ); % % Inputs: % in - either a 2D array (representing an image) or a 3D array (representing a color image) % if op is 'notransp' then in should be the image % if op is 'transp' then adjoint is applied t...
github
ndwork/dworkLib-master
makeGaussFilter.m
.m
dworkLib-master/makeGaussFilter.m
1,395
utf_8
9ebd6606c786e84a539e7b1b5df478fe
function f = makeGaussFilter( N, C ) % f = makeGaussFilter( N, C ) % This function makes a gaussian filter of arbitrary dimensions % The final filter is N(1) x N(2) x ... x N(end) in size. % C is the covariance matrix with units in pixels. % If C is a single element, the covariance matrix is assumed to be ...
github
ndwork/dworkLib-master
smoothImg.m
.m
dworkLib-master/smoothImg.m
2,380
utf_8
4c765b26a2fd7f5025889fd01190ce1a
function out = smoothImg( in, varargin ) % out = smoothImg( in [, N, 'gaussian', sigma, 'op', op ] ); % % Inputs: % in - either a 2D array (representing an image) or a 3D array (representing a color image) % if op is 'notransp' then in should be the image % if op is 'transp' then adjoint is applied to ...
github
ndwork/dworkLib-master
lassoCP.m
.m
dworkLib-master/lassoCP.m
2,033
utf_8
21b3135e8d6f03923a4d29e4d9bdfde8
function [x,residuals] = lassoCP( K, b, gamma, varargin ) % [x,residuals] = lassoCP( K, b, gamma [, sigma, tau, ... % theta, 'nIter', nIter ] ); % % Solves the Lasso problem: % minimize (1/2)|| K x - b ||_2 + gamma || x ||_1 % Uses Chambolle-Pock (Primal-Dual Algorithm) based on A First-Order % Pri...
github
ndwork/dworkLib-master
mrs_findSensitivityMaps.m
.m
dworkLib-master/mrs_findSensitivityMaps.m
1,655
utf_8
2c25d43a38102a7889ecf8d4405ec890
function sMaps = mrs_findSensitivityMaps( coilSpectrums, noiseCoords ) % sMaps = mrs_findSensitivityMaps( coilSpectrums ) % % Inputs: % coilSpectrums - an array of size sImg x nCoils x nF representing the Fourier value % of each spatial location and frequency bin % The data is in space and temporal fre...
github
ndwork/dworkLib-master
orthogonalMatchingPursuit.m
.m
dworkLib-master/orthogonalMatchingPursuit.m
1,242
utf_8
79cc707286c02fadb415e6ad17b0b822
function x = orthogonalMatchingPursuit( A, b, K ) % x = orthogonalMatchingPursuit( A, b, K ) % % Written according to "Signal Reconvery From Random Measurements Via % Orthogonal Matching Pursuit" by Tropp and Gilbert and "Orthogonal % Matching Pursuit: Recursive Function Approximation with Applications to ...
github
ndwork/dworkLib-master
volVecMatrixProd.m
.m
dworkLib-master/volVecMatrixProd.m
688
utf_8
820832f4246450315610b87b9516889e
function out = volVecMatrixProd( vol, vec ) % Each slice of vol is a matrix that will multiply a column vector % % Inputs: % vol - an MxNxK array where vol(:,:,k) left multiplies vec % vec - an Nx1 array that is left multiplied by each slice of vol % % Outputs: % out - an Mx1xK array % % Written by...
github
ndwork/dworkLib-master
findNumLinesInFile.m
.m
dworkLib-master/findNumLinesInFile.m
788
utf_8
59ad7bb157c99d287671749ff4252cc6
function nLines = findNumLinesInFile( file ) % nLines = findNumLinesInFile( file ); % % Inputs: % file - string with filename % % Outputs: % nLines - the number of lines in the file % % Written by Nicholas Dwork - Copyright 2017 % % This software is offered under the GNU General Public License 3....
github
ndwork/dworkLib-master
sobel.m
.m
dworkLib-master/sobel.m
720
utf_8
09ab3c6753d45798e997a7ae0eb996ea
function out = sobel( img ) % out = sobel( img ) % % Calculates the sobel operator of an image % % Written by Nicholas Dwork - Copyright 2020 % % This software is offered under the GNU General Public License 3.0. It % is offered without any warranty expressed or implied, including the % implied warr...
github
ndwork/dworkLib-master
parpoolExists.m
.m
dworkLib-master/parpoolExists.m
437
utf_8
e11d303eb27cf03395e5081b50988247
function out = parpoolExists() % out = parpoolExists() % % Determines if a parpool has been created or not % % Written by Nicholas Dwork, Copyright 2018 % % This software is offered under the GNU General Public License 3.0. It % is offered without any warranty expressed or implied, including the % i...
github
ndwork/dworkLib-master
makePrecompWeights_2D.m
.m
dworkLib-master/makePrecompWeights_2D.m
28,676
utf_8
58321953c8860fbd762237d9289ba62a
function [weights,nOptIter,flag,res] = makePrecompWeights_2D( kTraj, varargin ) % [weights,nOptIter,flag,res] = makePrecompWeights_2D( kTraj [, 'sImg', sImg, ... % 'alpha', alpha, 'W', W, 'nC', nC, 'alg', alg, 'subAlg', subAlg ] ) % % Determine the density pre-compensation weights to be used in gridding % ...
github
ndwork/dworkLib-master
iwtDaubechies.m
.m
dworkLib-master/iwtDaubechies.m
1,952
utf_8
29cd5f92a104603cb08d1820989a3ca6
function sig = iwtDaubechies( wt, varargin ) % sig = iwtDaubechies( wt [, split] ); % Performs an inverse Daubechies wavelet transform of a signal with % circular boundary conditions % Note that this is a unitary transform % % Inputs: % wt - 1D array representing the wavelet transform of the signal ...
github
ndwork/dworkLib-master
lm.m
.m
dworkLib-master/lm.m
1,681
utf_8
0d453d30a63314e3fa52b744c82204f7
function out = lm( f, fPrime, x0, varargin ) % out = lm( f, fPrime, x0 [, 'L0', L0, 'nIter', nIter ] ) % % This is an implementation of the Levenberg-Marquardt algorithm that % utilizes an analytic expression of the gradient of the objective function. % % Inputs: % f - handle for function to be minimized...
github
ndwork/dworkLib-master
iwtHaar.m
.m
dworkLib-master/iwtHaar.m
1,433
utf_8
15381bacc119093352d03cb3fadd3f9c
function sig = iwtHaar( wt, varargin ) % sig = iwtHaar( wt [, split] ); % Performs an inverse Haar wavelet transform of a signal % % Inputs: % wt - 1D array representing the wavelet transform of the signal % % Optional Inputs: % split - array specifying the number of levels of the wavelet transform. ...
github
ndwork/dworkLib-master
ctBackProject.m
.m
dworkLib-master/ctBackProject.m
2,993
utf_8
c2acd4eca53c9db7f82b7d813988ced1
function bp = ctBackProject( sinogram, thetas, dSize, cx, cy, Nx, Ny, ... dx, dy, varargin ) % bp = ctBackProject( sinogram, thetas, dSize, cx, cy, Nx, Ny, dx, dy [, 'type', ] ) % % Performs back projection of a sinogram with physical units of a computed % tomography detector % % Inputs: % sin...
github
ndwork/dworkLib-master
fftshift2.m
.m
dworkLib-master/fftshift2.m
664
utf_8
1f05fb41dd72c76ce33c8d0fe3ba0894
function out = fftshift2( in ) % out = fftshift2( in ) % % Performs fftshift on the first two dimensions of in % % Inputs: % in - input array of at least two dimensions % % Outputs: % out - output array % % Written by Nicholas Dwork - Copyright 2021 % % This software is offered under the GNU ...
github
ndwork/dworkLib-master
makeLoraksMatrix.m
.m
dworkLib-master/makeLoraksMatrix.m
3,570
utf_8
2d719e0783d3e1673f595dd895f3893b
function out = makeLoraksMatrix( in, varargin ) % out = makeLoraksMatrix( in [, 'op', op, 'R', R, 'sKData', sKData ] ); % % Makes the C LORAKS matrix from the k-space array in. % The C LORAKS matrix is defined in "Low-Rank Modeling of Local k-Space % Neighborhoods (LORAKS) for Constrained MRI" by Justin Hald...
github
ndwork/dworkLib-master
mri_ab2Matrix.m
.m
dworkLib-master/mri_ab2Matrix.m
984
utf_8
b380f0e322666bbcf9f3e301ca73eb18
function M = mri_ab2Matrix( a, b ) % Converts the Cayley-Klein parameters into a matrix so that % next([ Mxy; conj(Mxy); Mz]) = Matrix * [ Mxy; conj(Mxy); Mz ] % % Inputs % a - a 1D array of the alpha CK parameters % b - a 1D array of the beta CK parameters % % Outputs: % M - a 3D array of size 3x3xN...
github
ndwork/dworkLib-master
bisectionMethod.m
.m
dworkLib-master/bisectionMethod.m
1,619
utf_8
f9a9265cf03bd7be110d8a1ad30a8773
function biRoot = bisectionMethod( biFunc, xLB, xUB, varargin ) % biRoot = bisectionMethod( biFunc, x1, x2, varargin ) % % Finds the root of the function biFunc % % Inputs: % biFunc - function handle; root will be found of this function % xLB - lower bound on root % xUB - upper bound on root % % Op...
github
ndwork/dworkLib-master
wtHaar.m
.m
dworkLib-master/wtHaar.m
1,349
utf_8
67849662108eeb3d25a68e870d67bc97
function wt = wtHaar( sig, varargin ) % wt = wtHaar( sig [, split] ); % Performs a Haar wavelet transform of a signal % Note that this is a unitary transform % % Inputs: % sig - 1D array representing the signal to be transformed % % Optional Inputs: % split - array specifying the number of levels of ...
github
ndwork/dworkLib-master
ctIRadon2DFT.m
.m
dworkLib-master/ctIRadon2DFT.m
2,320
utf_8
13e844432b51ed76bea9af1c4a22a6cc
function out = ctIRadon2DFT( sinogram, thetas, dSize, cx, cy, Nx, Ny, dx, dy, window ) % ctIRadon2DFT( sinogram, thetas, dSize, cx, cy, Nx, Ny, dx, dy, window ) % % Computes the inverse Radon transform with the Fourier Slice theorem using % physical units of a computed tomography detector % % Inputs...
github
ndwork/dworkLib-master
iGrid.m
.m
dworkLib-master/iGrid.m
1,284
utf_8
c22bd73ff0bdb4a01ecba8eb8f6b20c1
function k = iGrid( img, traj, varargin ) % k = iGrid( img, traj, [ 'alpha', alpha, 'W', W, 'nC', nC ] ) % % Inverse Gridding based on Beatty et. al., IEEE TMI, 2005 % Detailed in the following document http://nicholasdwork.com/tutorials/dworkGridding.pdf % % Inputs: % img is an array specifying the volu...
github
ndwork/dworkLib-master
mri_reconGridding.m
.m
dworkLib-master/mri_reconGridding.m
3,461
utf_8
cef34463d70d9e334cd070962ec87083
function recons = mri_reconGridding( kData, traj, sImg, varargin ) % recons = mri_reconGridding( kData, trajs, sImg [, 'alg', alg, 'alpha', alpha, ... % 'W', W, 'nC', nC, 'weights', weights, 'verbose', verbose ] ) % % Performs a gridding recon for each coil % % Inputs: % kData - A complex N x C x D1 x ...
github
ndwork/dworkLib-master
stats.m
.m
dworkLib-master/stats.m
2,466
utf_8
32f0fa3e5cfbd4609c5899aa76ca445c
function stats( data ) % stats( data ) % % display several relevant stats about the data array to the screen % % Written by Nicholas Dwork - Copyright 2017 % % https://github.com/ndwork/dworkLib.git % % This software is offered under the GNU General Public License 3.0. It % is offered without any ...
github
ndwork/dworkLib-master
volVecsMatrixProd.m
.m
dworkLib-master/volVecsMatrixProd.m
746
utf_8
8175bd25a70945bd586716e840915b17
function out = volVecsMatrixProd( A, vs ) % out = volVecsMatrixProd( A, vs ) % % Matrix multiplies each slice of A by each colum of vs % % Inputs: % A - A 3D array % vs - A 2D array representing a set of vectors (each col is a vector) % % Outputs: % out - out(:,i) = A(:,:,i) * vs(:,i) for all i %...
github
ndwork/dworkLib-master
applyC_2D.m
.m
dworkLib-master/applyC_2D.m
7,703
utf_8
3fe0c4955eb022ad7cbcad6b0c9b8da0
function out = applyC_2D( F, domTraj, rangeTraj, kCy, kCx, Cy, Cx ) % out = applyC_2D( F, domTraj, N, kCy, kCx, Cy, Cx ) % or % out = applyC_2D( F, N, rangeTraj, kCy, kCx, Cy, Cx ) % or % out = applyC_2D( F, domTraj, rangeTraj, kCy, kCx, Cy, Cx ) % % Applies a continuous circular convolution of a kernel ...
github
ndwork/dworkLib-master
projCmpMag.m
.m
dworkLib-master/projCmpMag.m
887
utf_8
f56c0037a57aaaae1aef187061240692
function out = projCmpMag( x, t ) % out = projCmpMag( x, t ) % % Project x so that its magnitude is less than or equal to t % % Inputs: % x - an array of values to project onto the set {|x_i| <= t for all i} % t - scalar >= 0 % % out - array of size(x) with projected magnitudes % % Written by Nic...
github
ndwork/dworkLib-master
fitPolyToData.m
.m
dworkLib-master/fitPolyToData.m
1,261
utf_8
13671d0a5b0dedcdaa4c35bac472f2e3
function [v,RSquared] = fitPolyToData( N, x, y ) % [v,RSquared] = fitPolyToData( N, x [, y] ) % % This function finds a polynomial p so that || y - p(x) ||_2 is minimized % % Inputs: % N - the order of the polynomial % x - (optional) domain values. If not supplied, x = 1, 2, ..., numel(y) % y - range ...
github
ndwork/dworkLib-master
getGammaH.m
.m
dworkLib-master/getGammaH.m
285
utf_8
44ecd2c34d297857a4b82fc2895c2af9
function [gammaBar, gamma] = getGammaH() % Returns the gyromagnetic ratio of hydrogen % [gammaBar, gamma] = getGammaH() % gammaBar is in kHz / Gauss % gamma is in kRad / Gauss gammaBar = 4.2576; % kHz / Gauss gamma = 2*pi*gammaBar; % kRad / Gauss / s end
github
ndwork/dworkLib-master
ransacDltHomographyFromPts2D.m
.m
dworkLib-master/ransacDltHomographyFromPts2D.m
1,718
utf_8
972ac8a372cd9786532dbafee955e633
function [H,inlierIndxs,outlierIndxs] = ransacDltHomographyFromPts2D( ... pts1, pts2, thresh ) % [H,inlierIndxs,outlierIndxs] = ransacDltHomographyFromPts2D( ... % pts1, pts2, thresh ) % This function finds the 3x3 homography H such that pt2 = H * pt1; % It implements RANSAC with the Direct Linear Transfor...
github
ndwork/dworkLib-master
mri_lowRankRecon.m
.m
dworkLib-master/mri_lowRankRecon.m
4,026
utf_8
941608be9475b0601af661c8d7fcdc11
function [recon,objectiveValues] = mri_lowRankRecon( data, traj, sMaps, ... lambda, varargin ) % recon = mri_lowRankRecon( data, traj, sMaps, lambda [, % 'alpha', alpha, 'W', W, 'nC', nC ] ) % % Dynamic MRI reconstruction using low rank regularization in the temporal dimension % Written as problem (6) i...
github
ndwork/dworkLib-master
imshownice.m
.m
dworkLib-master/imshownice.m
4,164
utf_8
18f08947f2746c16a560b26f56a8e2d9
function [scaling,imH] = imshownice( img, varargin ) % scaling = imshownice( img [, scale, 'method', method, 'sdevScale', sdevScale, ... % 'thresh', thresh, 'border', border ] ) % show the image on the following scale: % meanImg - sdevScale*sdevImg, meanImg + sdevScale*sdevImg % % Inputs: % img - 2D ...
github
ndwork/dworkLib-master
powerIteration.m
.m
dworkLib-master/powerIteration.m
5,549
utf_8
69f5e9434cfeb56e2f119e84283ed472
function [nrm,flag] = powerIteration( M, varargin ) % Determines an approximation for the norm of the matrix M % % [nrm,flag] = powerIteration( M [, x0, 'maxIters', maxIters, 'symmetric', true/false, ... % 'tolerance', tolerance, 'verbose', true/false ]) % % Inputs: % M is either a matrix or a function...