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 | hangong/deshadow-master | bdspln.m | .m | deshadow-master/bdspln.m | 1,777 | utf_8 | c68d0751921e8efabf4604344a7896c5 | function bl = bdspln(ffu,smsk,bd,gsc)
%BDSPLN provides the two ends of each sampling line
%
% Copyright Han Gong 2014
bdp = bd.p(:,~bd.t); bdn = bd.n(:,~bd.t);
llen = size(bdp,2); % length of selected boundary points
imhw = size(ffu); % size of image
bl.s = zeros(2,llen); bl.e = zeros(2,llen); % shadow bound... |
github | hangong/deshadow-master | resize.m | .m | deshadow-master/resize.m | 3,234 | utf_8 | df0d9d7019288b82ed9fbe2611643c4d | function x = resize(x,newsiz)
%RESIZE Resize any arrays and images.
% Y = RESIZE(X,NEWSIZE) resizes input array X using a DCT (discrete
% cosine transform) method. X can be any array of any size. Output Y is
% of size NEWSIZE.
%
% Input and output formats: Y has the same class as X.
%
% Note:
% ... |
github | hangong/deshadow-master | LineCurvature2D.m | .m | deshadow-master/LineCurvature2D.m | 4,176 | utf_8 | 89ee0a2a99bea815784b23a07aaed325 | function k=LineCurvature2D(Vertices,Lines)
% This function calculates the curvature of a 2D line. It first fits
% polygons to the points. Then calculates the analytical curvature from
% the polygons;
%
% k = LineCurvature2D(Vertices,Lines)
%
% inputs,
% Vertices : A M x 2 list of line points.
% (optiona... |
github | hangong/deshadow-master | dbscan.m | .m | deshadow-master/dbscan.m | 4,458 | utf_8 | a8b7170e3d9287e4a362fec7bfb4486f |
% -------------------------------------------------------------------------
% Function: [class,type]=dbscan(x,k,Eps)
% -------------------------------------------------------------------------
% Aim:
% Clustering the data with Density-Based Scan Algorithm with Noise (DBSCAN)
% ----------------------------------... |
github | hangong/deshadow-master | bFilter.m | .m | deshadow-master/bFilter.m | 6,447 | utf_8 | 8ccb35e8dbf4ef95d1777b1bb91083bc | %
% output = bFilter( data, edge, ...
% edgeMin, edgeMax, ...
% sigmaSpatial, sigmaRange, ...
% samplingSpatial, samplingRange )
%
% Bilateral and Cross-Bilateral Filter using the Bilateral Grid.
%
% Bilaterally filters the image 'data' using th... |
github | rozsasarpi/Code-calibration-Belarus-master | simple_gfun.m | .m | Code-calibration-Belarus-master/Matlab/simple_gfun.m | 126 | utf_8 | 0906498c6bb0346be690861e14908ec4 | % Simple, minimal limit state function
function g = simple_gfun(Q, C_Q, G, K_E, R, K_R)
g = K_R.*R - K_E.*(G + C_Q.*Q);
end |
github | rozsasarpi/Code-calibration-Belarus-master | plot_reli_vs_loadratio.m | .m | Code-calibration-Belarus-master/Matlab/plot_reli_vs_loadratio.m | 4,918 | utf_8 | a006cebbf3effe73e794274a297c88f6 | % Plot reliabiliy index against load ratio for the calibrated model
%
%SYNOPSYS
% PLOT_RELI_VS_LOADRATIO(Model, Results)
%
%INPUT
%
%OPTIONAL
% group_by 'limit_state', 'lead_action', '
%
%
function plot_reli_vs_loadratio(Model, Results, group_by) % I miss you ggplot2 ;(
if nargin < 3
group_by = 'limit_state'... |
github | rozsasarpi/Code-calibration-Belarus-master | prob_model.m | .m | Code-calibration-Belarus-master/Matlab/prob_model.m | 5,053 | utf_8 | 71874892cd3541e7b8a94b26a2b3e3ad | % Prepare probabilistic model & establish connection between representative fractiles and random variables
%
% SYNOPSYS
% Probvar = PROB_MODEL(kk,jj,ii, Model)
%
%
%
% distribution types (following FERUM):
% 1 Normal
% 2 Lognormal
% 11 Gumbel
function Probvar = prob_model(kk,jj,ii, Model)
lead_action = Mod... |
github | rozsasarpi/Code-calibration-Belarus-master | goodness_measure.m | .m | Code-calibration-Belarus-master/Matlab/goodness_measure.m | 1,108 | utf_8 | 06200d88ded28223b7073a3a41ad1da6 | % Calculates various goodness measures for calibrated partial factors
%
%SYNOPSYS
% GOODNESS_MEASURE(Model, Results)
%
% Model and Results are required as inputs although only these are used:
% - beta_target
% - objective_function
% - beta
% - weights
%
% Filtered & selected Results is expected
%
%
function goodness_m... |
github | rozsasarpi/Code-calibration-Belarus-master | plot_rRk_vs_loadratio.m | .m | Code-calibration-Belarus-master/Matlab/plot_rRk_vs_loadratio.m | 2,975 | utf_8 | 373f63eb876fd4c92a7c7f95d96fe2d2 | % Plot ratio of required characteristic resistance against load ratio for the calibrated models
%
%SYNOPSYS
% PLOT_RRK_VS_LOADRATIO(Model1, Results1, Model2, Results2)
%
%INPUT
%
%
% (R_k2 - R_k1)./R_k1
% assuming that basic inputs, dimensions are the same in Model1 and Model2
function plot_rRk_vs_loadratio(Model, Re... |
github | rozsasarpi/Code-calibration-Belarus-master | calibrate.m | .m | Code-calibration-Belarus-master/Matlab/calibrate.m | 8,485 | utf_8 | f9bf7ac93afc37f1310eb8842ff8835a | % Reliability-based calibration of partial factors
%
% Results = CALIBRATE(Model, partial_f)
%
% partial_f if given, only the objective function is evaluated, no calibration performed
% this useful if multiple solutions are obtained and we would like to have all beta values or other paremeters for... |
github | rozsasarpi/Code-calibration-Belarus-master | pf_design.m | .m | Code-calibration-Belarus-master/Matlab/pf_design.m | 1,732 | utf_8 | 40c054c4c28b0399e78260cd55741f93 | % Partial factor based design to get the mean resistance
%
% simple: EC0, Eq. (6.10)
% advanced: EC0, Eq. (6.10a) (6.10b)
%
%
function Probvar = pf_design(Probvar, Design)
G_k = Probvar.G.char;
Q_k = Probvar.Q.char;
C_Q_k = Probvar.C_Q.char;
% % K_E_k = Probvar.K_E.char;
% % K_R_k ... |
github | rozsasarpi/Code-calibration-Belarus-master | select_Results.m | .m | Code-calibration-Belarus-master/Matlab/select_Results.m | 1,015 | utf_8 | 91d198397b8f99ec4a15dd712371a165 | % Postprocess Results: select a particular solution, filter unrealistic results
%
% select gamma (pf_idx_th partial factor!) closest to pf!
%
% Results = SELECT_RESULTS(Model, Results, pf_idx, pf)
%
function [Results, PF] = select_Results(Model, Results, pf_idx, pf)
if nargin < 4
pf = 1.5;
end
% Get one specific... |
github | rozsasarpi/Code-calibration-Belarus-master | model_check.m | .m | Code-calibration-Belarus-master/Matlab/model_check.m | 2,198 | utf_8 | 1612cf8ae594f997aed1197b6c5bf260 | % Some basic checks of Model
%
%SYNOPSYS
% Model = MODEL_CHECK(Model)
%
function Model = model_check(Model)
%==========================================================================
% INITIALIZATION
%==========================================================================
gamma_Q_type = Model.gamma_Q_type;
gam... |
github | rozsasarpi/Code-calibration-Belarus-master | filter_Results.m | .m | Code-calibration-Belarus-master/Matlab/filter_Results.m | 798 | utf_8 | 95142b819ed96c3df30efe1c7fc0b7d6 | % Postprocess Results: filter unrealistic results
%
function Results = filter_Results(Results)
% Get one specific element from multiple solutions
if ~isfield(Results,'manymins')
warning('No multiple solutions are available in Results structure!')
else
manymins = Results.manymins;
O_val = cell2m... |
github | rozsasarpi/Code-calibration-Belarus-master | plot_reli_comparison.m | .m | Code-calibration-Belarus-master/Matlab/plot_reli_comparison.m | 2,592 | utf_8 | 8ee1ac2128f1c05bf524dc157a623a0b | % Plot reliabiliy index against load ratio for the different models
%
%SYNOPSYS
%
%
%INPUT
%
%OPTIONAL
%
%WARNING - it is way too particular
%
function plot_reli_comparison(Model, Results_cell) % I miss you ggplot2 ;(
%--------------------------------------------------------------------------
% PRE-PROCESS
%---------... |
github | rozsasarpi/Code-calibration-Belarus-master | plot_multisolu_gamma.m | .m | Code-calibration-Belarus-master/Matlab/plot_multisolu_gamma.m | 4,435 | utf_8 | 8fdd96c9a8f55e3d5207f683a489ef88 | % Plot partial factors of multiple calibrated models (multiple optimum points)
%
%SYNOPSYS
% PLOT_MULTISOLU_GAMMA(Model, Results)
%
function plot_multisolu_gamma(Model, Results, pf, pf_idx)
% close all
if nargin < 4
pf_idx = 1;
end
if nargin < 3
pf = 1.5;
end
%
% pf = 1.5;
% % pf = 2.0;
% p... |
github | rozsasarpi/Code-calibration-Belarus-master | model_spec.m | .m | Code-calibration-Belarus-master/Matlab/model_spec.m | 9,336 | utf_8 | 1b9f31c17c5131fed7c46e2c72a26a56 | % Model specification for code calibration
%
%SYNOPSYS
% Model = MODEL_SPEC(Model)
%
% The basic element of model representation is a 3D array.
%
% Structuring of main arrays:
% dim1 (height) load ratio, E_by_G
% dim2 (width) limit state, [LS1, LS2, ...] format
% dim3 (depth) lead action, [snow, imposed, ... |
github | rozsasarpi/Code-calibration-Belarus-master | reli_analysis.m | .m | Code-calibration-Belarus-master/Matlab/interval_analysis/reli_analysis.m | 4,415 | utf_8 | ee6b080cf407c49107318d60009da2de | % Reliability analysis for interval analysis
%
%SYNOPSYS
% [b_int, b_calibr] = RELI_ANALYSIS(x, Model, partial_f, lead_action_idx, limit_state_idx, load_ratio_idx)
%
%
% Assumes that all bias factors are 1.0!!
%
% simple_gfun(Q, C_Q, G, K_E, R, K_R)
% WARNING!
% x(1:2) Q (k2m, cov)
% x(3:4) G (k2m, c... |
github | rozsasarpi/Code-calibration-Belarus-master | reli_analysis2.m | .m | Code-calibration-Belarus-master/Matlab/interval_analysis/reli_analysis2.m | 4,721 | utf_8 | cf42128b64cfefcb9968dc01f04a2b28 | % Reliability analysis for interval analysis
%
%SYNOPSYS
% b = RELI_ANALYSIS2(x, Model, Probvar, partial_f, lead_action_idx, limit_state_idx, load_ratio_idx)
%
%
% Assumes that all bias factors are 1.0!!
%
% simple_gfun(Q, C_Q, G, K_E, R, K_R)
% WARNING!
% x(1) Q (cov) + 98% rule
% x(2) G (cov) +... |
github | hossein1387/MachineLearning-master | submit.m | .m | MachineLearning-master/machine-learning-ex2/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 | hossein1387/MachineLearning-master | submitWithConfiguration.m | .m | MachineLearning-master/machine-learning-ex2/ex2/lib/submitWithConfiguration.m | 3,734 | utf_8 | 84d9a81848f6d00a7aff4f79bdbb6049 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | hossein1387/MachineLearning-master | savejson.m | .m | MachineLearning-master/machine-learning-ex2/ex2/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 | hossein1387/MachineLearning-master | loadjson.m | .m | MachineLearning-master/machine-learning-ex2/ex2/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | hossein1387/MachineLearning-master | loadubjson.m | .m | MachineLearning-master/machine-learning-ex2/ex2/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 | hossein1387/MachineLearning-master | saveubjson.m | .m | MachineLearning-master/machine-learning-ex2/ex2/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 | hossein1387/MachineLearning-master | submit.m | .m | MachineLearning-master/machine-learning-ex4/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 | hossein1387/MachineLearning-master | submitWithConfiguration.m | .m | MachineLearning-master/machine-learning-ex4/ex4/lib/submitWithConfiguration.m | 3,734 | utf_8 | 84d9a81848f6d00a7aff4f79bdbb6049 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | hossein1387/MachineLearning-master | savejson.m | .m | MachineLearning-master/machine-learning-ex4/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 | hossein1387/MachineLearning-master | loadjson.m | .m | MachineLearning-master/machine-learning-ex4/ex4/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | hossein1387/MachineLearning-master | loadubjson.m | .m | MachineLearning-master/machine-learning-ex4/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 | hossein1387/MachineLearning-master | saveubjson.m | .m | MachineLearning-master/machine-learning-ex4/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 | hossein1387/MachineLearning-master | submit.m | .m | MachineLearning-master/machine-learning-ex6/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 | hossein1387/MachineLearning-master | porterStemmer.m | .m | MachineLearning-master/machine-learning-ex6/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 | hossein1387/MachineLearning-master | submitWithConfiguration.m | .m | MachineLearning-master/machine-learning-ex6/ex6/lib/submitWithConfiguration.m | 3,734 | utf_8 | 84d9a81848f6d00a7aff4f79bdbb6049 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | hossein1387/MachineLearning-master | savejson.m | .m | MachineLearning-master/machine-learning-ex6/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 | hossein1387/MachineLearning-master | loadjson.m | .m | MachineLearning-master/machine-learning-ex6/ex6/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | hossein1387/MachineLearning-master | loadubjson.m | .m | MachineLearning-master/machine-learning-ex6/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 | hossein1387/MachineLearning-master | saveubjson.m | .m | MachineLearning-master/machine-learning-ex6/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 | hossein1387/MachineLearning-master | submit.m | .m | MachineLearning-master/machine-learning-ex7/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 | hossein1387/MachineLearning-master | submitWithConfiguration.m | .m | MachineLearning-master/machine-learning-ex7/ex7/lib/submitWithConfiguration.m | 3,734 | utf_8 | 84d9a81848f6d00a7aff4f79bdbb6049 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | hossein1387/MachineLearning-master | savejson.m | .m | MachineLearning-master/machine-learning-ex7/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 | hossein1387/MachineLearning-master | loadjson.m | .m | MachineLearning-master/machine-learning-ex7/ex7/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | hossein1387/MachineLearning-master | loadubjson.m | .m | MachineLearning-master/machine-learning-ex7/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 | hossein1387/MachineLearning-master | saveubjson.m | .m | MachineLearning-master/machine-learning-ex7/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 | hossein1387/MachineLearning-master | submit.m | .m | MachineLearning-master/machine-learning-ex5/ex5/submit.m | 1,765 | utf_8 | b1804fe5854d9744dca981d250eda251 | function submit()
addpath('./lib');
conf.assignmentSlug = 'regularized-linear-regression-and-bias-variance';
conf.itemName = 'Regularized Linear Regression and Bias/Variance';
conf.partArrays = { ...
{ ...
'1', ...
{ 'linearRegCostFunction.m' }, ...
'Regularized Linear Regression Cost Fun... |
github | hossein1387/MachineLearning-master | submitWithConfiguration.m | .m | MachineLearning-master/machine-learning-ex5/ex5/lib/submitWithConfiguration.m | 3,734 | utf_8 | 84d9a81848f6d00a7aff4f79bdbb6049 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | hossein1387/MachineLearning-master | savejson.m | .m | MachineLearning-master/machine-learning-ex5/ex5/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | hossein1387/MachineLearning-master | loadjson.m | .m | MachineLearning-master/machine-learning-ex5/ex5/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | hossein1387/MachineLearning-master | loadubjson.m | .m | MachineLearning-master/machine-learning-ex5/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 | hossein1387/MachineLearning-master | saveubjson.m | .m | MachineLearning-master/machine-learning-ex5/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 | hossein1387/MachineLearning-master | submit.m | .m | MachineLearning-master/machine-learning-ex3/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 | hossein1387/MachineLearning-master | submitWithConfiguration.m | .m | MachineLearning-master/machine-learning-ex3/ex3/lib/submitWithConfiguration.m | 3,734 | utf_8 | 84d9a81848f6d00a7aff4f79bdbb6049 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | hossein1387/MachineLearning-master | savejson.m | .m | MachineLearning-master/machine-learning-ex3/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 | hossein1387/MachineLearning-master | loadjson.m | .m | MachineLearning-master/machine-learning-ex3/ex3/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | hossein1387/MachineLearning-master | loadubjson.m | .m | MachineLearning-master/machine-learning-ex3/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 | hossein1387/MachineLearning-master | saveubjson.m | .m | MachineLearning-master/machine-learning-ex3/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 | hossein1387/MachineLearning-master | submit.m | .m | MachineLearning-master/machine-learning-ex8/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 | hossein1387/MachineLearning-master | submitWithConfiguration.m | .m | MachineLearning-master/machine-learning-ex8/ex8/lib/submitWithConfiguration.m | 3,734 | utf_8 | 84d9a81848f6d00a7aff4f79bdbb6049 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | hossein1387/MachineLearning-master | savejson.m | .m | MachineLearning-master/machine-learning-ex8/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 | hossein1387/MachineLearning-master | loadjson.m | .m | MachineLearning-master/machine-learning-ex8/ex8/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | hossein1387/MachineLearning-master | loadubjson.m | .m | MachineLearning-master/machine-learning-ex8/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 | hossein1387/MachineLearning-master | saveubjson.m | .m | MachineLearning-master/machine-learning-ex8/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 | hossein1387/MachineLearning-master | submit.m | .m | MachineLearning-master/machine-learning-ex1/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 | hossein1387/MachineLearning-master | submitWithConfiguration.m | .m | MachineLearning-master/machine-learning-ex1/ex1/lib/submitWithConfiguration.m | 3,734 | utf_8 | 84d9a81848f6d00a7aff4f79bdbb6049 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | hossein1387/MachineLearning-master | savejson.m | .m | MachineLearning-master/machine-learning-ex1/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 | hossein1387/MachineLearning-master | loadjson.m | .m | MachineLearning-master/machine-learning-ex1/ex1/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | hossein1387/MachineLearning-master | loadubjson.m | .m | MachineLearning-master/machine-learning-ex1/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 | hossein1387/MachineLearning-master | saveubjson.m | .m | MachineLearning-master/machine-learning-ex1/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 | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_factorx1423.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_factorx1423.m | 217 | utf_8 | 96d344b8de9cdcb890a52eb7cae929e6 | % A tool which tries to utilise the sigma relations
function X=tool_factorx1423(A)
syms x12 x34 x13 x24 x14 x23
B=A;
B=subs(B,x14*x23,x12*x34);
B=subs(B,x12*x34,x13*x24);
B=subs(B,x13*x24,x14*x23);
X=simplify(B);
end
|
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_join.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_join.m | 321 | utf_8 | 1d84d1401f11f9fe87c92f4bdc9fe6e1 | % Uses the meet tool to work out the join. This is possible since points
% and lines are row and column vectors respectfully
function A=tool_join(a1,a2,a3,a4)
if nargin < 3
A=tool_meet(a1.',a2.').';
elseif nargin < 4
A=tool_meet(a1.',a2.',a3.').';
elseif nargin < 5
A=tool_meet(a1.',a2.',a3.',a4.').';
end
en... |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_finverse.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_finverse.m | 167 | utf_8 | 92f29eeff0d3c521244a6291ad8017e8 | % finite field inverse for finite field example
function a=tool_finverse(b,m)
a=0;
for i=1:m
c=mod(b*i,m);
if c==1
a=i;
return
end
end
|
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_quadrancee.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_quadrancee.m | 176 | utf_8 | 9add7e2f5fd5a097ce2c1ddbf0c0b4ab | % Quadrance(e) works out the quadrance between two points for examples
function x=tool_quadrancee(a1,a2,A)
x=1-tool_dote(a1,a2,A)^2/(tool_dote(a1,a1,A)*tool_dote(a2,a2,A));
end |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_spread.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_spread.m | 102 | utf_8 | f3677b5a8a312bd333cfb6b869b2110b | % Spread finds the spread between two lines
function x=tool_spread(L1,L2,A)
x=tool_quadrance(L1,L2,A); |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_dot.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_dot.m | 410 | utf_8 | 264ff6efc64c4c968835d1c727122605 | % Dot works out the generalised dot product between two points of two lines
function a=tool_dot(a1,a2,A)
b1=size(a1);
b2=size(a2);
a=0;
if b1(1,1)==1 && b2(1,1)==1
x=factor(a1*A*a2.');
a=1;
for i=1:length(x)
a=a*x(1,i);
end
elseif b1(1,2)==1 && b2(1,2)==1
A1=tool_dual(a1,A);A2=tool_dual(a2,A... |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_midpointe.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_midpointe.m | 578 | utf_8 | 71b2f3ca14234e4535782b73f770808e | % Midpoint(e) works out the midpoints of a side by normalising their
% representation vectors. Used for examples
function [m1,m2,M1,M2]=tool_midpointe(a1,a2,A)
x=sym('x','positive');
l1=tool_dote(x*a1,x*a1,A);
l2=tool_dote(a2,a2,A);
x=solve(l1==l2,x);
if size(x)==1
y=x;
else
y=x(1);
end
m1=simplify((y*a1+a2));... |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_duale.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_duale.m | 218 | utf_8 | 738d794c5b895f356f42d79f4bf2a442 | % Dual(e) works out the dual of a point or line and in used in the
% example.m files.
function A1=tool_duale(a1,A)
b1=size(a1);
if b1(1,1)==1
A1=(A*a1.');
elseif b1(1,2)==1
B=-det(A)/A;
A1=(a1.'*B);
end
end |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_meet.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_meet.m | 1,061 | utf_8 | 2c4bca37ffc679378e9372a9aac89a45 | % This is a meet tool that calls the meets tool which is essentially the
% cross product
function x=tool_meet(A1,A2,A3,A4)
I=eye(3);
I1=A1.'*I*A1;
I2=A2.'*I*A2;
if I1==0 || I2==0
x=[0 0 0];
display('empty input')
return
end
% Works out the number of arguements
if nargin <3
x=tool_simplex(tool_meets(A1,... |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_notin.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_notin.m | 158 | utf_8 | 1d874b14fc5014e1eb99e9a15c16c953 | % Notin checks that a vector does not have a specific entry
function a=tool_notin(x,I)
n=length(I);
a=1;
for i=1:n
if x==I(i)
a=0;
end
end
end |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_biline.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_biline.m | 581 | utf_8 | 1348f441d437d23892e9f9c7ea8b360b | % The Biline tool works out the bilines and bipoint for a vertex. It is
% exactly the same procedure as the midpoint tool.
function [B1,B2,b1,b2]=tool_biline(A1,A2,A)
x=sym('x','positive');
l1=tool_dot(x*a1,x*a1,A);
l2=tool_dot(a2,a2,A);
x=solve(l1==l2,x);
if size(x)==1
y=x;
else
y=x(1);
end
B1=simplify((y*a1+... |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_dual.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_dual.m | 193 | utf_8 | 57b00964dce22cf28a5ab78a6eb1edf3 | % Dual workds out the the dual of a point or line
function A1=tool_dual(a1,A)
b1=size(a1);
if b1(1,1)==1
A1=simplify(A*a1.');
elseif b1(1,2)==1
B=-det(A)/A;
A1=simplify(a1.'*B);
end |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_quadrances.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_quadrances.m | 163 | utf_8 | a2c42a707dbb287323995e49263a3886 | % Quadrance(s) is for actual values, not just symmbolic ones
function x=tool_quadrances(a1,a2,A)
x=1-tool_dot(a1,a2,A)^2/(tool_dot(a1,a1,A)*tool_dot(a2,a2,A));
end |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_diagonalpoint.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_diagonalpoint.m | 356 | utf_8 | b2e4737415f1af82f06f1dc1818cc400 | % Diagonal point works out the diagonal points of a quadrangle
function [d1,d2,d3]=tool_diagonalpoint(a1,a2,a3,a4)
% lines of quadrangle
L12=tool_join(a1,a2);L23=tool_join(a2,a3);L13=tool_join(a1,a3);
L14=tool_join(a1,a4);L24=tool_join(a2,a4);L34=tool_join(a3,a4);
% diagonal triangle
d1=tool_meet(L12,L34)
d2=tool_... |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_meete.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_meete.m | 735 | utf_8 | b81d927e73ab64629df625fb1a462a8e | % This is a meete tool that calls the meets tool which is essentially the
% cross product
% Which is the meet tool by for examples
function a=tool_meete(A1,A2,A3,A4)
% Works out the number of arguements
if nargin <3
x=(tool_meets(A1,A2));
% Two arguements
elseif nargin <4
x=(tool_meets(A1,A2));
I=tool_incid... |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_quadrance.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_quadrance.m | 131 | utf_8 | cec875c74e5e16c5f7c433b25a79c90d | % Quadrance works out the quadrance between two points
function x=tool_quadrance(a1,a2,A)
x=simplify(tool_quadrances(a1,a2,A));
end |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_simplex.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_simplex.m | 858 | utf_8 | 4ecf70122c24808961830f1c21fdef63 | % Simplex exploits the projective property of vectors by dividing by a
% common factor of each entry.
function x=tool_simplex(a)
% expand the entries of a into there factors
a1=factor((a(1)));
a2=factor((a(2)));
a3=factor((a(3)));
%checks for an empty point
if length(a1)==1 && length(a2)==1 && length(a3)==1
if a1==... |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_factorx1324.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_factorx1324.m | 216 | utf_8 | cf31cfc8c775aad1987285b986c09539 | % A tool which tries to utilise the sigma relations
function X=tool_factorx1324(A)
syms x12 x34 x13 x24 x14 x23
B=A;
B=subs(B,x13*x24,x14*x23);
B=subs(B,x14*x23,x12*x34);
B=subs(B,x12*x34,x13*x24);
X=simplify(B);
end |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_duals.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_duals.m | 222 | utf_8 | d89e478effcaacde30ef7762da1b4960 | % Dual(s) works out the dual of a point or line for actual values, not just
% symmbolic ones.
function A1=tool_duals(a1,A)
b1=size(a1);
if b1(1,1)==1
A1=(A*a1.');
elseif b1(1,2)==1
B=-det(A)/A;
A1=(a1.'*B);
end |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_diagonalpoints.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_diagonalpoints.m | 427 | utf_8 | f9df48966cf8dcebe30c4e29f30095b7 | % Diagonal point(s) works out the diagonal points for a quadrangle with
% actual values as points, and not symmbolic values.
function [d1,d2,d3]=tool_diagonalpoints(a1,a2,a3,a4)
% lines of quadrangle
L12=tool_joins(a1,a2);L23=tool_joins(a2,a3);L13=tool_joins(a1,a3);
L14=tool_joins(a1,a4);L24=tool_joins(a2,a4);L34=too... |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_midpoint.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_midpoint.m | 552 | utf_8 | 455e59b45109ebf3b2fb8f2fdf7106a6 | % Midpoint works out the midpoints of a side by normalising their
% representation vectors.
function [m1,m2,M1,M2]=tool_midpoint(a1,a2,A)
x=sym('x','positive');
l1=tool_dot(x*a1,x*a1,A);
l2=tool_dot(a2,a2,A);
x=solve(l1==l2,x);
if size(x)==1
y=x;
else
y=x(1);
end
m1=simplify((y*a1+a2));m2=simplify((y*a1-a2));
... |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_incidente.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_incidente.m | 100 | utf_8 | 8711113977e642fef3867f94095f0d7c | % incident tool for examples
function I=tool_incidente(a,L)
I=0;
X=a*L;
if X<10^-14
I=1;
end
end |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_quadrancef.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_quadrancef.m | 190 | utf_8 | b19862a077edd154cdf4cdf26f307a89 | % Quadrance(f) works out quadrance for finite fields
function x=tool_quadrancef(a1,a2,A)
x=1-tool_dote(a1,a2,A)^2*tool_finverse(tool_dote(a1,a1,A),7)*tool_finverse(tool_dote(a2,a2,A),7);
end |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_checkzero.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_checkzero.m | 493 | utf_8 | 87b1ed66ef7c7badac5efbe05b5a784a | % The Checkzero tool use the sigma relations to work out if a number is
% equal to zero.
function a=tool_checkzero(I)
I=factor(I);I=tool_factorx1234(simplify(expand(I)));
x=length(I);
syms x12 x34 x13 x24 x14 x23;
a=0;
for i=1:x
b=I(1,i);
if b==0
a=1;
return
elseif b==x14*x23-x13*x24||b==x14... |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_common.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_common.m | 434 | utf_8 | 3d3e3a1d73a789c1e803ab8b1aed6661 | % Common tool finds the common factors for two enteries.
function I=tool_common(x1,x2)
I1=x1;
I2=x2;
if x2==0
I=x1;
return
end
syms y;
n1=length(I1);n2=length(I2);
n=max(n1,n2);I=ones(1,n)*y;
k=0;
for i=1:n1
for j=1:n2
if abs(I1(i))==abs(I2(j))
if tool_notin(I1(i),I)
k=k+... |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_dote.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_dote.m | 362 | utf_8 | 060a6bc639bbf51f0af6eb974b575d01 | % Dot(e) works out the dot product for actual valued points and lines not
% just symmbolic ones. The e is for example and is used in the example .m
% files.
function a=tool_dote(a1,a2,A)
b1=size(a1);
b2=size(a2);
a=0;
if b1(1,1)==1 && b2(1,1)==1
a=(a1*A*a2.');
elseif b1(1,2)==1 && b2(1,2)==1
A1=tool_dual(a1,A);... |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_incident.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_incident.m | 270 | utf_8 | dd814e7a931c6275587898ea2c7c2e01 | % Incident checks if a point and line are incident
function x=tool_incident(a,L)
l=size(a);
if l(1)==1
X=a*L;
else
X=L*a;
end
for i=1:3
X=tool_factorx1234(X);
I=tool_checkzero(X);
if I
x=1;
return
else
x=0;
end
end
end |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_joins.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_joins.m | 231 | utf_8 | 2db76554b0e45adae61cc02601e20059 | % Uses the meet tool to work out the join. This is possible since points
% and lines are row and column vectors respectfully
% for actual valued vectors not symmbolic ones
function a=tool_joins(a1,a2)
a=tool_meets(a1.',a2.').';
end |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_isequal.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_isequal.m | 276 | utf_8 | 4de457cbfa1a97cb7cbe23cc720fb71f | % checks if two projective vectors are equal by checking if they have a
% common ratio.
function a=tool_isequal(x,y)
r1=x(1)/y(1);
r2=x(2)/y(2);
r3=x(3)/y(3);
a1=tool_checkzero(r2-r3);
a2=tool_checkzero(r1-r3);
a3=tool_checkzero(r1-r2);
a=0;
if a1 && a2 && a3
a=1;
end
end |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_joine.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_joine.m | 339 | utf_8 | 94c1bc01c0d3435871450cd34b036faf | % Uses the meet tool to work out the join. This is possible since points
% and lines are row and column vectors respectfully
% for example
function a=tool_joine(a1,a2,a3,a4)
if nargin < 3
a=tool_meete(a1.',a2.').';
elseif nargin < 4
a=tool_meete(a1.',a2.',a3.').';
elseif nargin < 5
a=tool_meete(a1.',a2.',a3... |
github | BashBlefari/New-Insights-into-Projective-Quadrangle-Geometry-master | tool_factorx1234.m | .m | New-Insights-into-Projective-Quadrangle-Geometry-master/Matlab/Tools/tool_factorx1234.m | 218 | utf_8 | 419f3de3f07212d8f6568b871b97d8cb | % A tool which tries to utilise the sigma relations
function X=tool_factorx1234(A)
syms x12 x34 x13 x24 x14 x23
B=A;
B=subs(B,x12*x34,x13*x24);
B=subs(B,x13*x24,x14*x23);
B=subs(B,x14*x23,x12*x34);
X=simplify(B);
end
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.