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 | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | loadubjson.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/5 bias vs variance linear regression/ex5/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | saveubjson.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/5 bias vs variance linear regression/ex5/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | submit.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/3 neural nets/ex3/submit.m | 1,567 | utf_8 | 1dba733a05282b2db9f2284548483b81 | function submit()
addpath('./lib');
conf.assignmentSlug = 'multi-class-classification-and-neural-networks';
conf.itemName = 'Multi-class Classification and Neural Networks';
conf.partArrays = { ...
{ ...
'1', ...
{ 'lrCostFunction.m' }, ...
'Regularized Logistic Regression', ...
}, ..... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | submitWithConfiguration.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/3 neural nets/ex3/lib/submitWithConfiguration.m | 3,926 | utf_8 | f889a7cf3dc6c1c2877566d38df1bec8 | function submitWithConfiguration(conf)
% Note: has the "certificate" patch from Liran for Windows-like systems
addpath('./lib/jsonlab');
%keyboard
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | savejson.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/3 neural nets/ex3/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | loadjson.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/3 neural nets/ex3/lib/jsonlab/loadjson.m | 18,884 | ibm852 | d21f0844f91f2dbb9ea8df00eda346ca | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | loadubjson.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/3 neural nets/ex3/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | saveubjson.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/3 neural nets/ex3/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | submit.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/8 Anomaly detection and recommender system/ex8/submit.m | 2,064 | utf_8 | 7c4fcf60df3a7e09d05a74f7772fed3b | function submit()
addpath('./lib');
conf.assignmentSlug = 'anomaly-detection-and-recommender-systems';
conf.itemName = 'Anomaly Detection and Recommender Systems';
conf.partArrays = { ...
{ ...
'1', ...
{ 'estimateGaussian.m' }, ...
'Estimate Gaussian Parameters', ...
}, ...
{ ...... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | submitWithConfiguration.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/8 Anomaly detection and recommender system/ex8/lib/submitWithConfiguration.m | 3,926 | utf_8 | f889a7cf3dc6c1c2877566d38df1bec8 | function submitWithConfiguration(conf)
% Note: has the "certificate" patch from Liran for Windows-like systems
addpath('./lib/jsonlab');
%keyboard
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | savejson.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/8 Anomaly detection and recommender system/ex8/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | loadjson.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/8 Anomaly detection and recommender system/ex8/lib/jsonlab/loadjson.m | 18,884 | ibm852 | d21f0844f91f2dbb9ea8df00eda346ca | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | loadubjson.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/8 Anomaly detection and recommender system/ex8/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | saveubjson.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/8 Anomaly detection and recommender system/ex8/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | submit.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/6 support vector machines/ex6/submit.m | 1,318 | utf_8 | bfa0b4ffb8a7854d8e84276e91818107 | function submit()
addpath('./lib');
conf.assignmentSlug = 'support-vector-machines';
conf.itemName = 'Support Vector Machines';
conf.partArrays = { ...
{ ...
'1', ...
{ 'gaussianKernel.m' }, ...
'Gaussian Kernel', ...
}, ...
{ ...
'2', ...
{ 'dataset3Params.m' }, ...
... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | porterStemmer.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/6 support vector machines/ex6/porterStemmer.m | 9,902 | utf_8 | 7ed5acd925808fde342fc72bd62ebc4d | function stem = porterStemmer(inString)
% Applies the Porter Stemming algorithm as presented in the following
% paper:
% Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14,
% no. 3, pp 130-137
% Original code modeled after the C version provided at:
% http://www.tartarus.org/~martin/PorterStemmer/c.tx... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | submitWithConfiguration.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/6 support vector machines/ex6/lib/submitWithConfiguration.m | 3,926 | utf_8 | f889a7cf3dc6c1c2877566d38df1bec8 | function submitWithConfiguration(conf)
% Note: has the "certificate" patch from Liran for Windows-like systems
addpath('./lib/jsonlab');
%keyboard
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | savejson.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/6 support vector machines/ex6/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | loadjson.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/6 support vector machines/ex6/lib/jsonlab/loadjson.m | 18,884 | ibm852 | d21f0844f91f2dbb9ea8df00eda346ca | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | loadubjson.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/6 support vector machines/ex6/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | saveubjson.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/6 support vector machines/ex6/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | submit.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/4 neural nets/ex4/submit.m | 1,635 | utf_8 | ae9c236c78f9b5b09db8fbc2052990fc | function submit()
addpath('./lib');
conf.assignmentSlug = 'neural-network-learning';
conf.itemName = 'Neural Networks Learning';
conf.partArrays = { ...
{ ...
'1', ...
{ 'nnCostFunction.m' }, ...
'Feedforward and Cost Function', ...
}, ...
{ ...
'2', ...
{ 'nnCostFunct... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | submitWithConfiguration.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/4 neural nets/ex4/lib/submitWithConfiguration.m | 3,926 | utf_8 | f889a7cf3dc6c1c2877566d38df1bec8 | function submitWithConfiguration(conf)
% Note: has the "certificate" patch from Liran for Windows-like systems
addpath('./lib/jsonlab');
%keyboard
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | savejson.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/4 neural nets/ex4/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | loadjson.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/4 neural nets/ex4/lib/jsonlab/loadjson.m | 18,884 | ibm852 | d21f0844f91f2dbb9ea8df00eda346ca | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | loadubjson.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/4 neural nets/ex4/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | saveubjson.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/4 neural nets/ex4/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | submit.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/2 Logistic Regression/ex2/submit.m | 1,605 | utf_8 | 9b63d386e9bd7bcca66b1a3d2fa37579 | function submit()
addpath('./lib');
conf.assignmentSlug = 'logistic-regression';
conf.itemName = 'Logistic Regression';
conf.partArrays = { ...
{ ...
'1', ...
{ 'sigmoid.m' }, ...
'Sigmoid Function', ...
}, ...
{ ...
'2', ...
{ 'costFunction.m' }, ...
'Logistic R... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | submit.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/1 Linear Regression with Multiple Variables/ex1/submit.m | 1,876 | utf_8 | 8d1c467b830a89c187c05b121cb8fbfd | function submit()
addpath('./lib');
conf.assignmentSlug = 'linear-regression';
conf.itemName = 'Linear Regression with Multiple Variables';
conf.partArrays = { ...
{ ...
'1', ...
{ 'warmUpExercise.m' }, ...
'Warm-up Exercise', ...
}, ...
{ ...
'2', ...
{ 'computeCost.m... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | submitWithConfiguration.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/1 Linear Regression with Multiple Variables/ex1/lib/submitWithConfiguration.m | 3,926 | utf_8 | f889a7cf3dc6c1c2877566d38df1bec8 | function submitWithConfiguration(conf)
% Note: has the "certificate" patch from Liran for Windows-like systems
addpath('./lib/jsonlab');
%keyboard
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | savejson.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/1 Linear Regression with Multiple Variables/ex1/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | loadjson.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/1 Linear Regression with Multiple Variables/ex1/lib/jsonlab/loadjson.m | 18,884 | ibm852 | d21f0844f91f2dbb9ea8df00eda346ca | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | loadubjson.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/1 Linear Regression with Multiple Variables/ex1/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | saveubjson.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/1 Linear Regression with Multiple Variables/ex1/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | submit.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/7 K-means clustering and PCA/ex7/submit.m | 1,438 | utf_8 | 665ea5906aad3ccfd94e33a40c58e2ce | function submit()
addpath('./lib');
conf.assignmentSlug = 'k-means-clustering-and-pca';
conf.itemName = 'K-Means Clustering and PCA';
conf.partArrays = { ...
{ ...
'1', ...
{ 'findClosestCentroids.m' }, ...
'Find Closest Centroids (k-Means)', ...
}, ...
{ ...
'2', ...
... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | submitWithConfiguration.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/7 K-means clustering and PCA/ex7/lib/submitWithConfiguration.m | 3,926 | utf_8 | f889a7cf3dc6c1c2877566d38df1bec8 | function submitWithConfiguration(conf)
% Note: has the "certificate" patch from Liran for Windows-like systems
addpath('./lib/jsonlab');
%keyboard
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | savejson.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/7 K-means clustering and PCA/ex7/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | loadjson.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/7 K-means clustering and PCA/ex7/lib/jsonlab/loadjson.m | 18,884 | ibm852 | d21f0844f91f2dbb9ea8df00eda346ca | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | loadubjson.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/7 K-means clustering and PCA/ex7/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | kartik-nighania/Coursera-Machine-Learning-Course-by-Stanford-master | saveubjson.m | .m | Coursera-Machine-Learning-Course-by-Stanford-master/7 K-means clustering and PCA/ex7/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | nagadomi/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 | gylee1103/ELDNet-master | classification_demo.m | .m | ELDNet-master/caffe/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 | fasiha/cython-demo-master | numpyToMat.m | .m | cython-demo-master/numpyToMat.m | 731 | utf_8 | 00738f0f052d887028420010b8a9316e | % Taken from answer by Jim Hokanson
% http://www.mathworks.com/matlabcentral/answers/157347-convert-python-numpy-array-to-double
% if a simple list would be like this:
% means = cellfun( @double, cell(ms))
function data = numpyToMat(x)
data_size = cell2mat(cell(x.shape));
% if empty array
if data_size ... |
github | golnazghiasi/cofw68-benchmark-master | VisualizeLocalizationRes.m | .m | cofw68-benchmark-master/VisualizeLocalizationRes.m | 3,332 | utf_8 | 20529c5f9a701993d9c0971e566211bd | function [] = VisualizeLocalizationRes( ...
boxes, pts_name, occ_name, test, testname, figdir, ...
crop_images, show_groundtruth, show_keypoint_num, errors, ...
draw_line_between_gt_det, method_name, max_to_show)
if(~exist('max_to_show', 'var') || max_to_show > length(test))
max_to_show = length(test);
... |
github | golnazghiasi/cofw68-benchmark-master | distinguishable_colors.m | .m | cofw68-benchmark-master/distinguishable_colors.m | 5,753 | utf_8 | 57960cf5d13cead2f1e291d1288bccb2 | function colors = distinguishable_colors(n_colors,bg,func)
% DISTINGUISHABLE_COLORS: pick colors that are maximally perceptually distinct
%
% When plotting a set of lines, you may want to distinguish them by color.
% By default, Matlab chooses a small set of colors and cycles among them,
% and so if you have more than ... |
github | sunhongfu/scripts-master | load_nii_ext.m | .m | scripts-master/cs-phase/_src/_nii/load_nii_ext.m | 5,544 | utf_8 | 09a2960b9d48f4b0363d5065f1780cbd | % Load NIFTI header extension after its header is loaded using load_nii_hdr.
%
% Usage: ext = load_nii_ext(filename)
%
% filename - NIFTI file name.
%
% Returned values:
%
% ext - Structure of NIFTI header extension, which includes num_ext,
% and all the extended header sections in the header extens... |
github | sunhongfu/scripts-master | rri_orient.m | .m | scripts-master/cs-phase/_src/_nii/rri_orient.m | 2,357 | utf_8 | e1b7cfcaf2517b7887ac6e02d9ab504d | % Convert image of different orientations to standard Analyze orientation
%
% Usage: nii = rri_orient(nii);
% Jimmy Shen (jimmy@rotman-baycrest.on.ca), 26-APR-04
%___________________________________________________________________
function [nii, orient, pattern] = rri_orient(nii, varargin)
if nargin >... |
github | sunhongfu/scripts-master | save_untouch0_nii_hdr.m | .m | scripts-master/cs-phase/_src/_nii/save_untouch0_nii_hdr.m | 8,813 | utf_8 | a0a201073cb18f09b62842e94094c451 | % internal function
% - Jimmy Shen (jimmy@rotman-baycrest.on.ca)
function save_nii_hdr(hdr, fid)
if ~isequal(hdr.hk.sizeof_hdr,348),
error('hdr.hk.sizeof_hdr must be 348.');
end
write_header(hdr, fid);
return; % save_nii_hdr
%------------------------------------------------... |
github | sunhongfu/scripts-master | rri_zoom_menu.m | .m | scripts-master/cs-phase/_src/_nii/rri_zoom_menu.m | 770 | utf_8 | f0bae2b3d88fd719c47fd467e867e19f | % Imbed a zoom menu to any figure.
%
% Usage: rri_zoom_menu(fig);
%
% - Jimmy Shen (jimmy@rotman-baycrest.on.ca)
%
%--------------------------------------------------------------------
function menu_hdl = rri_zoom_menu(fig)
if isnumeric(fig)
menu_hdl = uimenu('Parent',fig, ...
'Label','... |
github | sunhongfu/scripts-master | rri_select_file.m | .m | scripts-master/cs-phase/_src/_nii/rri_select_file.m | 17,235 | utf_8 | 0e0b14435a670dd8805aa514f7dbb6bb | function [selected_file, selected_path] = rri_select_file(varargin)
%
% USAGE: [selected_file, selected_path] = ...
% rri_select_file(dir_name, fig_title)
%
% Allow user to select a file from a list of Matlab competible
% file format
%
% Example:
%
% [selected_file, selected_path] = ...
% ... |
github | sunhongfu/scripts-master | clip_nii.m | .m | scripts-master/cs-phase/_src/_nii/clip_nii.m | 3,421 | utf_8 | 19da887808bddae362df38b0e9f35076 | % CLIP_NII: Clip the NIfTI volume from any of the 6 sides
%
% Usage: nii = clip_nii(nii, [option])
%
% Inputs:
%
% nii - NIfTI volume.
%
% option - struct instructing how many voxel to be cut from which side.
%
% option.cut_from_L = ( number of voxel )
% option.cut_from_R = ( number of voxel )
% option... |
github | sunhongfu/scripts-master | affine.m | .m | scripts-master/cs-phase/_src/_nii/affine.m | 16,664 | utf_8 | 419b609560eb98534c0e32cc4506cc7f | % Using 2D or 3D affine matrix to rotate, translate, scale, reflect and
% shear a 2D image or 3D volume. 2D image is represented by a 2D matrix,
% 3D volume is represented by a 3D matrix, and data type can be real
% integer or floating-point.
%
% You may notice that MATLAB has a function called 'imtransform.... |
github | sunhongfu/scripts-master | load_untouch_nii_img.m | .m | scripts-master/cs-phase/_src/_nii/load_untouch_nii_img.m | 15,224 | utf_8 | 46fb6696904467f1848e2882cd7a72f6 | % internal function
% - Jimmy Shen (jimmy@rotman-baycrest.on.ca)
function [img,hdr] = load_untouch_nii_img(hdr,filetype,fileprefix,machine,img_idx,dim5_idx,dim6_idx,dim7_idx,old_RGB,slice_idx)
if ~exist('hdr','var') | ~exist('filetype','var') | ~exist('fileprefix','var') | ~exist('machine','var')
e... |
github | sunhongfu/scripts-master | load_untouch_nii.m | .m | scripts-master/cs-phase/_src/_nii/load_untouch_nii.m | 6,373 | utf_8 | 303eb6438d7d37e2144d554504fbdf54 | % Load NIFTI or ANALYZE dataset, but not applying any appropriate affine
% geometric transform or voxel intensity scaling.
%
% Although according to NIFTI website, all those header information are
% supposed to be applied to the loaded NIFTI image, there are some
% situations that people do want to leave the ... |
github | sunhongfu/scripts-master | collapse_nii_scan.m | .m | scripts-master/cs-phase/_src/_nii/collapse_nii_scan.m | 7,038 | utf_8 | 2d30d10b884719503df2974ff39b7093 | % Collapse multiple single-scan NIFTI files into a multiple-scan NIFTI file
%
% Usage: collapse_nii_scan(scan_file_pattern, [collapsed_fileprefix], [scan_file_folder])
%
% Here, scan_file_pattern should look like: 'myscan_0*.img'
% If collapsed_fileprefix is omit, 'multi_scan' will be used
% If scan_file_fol... |
github | sunhongfu/scripts-master | rri_orient_ui.m | .m | scripts-master/cs-phase/_src/_nii/rri_orient_ui.m | 5,635 | utf_8 | 3361ce417798ffe2c6b53cf194b2a146 | % Return orientation of the current image:
% orient is orientation 1x3 matrix, in that:
% Three elements represent: [x y z]
% Element value: 1 - Left to Right; 2 - Posterior to Anterior;
% 3 - Inferior to Superior; 4 - Right to Left;
% 5 - Anterior to Posterior; 6 - Superior to Inferior;
% e.g.:
% Standard... |
github | sunhongfu/scripts-master | load_untouch0_nii_hdr.m | .m | scripts-master/cs-phase/_src/_nii/load_untouch0_nii_hdr.m | 8,293 | utf_8 | d823050e9ba931a2ba7f9d9a3893d2d1 | % internal function
% - Jimmy Shen (jimmy@rotman-baycrest.on.ca)
function hdr = load_nii_hdr(fileprefix, machine)
fn = sprintf('%s.hdr',fileprefix);
fid = fopen(fn,'r',machine);
if fid < 0,
msg = sprintf('Cannot open file %s.',fn);
error(msg);
else
fseek(fid,0,'bof')... |
github | sunhongfu/scripts-master | load_nii.m | .m | scripts-master/cs-phase/_src/_nii/load_nii.m | 7,006 | utf_8 | 71beffc9e2b0c7e14c2f8dc8adbadbf1 | % Load NIFTI or ANALYZE dataset. Support both *.nii and *.hdr/*.img
% file extension. If file extension is not provided, *.hdr/*.img will
% be used as default.
%
% A subset of NIFTI transform is included. For non-orthogonal rotation,
% shearing etc., please use 'reslice_nii.m' to reslice the NIFTI file.
% I... |
github | sunhongfu/scripts-master | unxform_nii.m | .m | scripts-master/cs-phase/_src/_nii/unxform_nii.m | 1,221 | utf_8 | ff8be64760837046b931857d59ca304e | % Undo the flipping and rotations performed by xform_nii; spit back only
% the raw img data block. Initial cut will only deal with 3D volumes
% strongly assume we have called xform_nii to write down the steps used
% in xform_nii.
%
% Usage: a = load_nii('original_name');
% manipulate a.img to make... |
github | sunhongfu/scripts-master | load_untouch_nii_hdr.m | .m | scripts-master/cs-phase/_src/_nii/load_untouch_nii_hdr.m | 8,739 | utf_8 | eb068c88e2b7bb518ea557d0734bc65d | % internal function
% - Jimmy Shen (jimmy@rotman-baycrest.on.ca)
function hdr = load_nii_hdr(fileprefix, machine, filetype)
if filetype == 2
fn = sprintf('%s.nii',fileprefix);
if ~exist(fn)
msg = sprintf('Cannot find file "%s.nii".', fileprefix);
error(msg);
end
... |
github | sunhongfu/scripts-master | save_nii_ext.m | .m | scripts-master/cs-phase/_src/_nii/save_nii_ext.m | 1,015 | utf_8 | db919f3a7a4b2f64dae641b1e97fa4a0 | % Save NIFTI header extension.
%
% Usage: save_nii_ext(ext, fid)
%
% ext - struct with NIFTI header extension fields.
%
% NIFTI data format can be found on: http://nifti.nimh.nih.gov
%
% - Jimmy Shen (jimmy@rotman-baycrest.on.ca)
%
function save_nii_ext(ext, fid)
if ~exist('ext','var') | ~exist('fi... |
github | sunhongfu/scripts-master | view_nii_menu.m | .m | scripts-master/cs-phase/_src/_nii/view_nii_menu.m | 14,895 | utf_8 | d81fb80884a14ae659630258fbc330bc | % Imbed Zoom, Interp, and Info menu to view_nii window.
%
% Usage: view_nii_menu(fig);
%
% - Jimmy Shen (jimmy@rotman-baycrest.on.ca)
%
%--------------------------------------------------------------------
function menu_hdl = view_nii_menu(fig, varargin)
if isnumeric(fig)
menu_hdl = init(fig);
... |
github | sunhongfu/scripts-master | save_untouch_header_only.m | .m | scripts-master/cs-phase/_src/_nii/save_untouch_header_only.m | 2,203 | utf_8 | 6622b1835d5ad8ce504298473ab7684f | % This function is only used to save Analyze or NIfTI header that is
% ended with .hdr and loaded by load_untouch_header_only.m. If you
% have NIfTI file that is ended with .nii and you want to change its
% header only, you can use load_untouch_nii / save_untouch_nii pair.
%
% Usage: save_untouch_header_on... |
github | sunhongfu/scripts-master | pad_nii.m | .m | scripts-master/cs-phase/_src/_nii/pad_nii.m | 3,854 | utf_8 | a38d813f9f822362d873bc92725f565b | % PAD_NII: Pad the NIfTI volume from any of the 6 sides
%
% Usage: nii = pad_nii(nii, [option])
%
% Inputs:
%
% nii - NIfTI volume.
%
% option - struct instructing how many voxel to be padded from which side.
%
% option.pad_from_L = ( number of voxel )
% option.pad_from_R = ( number of voxel )
% option... |
github | sunhongfu/scripts-master | load_nii_hdr.m | .m | scripts-master/cs-phase/_src/_nii/load_nii_hdr.m | 10,311 | utf_8 | ef81f82b43da4fbd79a9de1787b5ae22 | % internal function
% - Jimmy Shen (jimmy@rotman-baycrest.on.ca)
function [hdr, filetype, fileprefix, machine] = load_nii_hdr(fileprefix)
if ~exist('fileprefix','var'),
error('Usage: [hdr, filetype, fileprefix, machine] = load_nii_hdr(filename)');
end
machine = 'ieee-le';
new_ext = 0;... |
github | sunhongfu/scripts-master | save_untouch_slice.m | .m | scripts-master/cs-phase/_src/_nii/save_untouch_slice.m | 20,263 | utf_8 | 833f175c0298d11697418454a03993db | % Save back to the original image with a portion of slices that was
% loaded by "load_untouch_nii". You can process those slices matrix
% in any way, as long as their dimension is not altered.
%
% Usage: save_untouch_slice(slice, filename, ...
% slice_idx, [img_idx], [dim5_idx], [dim6_idx], [dim7_idx])
%
% ... |
github | sunhongfu/scripts-master | load_nii_img.m | .m | scripts-master/cs-phase/_src/_nii/load_nii_img.m | 12,720 | utf_8 | 5670adb84a76f241bd221003bee8187d | % internal function
% - Jimmy Shen (jimmy@rotman-baycrest.on.ca)
function [img,hdr] = load_nii_img(hdr,filetype,fileprefix,machine,img_idx,dim5_idx,dim6_idx,dim7_idx,old_RGB)
if ~exist('hdr','var') | ~exist('filetype','var') | ~exist('fileprefix','var') | ~exist('machine','var')
error('Usage: [img,... |
github | sunhongfu/scripts-master | bresenham_line3d.m | .m | scripts-master/cs-phase/_src/_nii/bresenham_line3d.m | 4,682 | utf_8 | f2e52d1f3ac9779b22baf3bb4d2ac201 | % Generate X Y Z coordinates of a 3D Bresenham's line between
% two given points.
%
% A very useful application of this algorithm can be found in the
% implementation of Fischer's Bresenham interpolation method in my
% another program that can rotate three dimensional image volume
% with an affine matrix:
... |
github | sunhongfu/scripts-master | make_nii.m | .m | scripts-master/cs-phase/_src/_nii/make_nii.m | 7,105 | utf_8 | 6b1565392965b164217621e71d213ddd | % Make NIfTI structure specified by an N-D matrix. Usually, N is 3 for
% 3D matrix [x y z], or 4 for 4D matrix with time series [x y z t].
% Optional parameters can also be included, such as: voxel_size,
% origin, datatype, and description.
%
% Once the NIfTI structure is made, it can be saved into NIfT... |
github | sunhongfu/scripts-master | verify_nii_ext.m | .m | scripts-master/cs-phase/_src/_nii/verify_nii_ext.m | 1,721 | utf_8 | 0339aeb8d7286e4f08165c9eeeb4c2cd | % Verify NIFTI header extension to make sure that each extension section
% must be an integer multiple of 16 byte long that includes the first 8
% bytes of esize and ecode. If the length of extension section is not the
% above mentioned case, edata should be padded with all 0.
%
% Usage: [ext, esize_total] = ... |
github | sunhongfu/scripts-master | get_nii_frame.m | .m | scripts-master/cs-phase/_src/_nii/get_nii_frame.m | 4,497 | utf_8 | cc9b1b92f34e5ae67dc34c35a5174c75 | % Return time frame of a NIFTI dataset. Support both *.nii and
% *.hdr/*.img file extension. If file extension is not provided,
% *.hdr/*.img will be used as default.
%
% It is a lightweighted "load_nii_hdr", and is equivalent to
% hdr.dime.dim(5)
%
% Usage: [ total_scan ] = get_nii_frame(filename)
%
... |
github | sunhongfu/scripts-master | flip_lr.m | .m | scripts-master/cs-phase/_src/_nii/flip_lr.m | 3,568 | utf_8 | d95b62698d44a65a3c2f02fbabc632ac | % When you load any ANALYZE or NIfTI file with 'load_nii.m', and view
% it with 'view_nii.m', you may find that the image is L-R flipped.
% This is because of the confusion of radiological and neurological
% convention in the medical image before NIfTI format is adopted. You
% can find more details from:
%
%... |
github | sunhongfu/scripts-master | save_nii.m | .m | scripts-master/cs-phase/_src/_nii/save_nii.m | 9,690 | utf_8 | ed292054cab74afaf953455bfbc200aa | % Save NIFTI dataset. Support both *.nii and *.hdr/*.img file extension.
% If file extension is not provided, *.hdr/*.img will be used as default.
%
% Usage: save_nii(nii, filename, [old_RGB])
%
% nii.hdr - struct with NIFTI header fields (from load_nii.m or make_nii.m)
%
% nii.img - 3D (or 4D) matrix o... |
github | sunhongfu/scripts-master | rri_file_menu.m | .m | scripts-master/cs-phase/_src/_nii/rri_file_menu.m | 4,153 | utf_8 | c9faa3905c642854eeed98ab8b02998e | % Imbed a file menu to any figure. If file menu exist, it will append
% to the existing file menu. This file menu includes: Copy to clipboard,
% print, save, close etc.
%
% Usage: rri_file_menu(fig);
%
% rri_file_menu(fig,0) means no 'Close' menu.
%
% - Jimmy Shen (jimmy@rotman-baycrest.on.ca)
%
... |
github | sunhongfu/scripts-master | reslice_nii.m | .m | scripts-master/cs-phase/_src/_nii/reslice_nii.m | 10,138 | utf_8 | ea18d2f994fd5d9989449feaced1e4dd | % The basic application of the 'reslice_nii.m' program is to perform
% any 3D affine transform defined by a NIfTI format image.
%
% In addition, the 'reslice_nii.m' program can also be applied to
% generate an isotropic image from either a NIfTI format image or
% an ANALYZE format image.
%
% The resliced N... |
github | sunhongfu/scripts-master | save_untouch_nii.m | .m | scripts-master/cs-phase/_src/_nii/save_untouch_nii.m | 6,726 | utf_8 | cb98e2799abc112dca5b10078bde09bf | % Save NIFTI or ANALYZE dataset that is loaded by "load_untouch_nii.m".
% The output image format and file extension will be the same as the
% input one (NIFTI.nii, NIFTI.img or ANALYZE.img). Therefore, any file
% extension that you specified will be ignored.
%
% Usage: save_untouch_nii(nii, filename)
%
%... |
github | sunhongfu/scripts-master | view_nii.m | .m | scripts-master/cs-phase/_src/_nii/view_nii.m | 144,481 | utf_8 | 8ea68ec34d3a6bec721497afb56cfb54 | % VIEW_NII: Create or update a 3-View (Front, Top, Side) of the
% brain data that is specified by nii structure
%
% Usage: status = view_nii([h], nii, [option]) or
% status = view_nii(h, [option])
%
% Where, h is the figure on which the 3-View will be plotted;
% nii is the brain data in NIFTI format;
% o... |
github | sunhongfu/scripts-master | mat_into_hdr.m | .m | scripts-master/cs-phase/_src/_nii/mat_into_hdr.m | 2,691 | utf_8 | 847d96698f45f7c5e7decbb3a0c3187f | %MAT_INTO_HDR The old versions of SPM (any version before SPM5) store
% an affine matrix of the SPM Reoriented image into a matlab file
% (.mat extension). The file name of this SPM matlab file is the
% same as the SPM Reoriented image file (.img/.hdr extension).
%
% This program will convert the ANALYZE 7.5 SPM... |
github | sunhongfu/scripts-master | xform_nii.m | .m | scripts-master/cs-phase/_src/_nii/xform_nii.m | 18,628 | utf_8 | e39c421e7f117cbc81c56e9d023774a3 | % internal function
% 'xform_nii.m' is an internal function called by "load_nii.m", so
% you do not need run this program by yourself. It does simplified
% NIfTI sform/qform affine transform, and supports some of the
% affine transforms, including translation, reflection, and
% orthogonal rotation (N*90 ... |
github | sunhongfu/scripts-master | make_ana.m | .m | scripts-master/cs-phase/_src/_nii/make_ana.m | 5,665 | utf_8 | 37d574b277823f941138c9548127d720 | % Make ANALYZE 7.5 data structure specified by a 3D or 4D matrix.
% Optional parameters can also be included, such as: voxel_size,
% origin, datatype, and description.
%
% Once the ANALYZE structure is made, it can be saved into ANALYZE 7.5
% format data file using "save_untouch_nii" command (for more de... |
github | sunhongfu/scripts-master | extra_nii_hdr.m | .m | scripts-master/cs-phase/_src/_nii/extra_nii_hdr.m | 8,085 | utf_8 | 4f76a8a66736025a0acf3efa15a2d2aa | % Decode extra NIFTI header information into hdr.extra
%
% Usage: hdr = extra_nii_hdr(hdr)
%
% hdr can be obtained from load_nii_hdr
%
% NIFTI data format can be found on: http://nifti.nimh.nih.gov
%
% - Jimmy Shen (jimmy@rotman-baycrest.on.ca)
%
function hdr = extra_nii_hdr(hdr)
switch hdr.dime.da... |
github | sunhongfu/scripts-master | rri_xhair.m | .m | scripts-master/cs-phase/_src/_nii/rri_xhair.m | 2,300 | utf_8 | 95954b8cd43e01fba5c4b2f335be1780 | % rri_xhair: create a pair of full_cross_hair at point [x y] in
% axes h_ax, and return xhair struct
%
% Usage: xhair = rri_xhair([x y], xhair, h_ax);
%
% If omit xhair, rri_xhair will create a pair of xhair; otherwise,
% rri_xhair will update the xhair. If omit h_ax, current axes will
% b... |
github | sunhongfu/scripts-master | save_untouch_nii_hdr.m | .m | scripts-master/cs-phase/_src/_nii/save_untouch_nii_hdr.m | 8,721 | utf_8 | 0d396eaeebb6114f24d56ab74a8299cf | % internal function
% - Jimmy Shen (jimmy@rotman-baycrest.on.ca)
function save_nii_hdr(hdr, fid)
if ~isequal(hdr.hk.sizeof_hdr,348),
error('hdr.hk.sizeof_hdr must be 348.');
end
write_header(hdr, fid);
return; % save_nii_hdr
%------------------------------------------------... |
github | sunhongfu/scripts-master | expand_nii_scan.m | .m | scripts-master/cs-phase/_src/_nii/expand_nii_scan.m | 1,381 | utf_8 | 0715d668d046bcc608ea78cd0c2089bd | % Expand a multiple-scan NIFTI file into multiple single-scan NIFTI files
%
% Usage: expand_nii_scan(multi_scan_filename, [img_idx], [path_to_save])
%
% NIFTI data format can be found on: http://nifti.nimh.nih.gov
%
% - Jimmy Shen (jimmy@rotman-baycrest.on.ca)
%
function expand_nii_scan(filename, img_idx, n... |
github | sunhongfu/scripts-master | load_untouch_header_only.m | .m | scripts-master/cs-phase/_src/_nii/load_untouch_header_only.m | 7,255 | utf_8 | f1210f851ab6610e7656121194cb5c8b | % Load NIfTI / Analyze header without applying any appropriate affine
% geometric transform or voxel intensity scaling. It is equivalent to
% hdr field when using load_untouch_nii to load dataset. Support both
% *.nii and *.hdr file extension. If file extension is not provided,
% *.hdr will be used as default.... |
github | sunhongfu/scripts-master | bipolar.m | .m | scripts-master/cs-phase/_src/_nii/bipolar.m | 2,239 | utf_8 | c860ec93d96b6ab636c985280d79958d | %BIPOLAR returns an M-by-3 matrix containing a blue-red colormap, in
% in which red stands for positive, blue stands for negative,
% and white stands for 0.
%
% Usage: cmap = bipolar(M, lo, hi, contrast); or cmap = bipolar;
%
% cmap: output M-by-3 matrix for BIPOLAR colormap.
% M: number of shades in th... |
github | sunhongfu/scripts-master | save_nii_hdr.m | .m | scripts-master/cs-phase/_src/_nii/save_nii_hdr.m | 9,497 | utf_8 | 66a99df0cb0f3c1f44c6e36dcd13cddf | % internal function
% - Jimmy Shen (jimmy@rotman-baycrest.on.ca)
function save_nii_hdr(hdr, fid)
if ~exist('hdr','var') | ~exist('fid','var')
error('Usage: save_nii_hdr(hdr, fid)');
end
if ~isequal(hdr.hk.sizeof_hdr,348),
error('hdr.hk.sizeof_hdr must be 348.');
end
... |
github | sunhongfu/scripts-master | pocs.m | .m | scripts-master/cs-phase/_src/_PF/pocs.m | 32,075 | utf_8 | 7902088f7cb0a941557fee7fc7ec700d | function [im, kspFull] = pocs( ksp, iter, watchProgress )
%Partial-Fourier Reconstruction with POCS
%
% [im, kspFull] = pocs( kspIn, iter, watchProgr )
%
% === Input ===
%
% kspIn: Reduced Cartesian MRI Data-Set
% Any dimension may be reduced,
% but only one reduction dim. is... |
github | sunhongfu/scripts-master | grappa.m | .m | scripts-master/cs-phase/_src/_grappa/grappa.m | 2,384 | utf_8 | ed282c80f1a0002da0cc2c40499631bd | % grappa.m
% mchiew@fmrib.ox.ac.uk
%
% inputs:
% data - (nc, nx, ny, nz, m]) complex undersampled k-space data
% will also loop across extra dimension m
% calib - (nc, cx, cy, cz) complex calibration k-space data
% R - [Rx, Ry] or [Rx, Ry, Rz] ... |
github | sunhongfu/scripts-master | grappa_get_indices.m | .m | scripts-master/cs-phase/_src/_grappa/grappa_get_indices.m | 2,774 | utf_8 | 0692576896f6fc13f24d3be9e43c8002 | % grappa_get_indices.m
% mchiew@fmrib.ox.ac.uk
%
% inputs:
% kernel - [sx, sy, sz] kernel size in each dimension
% samp - (c, nx, ny, nz) sampling mask, true(size(calib))
% pad - [pad_x, pad_y, pad_z] size of padding in each direction
% type - (scalar, ... |
github | sunhongfu/scripts-master | Gsparse.m | .m | scripts-master/cs-phase/_src/_NUFFT/Gsparse.m | 7,162 | utf_8 | 313f033569655fb4925e3490b7ae7f5a | function ob = Gsparse(arg1, varargin)
%function ob = Gsparse(file.wtf | sparse | cell, options)
%
% Construct Gsparse object, either from a sparse matrix itself,
% or from the arguments that would be passed to matlab's sparse() command,
% or from an Aspire binary .wtf file.
%
% The purpose of this object is to overcom... |
github | sunhongfu/scripts-master | ifft_sym.m | .m | scripts-master/cs-phase/_src/_NUFFT/utilities/ifft_sym.m | 1,181 | utf_8 | 01ebf2f01e0379ebb2d3ae4792f996f7 | function y = ifft_sym(varargin)
%function y = ifft_sym(varargin)
% matlab 7.0 introduced a 'symmetric' option to ifft to handle
% spectra that are (circularly) hermitian symmetric (real signal).
% this glue routine is to provide backward compatibility for matlab 6.5.
% Caution: v7 ifft with 'symmetric' just uses the f... |
github | sunhongfu/scripts-master | jf_protected_names.m | .m | scripts-master/cs-phase/_src/_NUFFT/utilities/jf_protected_names.m | 2,298 | utf_8 | 9430f87fc9730771e794a957c0e20697 | function pn = jf_protected_names
%|function pn = jf_protected_names
%|
%| A serious drawback of the matlab language is that it lacks
%| a protected or local namespace. Every m-file that is in the path
%| is available to all functions (except those in "private" subdirectories).
%| Users who have their own m-files tha... |
github | sunhongfu/scripts-master | os_run.m | .m | scripts-master/cs-phase/_src/_NUFFT/utilities/os_run.m | 496 | utf_8 | b86b9948f9e383a3f5f8d047d0ec9ae0 | function out = os_run(str)
%|function out = os_run(str)
%| call OS (unix only of course), check for error, optionally return output
if nargin < 1, help(mfilename), error(mfilename), end
if streq(str, 'test'), os_run_test, return, end
[s out1] = unix(str);
if s
fail('unix call failed:\n%s', str)
end
if nargout
ou... |
github | sunhongfu/scripts-master | interp1_jump.m | .m | scripts-master/cs-phase/_src/_NUFFT/utilities/interp1_jump.m | 2,280 | utf_8 | b183193c9190a72ea28565ea8def6dba | function yi = interp1_jump(xj, yj, xi, varargin)
%function yi = interp1_jump(xj, yj, xi, {arguments for interp1})
% Generalization of matlab's "interp1" to allow xj with repeated values,
% for interpolation of a function that has "jumps" (discontinuities),
% such as is caused by k-edges for mass attenuation coefficien... |
github | sunhongfu/scripts-master | jf_histn.m | .m | scripts-master/cs-phase/_src/_NUFFT/utilities/jf_histn.m | 2,106 | utf_8 | 8a5e6756705f9e4c239f592b17967eed | function [hist center] = jf_histn(data, varargin)
%|function [hist center] = jf_histn(data, varargin)
%|
%| Fast histogram of multidimensional data for equally-spaced bins.
%| todo: use accumarray?
%|
%| in
%| data [N M] data values to be binned (M-dimensional)
%|
%| option
%| 'min' [M] minimum bin values for each di... |
github | sunhongfu/scripts-master | jf_assert.m | .m | scripts-master/cs-phase/_src/_NUFFT/utilities/jf_assert.m | 871 | utf_8 | 444b53c5605424b42508cd26fa0da635 | function jf_assert(varargin)
%function jf_assert(command)
% verify that the command (evaluated within caller) returns true.
% if not, print error message.
if nargin < 1, help(mfilename), error(mfilename), end
if nargin == 1 && streq(varargin{1}, 'test'), jf_assert_test, return, end
arg = [varargin{:}]; % handle case... |
github | sunhongfu/scripts-master | gaussian_kernel.m | .m | scripts-master/cs-phase/_src/_NUFFT/utilities/gaussian_kernel.m | 760 | utf_8 | 119655fccf91567673b1e3739af2b637 | function kern = gaussian_kernel(fwhm, nk_half)
%function kern = gaussian_kernel(fwhm, nk_half)
% samples of a gaussian kernel at [-nk_half:nk_half]
% with given FWHM in pixels
% uses integral over each sample bin so that sum is very close to unity
%
% Copyright 2001-9-18, Jeff Fessler, The University of Michigan
if n... |
github | sunhongfu/scripts-master | fwhm_match.m | .m | scripts-master/cs-phase/_src/_NUFFT/utilities/fwhm_match.m | 1,878 | utf_8 | 8ae6568a77739be15c5ac4afea48b4d8 | function [fwhm_best, costs, im_best] = ...
fwhm_match(true_image, blurred_image, fwhms)
%|function [fwhm_best, costs, im_best] = ...
%| fwhm_match(true_image, blurred_image, fwhms)
%|
%| given a blurred_image of a true_image, find the FHWM of a Gaussian kernel
%| that, when convolved to the true_image, yields the sm... |
github | sunhongfu/scripts-master | fractional_delay.m | .m | scripts-master/cs-phase/_src/_NUFFT/utilities/fractional_delay.m | 2,438 | utf_8 | 09fad587ef6cfbb84e8a06617919b92f | function y = fractional_delay(x, delay)
%function y = fractional_delay(x, delay)
%
% given N samples x[n] of a real, periodic, band-limited signal x(t),
% compute sinc interpolated samples of delayed signal y(t) = x(t - delay)
% each column of x can be shifted by a different amount if delay is a vector.
% in
% x [N,L]... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.