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 | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | setup_hover_configuration.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/docs/Control Theory/Proporcional (LQR) predictivo/LQR Discret variable por gradiente/setup_hover_configuration.m | 1,251 | utf_8 | 64adcf1fe19761bf7637c5f4ced7cb21 | % SETUP_HOVER_CONFIGURATION
%
% SETUP_HOVER_CONFIGURATION sets and returns the model model parameters
% of the Quanser 3 DOF Hover plant.
%
%
% Copyright (C) 2010 Quanser Consulting Inc.
% Quanser Consulting Inc.
%
%
function [ Ktn, Ktc, Kf, l, Jy, Jp, Jr, g ] = setup_hover_configuration( )
%
% Gravitational Constant ... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | LQRDiscretoGradiente.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/docs/Control Theory/Proporcional (LQR) predictivo/LQR Discret variable por gradiente/LQRDiscretoGradiente.m | 3,665 | utf_8 | 13e8e428d22e76f8e2b9eae5df76100f | function LQRDiscretoGradiente()
clc;
clear all
%%Comentarios de este metodo
% Se confia solo un parametro la accion de ponderacion entre la K calculada
% y el Gradiente obtenido de la prediccion d ela accion.
% El dejar solo un aprmetro de ponderacion seria MENOS efectivo usar los
% parametro Q y R en el LQR que son pa... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | setup_hover_configuration.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/docs/Control Theory/Proporcional (LQR) predictivo/LQR optimo Discreto 2 steps/setup_hover_configuration.m | 1,251 | utf_8 | 64adcf1fe19761bf7637c5f4ced7cb21 | % SETUP_HOVER_CONFIGURATION
%
% SETUP_HOVER_CONFIGURATION sets and returns the model model parameters
% of the Quanser 3 DOF Hover plant.
%
%
% Copyright (C) 2010 Quanser Consulting Inc.
% Quanser Consulting Inc.
%
%
function [ Ktn, Ktc, Kf, l, Jy, Jp, Jr, g ] = setup_hover_configuration( )
%
% Gravitational Constant ... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | LQRDiscretoControlador.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/docs/Control Theory/Proporcional (LQR) predictivo/LQR optimo Discreto 2 steps/LQRDiscretoControlador.m | 4,329 | utf_8 | 203f1bb38ac4878e5a89eeb58398e36a | function LQRDiscretoControlador()
clc;
clear all
global A B
% Set the model parameters of the 3DOF HOVER.
% These parameters are used for model representation and controller design.
[ Ktn, Ktc, Kf, l, Jy, Jp, Jr, g ] = setup_hover_configuration();
%
% For the following state vector: X = [ theta; psi; theta_dot; psi_dot... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | LQRDiscretoFUNC.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/docs/Control Theory/Proporcional (LQR) predictivo/LQR optimo Discreto 2 steps/LQRDiscretoFUNC.m | 10,697 | utf_8 | bc88d145dce1b4d9ca8aca19412ff81c | function K_optima = LQRDiscretoFUNC(At,x_k_1,x_k,r_k_1,initial_K)
% % %
% % % % Set the model parameters of the 3DOF HOVER.
% % % % These parameters are used for model representation and controller design.
% % % [ Ktn, Ktc, Kf, l, Jy, Jp, Jr, g ] = setup_hover_configuration();
% % % %
% % % % For the following state v... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | setup_hover_configuration.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/docs/Control Theory/Proporcional (LQR) predictivo/LQR optimo Discreto 2 steps/Simulacion en Simulink/setup_hover_configuration.m | 1,251 | utf_8 | 64adcf1fe19761bf7637c5f4ced7cb21 | % SETUP_HOVER_CONFIGURATION
%
% SETUP_HOVER_CONFIGURATION sets and returns the model model parameters
% of the Quanser 3 DOF Hover plant.
%
%
% Copyright (C) 2010 Quanser Consulting Inc.
% Quanser Consulting Inc.
%
%
function [ Ktn, Ktc, Kf, l, Jy, Jp, Jr, g ] = setup_hover_configuration( )
%
% Gravitational Constant ... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | LQRDiscretoFUNC.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/docs/Control Theory/Proporcional (LQR) predictivo/LQR optimo Discreto 2 steps/Simulacion en Simulink/LQRDiscretoFUNC.m | 10,695 | utf_8 | a46dd8ac4bd18ae4baf7779ffc8dfc29 | function K_optima = LQRDiscretoFUNC(At,x_k_1,x_k,r_k_1,initial_K)
% % %
% % % % Set the model parameters of the 3DOF HOVER.
% % % % These parameters are used for model representation and controller design.
% % % [ Ktn, Ktc, Kf, l, Jy, Jp, Jr, g ] = setup_hover_configuration();
% % % %
% % % % For the following state v... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | setup_hover_configuration.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/docs/Control Theory/Proporcional (LQR) predictivo/LQR optimo Discreto/setup_hover_configuration.m | 1,251 | utf_8 | 64adcf1fe19761bf7637c5f4ced7cb21 | % SETUP_HOVER_CONFIGURATION
%
% SETUP_HOVER_CONFIGURATION sets and returns the model model parameters
% of the Quanser 3 DOF Hover plant.
%
%
% Copyright (C) 2010 Quanser Consulting Inc.
% Quanser Consulting Inc.
%
%
function [ Ktn, Ktc, Kf, l, Jy, Jp, Jr, g ] = setup_hover_configuration( )
%
% Gravitational Constant ... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | LQRDiscretoControlador.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/docs/Control Theory/Proporcional (LQR) predictivo/LQR optimo Discreto/LQRDiscretoControlador.m | 4,041 | utf_8 | 49fa6e6fb5a7ffd6b252d4f1727b2792 | function LQRDiscretoControlador()
clc;
clear all
global A B
% Set the model parameters of the 3DOF HOVER.
% These parameters are used for model representation and controller design.
[ Ktn, Ktc, Kf, l, Jy, Jp, Jr, g ] = setup_hover_configuration();
%
% For the following state vector: X = [ theta; psi; theta_dot; psi_dot... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | LQRDiscretoFUNC.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/docs/Control Theory/Proporcional (LQR) predictivo/LQR optimo Discreto/LQRDiscretoFUNC.m | 10,486 | utf_8 | 14e8eecb2067901be5d86b60fb4332e7 | function K_optima = LQRDiscretoFUNC(At,x_k,r_k,r_k1,initial_K)
% % %
% % % % Set the model parameters of the 3DOF HOVER.
% % % % These parameters are used for model representation and controller design.
% % % [ Ktn, Ktc, Kf, l, Jy, Jp, Jr, g ] = setup_hover_configuration();
% % % %
% % % % For the following state vect... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | setup_hover_configuration.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/docs/Control Theory/Proporcional (LQR) predictivo/LQR optimo Discreto/Simulacion en Simulink/setup_hover_configuration.m | 1,251 | utf_8 | 64adcf1fe19761bf7637c5f4ced7cb21 | % SETUP_HOVER_CONFIGURATION
%
% SETUP_HOVER_CONFIGURATION sets and returns the model model parameters
% of the Quanser 3 DOF Hover plant.
%
%
% Copyright (C) 2010 Quanser Consulting Inc.
% Quanser Consulting Inc.
%
%
function [ Ktn, Ktc, Kf, l, Jy, Jp, Jr, g ] = setup_hover_configuration( )
%
% Gravitational Constant ... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | LQRDiscretoFUNC.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/docs/Control Theory/Proporcional (LQR) predictivo/LQR optimo Discreto/Simulacion en Simulink/LQRDiscretoFUNC.m | 10,481 | utf_8 | eb775de51e9fce3be563ab62100dda8d | function K_optima = LQRDiscretoFUNC(At,x_k,r_k,r_k1,initial_K)
% % %
% % % % Set the model parameters of the 3DOF HOVER.
% % % % These parameters are used for model representation and controller design.
% % % [ Ktn, Ktc, Kf, l, Jy, Jp, Jr, g ] = setup_hover_configuration();
% % % %
% % % % For the following state vect... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | vview.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/lib/qcat1_2_1/QCAT/qcat/vview.m | 6,443 | utf_8 | b3958410b2ea29230fa8cc7d5831170e | function ratio = vview(B,plim,P)
% VVIEW - View the attainable virtual control set.
%
% 1) vview(B,plim)
%
% Shows the attainable virtual control set considering actuator
% position constraints, given by { v : v = B*u, umin < u < umax }.
%
% 2) ratio = vview(B,plim,P)
%
% Compares the set of feasible virtual con... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | ip_alloc.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/lib/qcat1_2_1/QCAT/qcat/ip_alloc.m | 5,473 | utf_8 | ad58dd244a7a2785cbffb745e1ffba9b | function [u,iter] = ip_alloc(B,v,umin,umax,ud,gam,tol,imax)
% IP_ALLOC - Control allocation using interior point method.
%
% [u,iter] = ip_alloc(B,v,umin,umax,[ud,gamma,tol,imax])
%
% Solves the weighted, bounded least-squares problem
%
% min ||u-ud||^2 + gamma ||Bu-v||^2 (unit weighting matrices)
%
% subj. t... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | Control_GUI.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/src/Scheduling design/Scheduling design ACC/Control_GUI.m | 37,417 | utf_8 | 385e097e99302c6cc85b41c7f39c5a64 | function Control_GUI
modelName = 'F16ASYM_Controlled';
% Do some simple error checking on the input
if ~localValidateInputs(modelName)
estr = sprintf('The model %s.mdl cannot be found.',modelName);
errordlg(estr,'Model not found error','modal');
return
end
% Do some simple error checking on varargout
er... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | FE_plot.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/src/Scheduling design/Scheduling design ACC/FE_plot.m | 2,767 | utf_8 | 33f67ce7964a466b12f76d5a8029b6ce | function FE_plot
modelName = 'F16ASYM_Controlled';
% Do some simple error checking on the input
if ~localValidateInputs(modelName)
estr = sprintf('The model %s.mdl cannot be found.',modelName);
errordlg(estr,'Model not found error','modal');
return
end
% Do some simple error checking on varargout
error(... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | tgear.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/src/Scheduling design/Scheduling design ACC/Used Functions/tgear.m | 535 | utf_8 | f0c3d6ed53bf5e044ed13e3251d92c3b | %=====================================================
% tgear.m
%
% Author : Ying Huo
%
% power command vs. thtl. relationship used
% in F-16 model ... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | trimfun.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/src/Scheduling design/Scheduling design ACC/Used Functions/trimfun.m | 4,041 | utf_8 | 908902ca2678a4efb48b714eddeca553 | %=====================================================
% F16 nonlinear model trim cost function
% for longitudinal motion, steady level flight
% (cost = sum of weighted squared state derivatives)
%
% Author: T. Keviczky
% Date: April 29, 2002
%
% Added addtional functionality.
% This trim function ca... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | Control_GUI.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/src/Scheduling design/Scheduling design AoA/Control_GUI.m | 37,417 | utf_8 | 385e097e99302c6cc85b41c7f39c5a64 | function Control_GUI
modelName = 'F16ASYM_Controlled';
% Do some simple error checking on the input
if ~localValidateInputs(modelName)
estr = sprintf('The model %s.mdl cannot be found.',modelName);
errordlg(estr,'Model not found error','modal');
return
end
% Do some simple error checking on varargout
er... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | FE_plot.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/src/Scheduling design/Scheduling design AoA/FE_plot.m | 2,767 | utf_8 | 33f67ce7964a466b12f76d5a8029b6ce | function FE_plot
modelName = 'F16ASYM_Controlled';
% Do some simple error checking on the input
if ~localValidateInputs(modelName)
estr = sprintf('The model %s.mdl cannot be found.',modelName);
errordlg(estr,'Model not found error','modal');
return
end
% Do some simple error checking on varargout
error(... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | tgear.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/src/Scheduling design/Scheduling design AoA/Used Functions/tgear.m | 535 | utf_8 | f0c3d6ed53bf5e044ed13e3251d92c3b | %=====================================================
% tgear.m
%
% Author : Ying Huo
%
% power command vs. thtl. relationship used
% in F-16 model ... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | trimfun.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/src/Scheduling design/Scheduling design AoA/Used Functions/trimfun.m | 4,041 | utf_8 | 908902ca2678a4efb48b714eddeca553 | %=====================================================
% F16 nonlinear model trim cost function
% for longitudinal motion, steady level flight
% (cost = sum of weighted squared state derivatives)
%
% Author: T. Keviczky
% Date: April 29, 2002
%
% Added addtional functionality.
% This trim function ca... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | Control_GUI.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/src/7dof FCS Development/Control_GUI.m | 37,417 | utf_8 | 385e097e99302c6cc85b41c7f39c5a64 | function Control_GUI
modelName = 'F16ASYM_Controlled';
% Do some simple error checking on the input
if ~localValidateInputs(modelName)
estr = sprintf('The model %s.mdl cannot be found.',modelName);
errordlg(estr,'Model not found error','modal');
return
end
% Do some simple error checking on varargout
er... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | FE_plot.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/src/7dof FCS Development/FE_plot.m | 2,767 | utf_8 | 33f67ce7964a466b12f76d5a8029b6ce | function FE_plot
modelName = 'F16ASYM_Controlled';
% Do some simple error checking on the input
if ~localValidateInputs(modelName)
estr = sprintf('The model %s.mdl cannot be found.',modelName);
errordlg(estr,'Model not found error','modal');
return
end
% Do some simple error checking on varargout
error(... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | tgear.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/src/7dof FCS Development/Used Functions/tgear.m | 535 | utf_8 | f0c3d6ed53bf5e044ed13e3251d92c3b | %=====================================================
% tgear.m
%
% Author : Ying Huo
%
% power command vs. thtl. relationship used
% in F-16 model ... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | trimfun.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/src/7dof FCS Development/Used Functions/trimfun.m | 4,041 | utf_8 | 908902ca2678a4efb48b714eddeca553 | %=====================================================
% F16 nonlinear model trim cost function
% for longitudinal motion, steady level flight
% (cost = sum of weighted squared state derivatives)
%
% Author: T. Keviczky
% Date: April 29, 2002
%
% Added addtional functionality.
% This trim function ca... |
github | dhirajhr/ECG-based-Biometric-Authentication-master | ardimat2.m | .m | ECG-based-Biometric-Authentication-master/ECG_MATLAB/ardimat2.m | 2,232 | utf_8 | f0795d79ef6f7d685d3c6ba301b1ef69 | % Yu Hin Hau
% 7/9/2013
% **CLOSE PLOT TO END SESSION
function ardimat2
instrumentObjects=instrfind; % don't pass it anything - find all of them.
delete(instrumentObjects);
clear all;
clc;
%User Defined Properties
serialPort = 'COM1'; % define COM port #
plotTitle = 'Serial Data Log'; % plot title
xLabe... |
github | dhirajhr/ECG-based-Biometric-Authentication-master | progressbar.m | .m | ECG-based-Biometric-Authentication-master/MATLAB_ECG/progressbar.m | 11,767 | utf_8 | 06705e480618e134da62478338e8251c | function progressbar(varargin)
% Description:
% progressbar() provides an indication of the progress of some task using
% graphics and text. Calling progressbar repeatedly will update the figure and
% automatically estimate the amount of time remaining.
% This implementation of progressbar is intended to be extreme... |
github | dhirajhr/ECG-based-Biometric-Authentication-master | untitled.m | .m | ECG-based-Biometric-Authentication-master/MATLAB_ECG/untitled.m | 14,583 | utf_8 | 1035b4a62875e9877dfb1ab7653f5b47 | function varargout = untitled(varargin)
% UNTITLED MATLAB code for untitled.fig
% UNTITLED, by itself, creates a new UNTITLED or raises the existing
% singleton*.
%
% H = UNTITLED returns the handle to a new UNTITLED or the handle to
% the existing singleton*.
%
% UNTITLED('CALLBACK',hObject,ev... |
github | dhirajhr/ECG-based-Biometric-Authentication-master | bxb.m | .m | ECG-based-Biometric-Authentication-master/ECGMatlab_Project/Toolbox/wfdb-app-toolbox-0-9-9/mcode/bxb.m | 3,461 | utf_8 | 57b3c3892ca3780599004ec45c9df76d | function varargout=bxb(varargin)
%
% report=bxb(recName,refAnn,testAnn,reportFile,beginTime,stopTime,matchWindow)
%
% Wrapper to WFDB BXB:
% http://www.physionet.org/physiotools/wag/bxb-1.htm
%
% Creates a report file ("reportFile) using
% ANSI/AAMI-standard beat-by-beat annotation comparator.
%
% Ouput Para... |
github | dhirajhr/ECG-based-Biometric-Authentication-master | surrogate.m | .m | ECG-based-Biometric-Authentication-master/ECGMatlab_Project/Toolbox/wfdb-app-toolbox-0-9-9/mcode/surrogate.m | 1,986 | utf_8 | 4dce61f40839e472d48a46aa980d311b | function Y=surrogate(x,M)
%
% Y=surrogate(x,M)
%
% Generates M amplitude adjusted phase shuffled surrogate time series from x.
% Useufel for testing the underlying assumption that the null hypothesis consists
% of linear dynamics with possibly non-linear, monotonically increasing,
% measurement function.
%
% Required ... |
github | dhirajhr/ECG-based-Biometric-Authentication-master | mat2wfdb.m | .m | ECG-based-Biometric-Authentication-master/ECGMatlab_Project/Toolbox/wfdb-app-toolbox-0-9-9/mcode/mat2wfdb.m | 10,214 | utf_8 | ccd1af8befc8050ad893caab1a0463e0 | function [varargout]=mat2wfdb(varargin)
%
% [xbit]=mat2wfdb(X,fname,Fs,bit_res,adu,info,gain,sg_name,baseline,isint)
%
% Convert data readable in matlab into WFDB Physionet format.
%
% Input Paramater are:
%
% X -(required) NxM matrix of M signals with N samples each. The
% signals can be of... |
github | dhirajhr/ECG-based-Biometric-Authentication-master | wfdbloadlib.m | .m | ECG-based-Biometric-Authentication-master/ECGMatlab_Project/Toolbox/wfdb-app-toolbox-0-9-9/mcode/wfdbloadlib.m | 5,910 | utf_8 | feb96d305ef53118d12317d29239fc2c | function [varargout]=wfdbloadlib(varargin)
%
% [isloaded,config]=wfdbloadlib(debugLevel,networkWaitTime)
%
% Loads the WDFDB libarary if it has not been loaded already into the
% MATLAB classpath. And optionally prints configuration environment and debug information
% regarding the settings used by the classes in the J... |
github | dhirajhr/ECG-based-Biometric-Authentication-master | woody.m | .m | ECG-based-Biometric-Authentication-master/ECGMatlab_Project/Toolbox/wfdb-app-toolbox-0-9-9/mcode/woody.m | 6,574 | utf_8 | 0679ae612c072e1ba908279a60af43e0 | function [out]=woody(x,varargin)
%
% [out]=woody(x,tol,max_it,est_mthd,xcorr_mthd)
%
% Weighted average using Woody average for a signal
% with jitter. Parameters:
%
% x Signal measurements. Each COLUMN represents
% and independent measure of the signal (or channel).
% tol Tolerance ... |
github | dhirajhr/ECG-based-Biometric-Authentication-master | wfdbRecordViewer.m | .m | ECG-based-Biometric-Authentication-master/ECGMatlab_Project/Toolbox/wfdb-app-toolbox-0-9-9/mcode/wfdbRecordViewer.m | 27,253 | utf_8 | c0504c65c81a11015aa85c985db1c311 | function varargout = wfdbRecordViewer(varargin)
% WFDBRECORDVIEWER MATLAB code for wfdbRecordViewer.fig
% WFDBRECORDVIEWER, by itself, creates a new WFDBRECORDVIEWER or raises the existing
% singleton*.
%
% H = WFDBRECORDVIEWER returns the handle to a new WFDBRECORDVIEWER or the handle to
% the exis... |
github | smaillot/3D_pose_estimation-master | DLT_system.m | .m | 3D_pose_estimation-master/DLT_system.m | 218 | utf_8 | 680c2d45bf8b0c87f45b63317d5ff0b0 | function A = DLT_system(u, x)
A = [];
for i=1:length(u)
A = [A ; DLT_point2vec(u(i,:), x(i,:))];
end
end
function A = DLT_point2vec(u, x)
A = kron(eye(2), [x,1]);
A = [A , -u' * [x,1]];
end |
github | shenwei1231/caffe-LDLForests-master | classification_demo.m | .m | caffe-LDLForests-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 | xhuang31/AANE_MATLAB-master | Performance.m | .m | AANE_MATLAB-master/Performance.m | 3,202 | utf_8 | ad6f8f3b492868c911c6b76ecf5768ec | function [F1macro,F1micro] = Performance(Xtrain,Xtest,Ytrain,Ytest)
%Evaluate the performance of classification for both multi-class and multi-label Classification
% [F1macro,F1micro] = Performance(Xtrain,Xtest,Ytrain,Ytest)
%
% Xtrain is the training data with row denotes instances, column denotes features
%... |
github | wincle626/HLS_Legup-master | sobel.m | .m | HLS_Legup-master/legup-4.0/examples/multipump/sobel/sobel.m | 926 | utf_8 | 071ab66f3b2a331ededc44016739b25a | % from http://angeljohnsy.blogspot.ca/2011/12/sobel-edge-detection.html
function sobel(image, Thresh)
if (nargin < 2) Thresh = 100; end
A=imread(image);
B=rgb2gray(A);
C=double(B);
for i=1:size(C,1)-2
for j=1:size(C,2)-2
%Sobel mask for x-direction:
Gx=((2*C(i+2,j+1)+C(i+2,j)+C(i+2,j+2))-(2*C(... |
github | wincle626/HLS_Legup-master | dct8x8.m | .m | HLS_Legup-master/legup-4.0/examples/multipump/idct/dct8x8.m | 1,576 | utf_8 | 5665ac4c6e35b7683e7a75ef560e7ce9 | % from: http://www.mathworks.com/matlabcentral/fileexchange/15494-2-d-dctidct-for-jpeg-compression
function O = DCT_8X8(I)
cosines = [1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
0.9808 0.8315 0.5556 0.1951 -0.1951 -0.5556 -0.8315 -0.9808
0.9239 0.3827 -0.3827 -0.9239 -0.923... |
github | wincle626/HLS_Legup-master | idct8x8.m | .m | HLS_Legup-master/legup-4.0/examples/multipump/idct/idct8x8.m | 1,732 | utf_8 | b81ad096903d006ddfd0dadbbe6d41c2 | % from: http://www.mathworks.com/matlabcentral/fileexchange/15494-2-d-dctidct-for-jpeg-compression
% a = int32(255*rand(8,8))
% a-int32(idct8x8(dct8x8(a)))
% a-int32(idct2(dct2(a)))
% correct to within a decimal place
% idct2(a)-idct8x8(a)>0.1
function O = IDCT_8X8(I)
cosines = [1.0000 1.0000 1.0000 1.000... |
github | swchao/personFrameworkDetectCMU-master | classification_demo.m | .m | personFrameworkDetectCMU-master/3rdparty/caffe/matlab/demo/classification_demo.m | 5,466 | utf_8 | 45745fb7cfe37ef723c307dfa06f1b97 | 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 | mathematical-tours/mathematical-tours.github.io-master | format_ticks.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/cepstrum/format_ticks.m | 17,920 | utf_8 | 9451fdec572f520b405113bde2e3fb6c | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% BEGIN HEADER
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... |
github | mathematical-tours/mathematical-tours.github.io-master | Hungarian.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/newton-fractal/Hungarian.m | 9,328 | utf_8 | 51e60bc9f1f362bfdc0b4f6d67c44e80 | function [Matching,Cost] = Hungarian(Perf)
%
% [MATCHING,COST] = Hungarian_New(WEIGHTS)
%
% A function for finding a minimum edge weight matching given a MxN Edge
% weight matrix WEIGHTS using the Hungarian Algorithm.
%
% An edge weight of Inf indicates that the pair of vertices given by its
% position have no... |
github | mathematical-tours/mathematical-tours.github.io-master | glasso_solver.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/graphical-lasso/glasso_solver.m | 2,722 | utf_8 | 6796909c4c43ae392d5d83535db957be | % Graphical Lasso function
% Author: Xiaohui Chen (xiaohuic@ece.ubc.ca)
% Version: 2012-Feb
function [Theta W] = glasso_solver(S, rho, maxIt, tol)
% Solve the graphical Lasso
% minimize_{Theta > 0} tr(S*Theta) - logdet(Theta) + rho * ||Theta||_1
% Ref: Friedman et al. (2007) Sparse inverse covariance estimation with ... |
github | mathematical-tours/mathematical-tours.github.io-master | plot_quadtree.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/cart/toolbox-cart/plot_quadtree.m | 2,304 | utf_8 | 36dc15aa95e9dab104a6f90ce381d27c | function plot_quadtree(W, f, options)
% plot_quadtree - plot an image quadtree
%
% plot_quadtree(T, f, options);
%
% f is a background image.
%
% Copyright (c) 2010 Gabriel Peyre
options.null = 0;
if nargin<2
f = [];
end
n = size(f,1);
J = length(W);
str = 'r';
str_geom = 'b';
hold on;
% display image
... |
github | mathematical-tours/mathematical-tours.github.io-master | plot_tree.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/cart/toolbox-cart/plot_tree.m | 1,658 | utf_8 | e6be3a012e8a2f5c2eb29c0eecc71e9e | function plot_tree(Tree)
% plot_tree - display a tree
%
% plot_tree(Tree);
%
% Copyright (c) 2007 Gabriel Peyre
J = length(Tree);
% branching factor
q = length(Tree{2})/length(Tree{1});
% edge
edgecolor = 'b';
% leaf
leafcolor = 'r.';
leafsize = 20;
% node
nodecolor = 'b.';
nodesize = 15;
delta = [-0.018,-0.045... |
github | mathematical-tours/mathematical-tours.github.io-master | patcht.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/mesh-param/patcht.m | 4,383 | utf_8 | bdaee35efdd1e4a99596366a2d565917 | function patcht(FF,VV,TF,VT,I,Options)
%%
% This function PATCHT, will show a triangulated mesh like Matlab function
% Patch but then with a texture.
%
% patcht(FF,VV,TF,VT,I,Options);
%
% inputs,
% FF : Face list 3 x N with vertex indices
% VV : Vertices 3 x M
% TF : Texture list 3 x N with texture vertex indic... |
github | mathematical-tours/mathematical-tours.github.io-master | compute_boundary.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/mesh-param/compute_boundary.m | 2,537 | utf_8 | 1722359a4efff29fd344fc6e14eddba5 | function boundary=compute_boundary(face, options)
% compute_boundary - compute the vertices on the boundary of a 3D mesh
%
% boundary=compute_boundary(face);
%
% Copyright (c) 2007 Gabriel Peyre
if size(face,1)<size(face,2)
face=face';
end
%% compute edges (i,j) that are adjacent to only 1 face
... |
github | mathematical-tours/mathematical-tours.github.io-master | check_face_vertex.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/mesh-param/check_face_vertex.m | 671 | utf_8 | 21c65f119991c973909eedd356838dad | function [vertex,face] = check_face_vertex(vertex,face, options)
% check_face_vertex - check that vertices and faces have the correct size
%
% [vertex,face] = check_face_vertex(vertex,face);
%
% Copyright (c) 2007 Gabriel Peyre
vertex = check_size(vertex,2,4);
face = check_size(face,3,4);
%%%%%%%%%%%%%%%%%%%%%%%... |
github | mathematical-tours/mathematical-tours.github.io-master | patcht.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/mesh-param/patcht/patcht.m | 4,465 | utf_8 | aff599d5c7bab679b7b543addd97579b | function patcht(FF,VV,TF,VT,I,Options)
% This function PATCHT, will show a triangulated mesh like Matlab function
% Patch but then with a texture.
%
% patcht(FF,VV,TF,VT,I,Options);
%
% inputs,
% FF : Face list 3 x N with vertex indices
% VV : Vertices 3 x M
% TF : Texture list 3 x N with texture vertex ... |
github | mathematical-tours/mathematical-tours.github.io-master | mouse3d.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/mesh-param/patcht/mouse3d.m | 11,755 | utf_8 | 21e012d7de63f0c8898540286a7e366c | function mouse3d(varargin)
% This function MOUSE3D enables mouse camera control on an certain figure
% axes.
%
% Enable mouse control with mouse3d(axis-handle) or just mouse3d
%
%
% MouseButtons
% Left : Rotate
% Right : Zoom
% Center : Pan
% Keys
% 'r' : Change mouse rotation from inplane to outplane... |
github | mathematical-tours/mathematical-tours.github.io-master | load_signal.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/fourier-signal/load_signal.m | 12,338 | utf_8 | b70e4cb57d6b467ae9c90d4b3310a81f | function y = load_signal(name, n, options)
% load_signal - load a 1D signal
%
% y = load_signal(name, n, options);
%
% name is a string that can be :
% 'regular' (options.alpha gives regularity)
% 'step', 'rand',
% 'gaussiannoise' (options.sigma gives width of filtering in pixels),
% [natural signa... |
github | mathematical-tours/mathematical-tours.github.io-master | GameOfLife.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/cellular/GameOfLife.m | 3,374 | utf_8 | a30e18a0dce03b6f6d490e96282b1f1f | function GameOfLife
% This is a simple simulation of Conway Game of life GoL
% it is good for understanding Cellular Automata (CA) concept
% GoL Rules:
% 1. Survival: an alive cell live if it has 2 or 3 alive neighbors
% 2. Birth: a dead cell will be alive if it has 3 alive neighbors
% 3. Deaths:
% ... |
github | mathematical-tours/mathematical-tours.github.io-master | load_gear.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/gears-non-circ/load_gear.m | 4,615 | utf_8 | aed61f3cb53895649282de68959df88e | function x = load_gear(name, n, center, tooth, smoothing)
% load_gear - create default gears
%
% x = load_gear(name, n, center, tooth, smoothing);
%
% n is the number of points used for the discretization.
% center is the coordinate of the center of rotation (detaul is [0 0])
% tooth gives the parameters for t... |
github | mathematical-tours/mathematical-tours.github.io-master | hilbert.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/hilbert-curve/hilbert.m | 416 | utf_8 | be622fc6b0e538e3287a391980e5091d |
function [x,y] = hilbert(n)
%HILBERT Hilbert curve.
%
% [x,y]=hilbert(n) gives the vector coordinates of points
% in n-th order Hilbert curve of area 1.
%
% Example: plot of 5-th order curve
%
% [x,y]=hilbert(5);line(x,y)
%
% Copyright (c) by Federico Forte
% Date: 2000/10/06
if n<=0
x=0;
y=0;
else
[xo,... |
github | mathematical-tours/mathematical-tours.github.io-master | plot_tensor_field.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/tensor-diffusion/plot_tensor_field.m | 5,736 | utf_8 | 08ad2346cf316598da10c6b1d5c367d3 | function h = plot_tensor_field(H, M, options)
% plot_tensor_field - display a tensor field
%
% h = plot_tensor_field(H, M, options);
%
% options.sub controls sub-sampling
% options.color controls color
%
% Copyright (c) 2006 Gabriel Peyre
if nargin<3
options.null = 0;
end
if not( isstruct(op... |
github | mathematical-tours/mathematical-tours.github.io-master | inpolyhedron.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/wave-heat-3d/inpolyhedron.m | 22,756 | utf_8 | 16738ef64a83b8c37c57511248fb93cf | function IN = inpolyhedron(varargin)
%INPOLYHEDRON Tests if points are inside a 3D triangulated (faces/vertices) surface
% BY CONVENTION, SURFACE NORMALS SHOULD POINT OUT from the object. (see
% FLIPNORMALS option below for details)
%
% IN = INPOLYHEDRON(FV,QPTS) tests if the query points (QPTS) are inside ... |
github | mathematical-tours/mathematical-tours.github.io-master | load_image.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/wass-barycenters/toolbox/load_image.m | 19,798 | utf_8 | df61d87c209e587d6199fa36bbe979bf | function M = load_image(type, n, options)
% load_image - load benchmark images.
%
% M = load_image(name, n, options);
%
% name can be:
% Synthetic images:
% 'chessboard1', 'chessboard', 'square', 'squareregular', 'disk', 'diskregular', 'quaterdisk', '3contours', 'line',
% 'line_vertical', 'l... |
github | mathematical-tours/mathematical-tours.github.io-master | imageplot.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/wass-barycenters/toolbox/imageplot.m | 2,996 | utf_8 | bb6359ff3ad5e82264a744d41ba24582 | function h1 = imageplot(M,str, a,b,c)
% imageplot - diplay an image and a title
%
% Example of usages:
% imageplot(M);
% imageplot(M,title);
% imageplot(M,title,1,2,1); % to make subplot(1,2,1);
%
% imageplot(M,options);
%
% If you want to display several images:
% imageplot({M1 M2}, {'title1', 'titl... |
github | mathematical-tours/mathematical-tours.github.io-master | check_face_vertex.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/silouhette/check_face_vertex.m | 671 | utf_8 | 21c65f119991c973909eedd356838dad | function [vertex,face] = check_face_vertex(vertex,face, options)
% check_face_vertex - check that vertices and faces have the correct size
%
% [vertex,face] = check_face_vertex(vertex,face);
%
% Copyright (c) 2007 Gabriel Peyre
vertex = check_size(vertex,2,4);
face = check_size(face,3,4);
%%%%%%%%%%%%%%%%%%%%%%%... |
github | mathematical-tours/mathematical-tours.github.io-master | load_image.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/toolbox/load_image.m | 19,798 | utf_8 | df61d87c209e587d6199fa36bbe979bf | function M = load_image(type, n, options)
% load_image - load benchmark images.
%
% M = load_image(name, n, options);
%
% name can be:
% Synthetic images:
% 'chessboard1', 'chessboard', 'square', 'squareregular', 'disk', 'diskregular', 'quaterdisk', '3contours', 'line',
% 'line_vertical', 'l... |
github | mathematical-tours/mathematical-tours.github.io-master | check_face_vertex.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/toolbox/check_face_vertex.m | 669 | utf_8 | c940a837f5afef7c3a7f7aed3aff9f7a | function [vertex,face] = check_face_vertex(vertex,face, options)
% check_face_vertex - check that vertices and faces have the correct size
%
% [vertex,face] = check_face_vertex(vertex,face);
%
% Copyright (c) 2007 Gabriel Peyre
vertex = check_size(vertex,2,4);
face = check_size(face,3,4);
%%%%%%%%%%%%%%%%%%%%%%%... |
github | mathematical-tours/mathematical-tours.github.io-master | imageplot.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/toolbox/imageplot.m | 2,996 | utf_8 | bb6359ff3ad5e82264a744d41ba24582 | function h1 = imageplot(M,str, a,b,c)
% imageplot - diplay an image and a title
%
% Example of usages:
% imageplot(M);
% imageplot(M,title);
% imageplot(M,title,1,2,1); % to make subplot(1,2,1);
%
% imageplot(M,options);
%
% If you want to display several images:
% imageplot({M1 M2}, {'title1', 'titl... |
github | mathematical-tours/mathematical-tours.github.io-master | plot_mesh.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/toolbox/plot_mesh.m | 11,184 | utf_8 | 0dcb199b54eb7b66240316a0359d9127 | function h = plot_mesh(vertex,face,options)
% plot_mesh - plot a 3D mesh.
%
% plot_mesh(vertex,face, options);
%
% 'options' is a structure that may contains:
% - 'normal' : a (nvertx x 3) array specifying the normals at each vertex.
% - 'edge_color' : a float specifying the color of the edges.... |
github | mathematical-tours/mathematical-tours.github.io-master | distinguishable_colors.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/toolbox/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 | mathematical-tours/mathematical-tours.github.io-master | perform_haar_transf.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/toolbox/perform_haar_transf.m | 3,170 | utf_8 | 14b7d7fd610eca05949ef196c55d7b83 | function f = perform_haar_transf(f, Jmin, dir, options)
% perform_haar_transf - peform fast Haar transform
%
% y = perform_haar_transf(x, Jmin, dir);
%
% Implement a Haar wavelets.
% Works in any dimension.
%
% Copyright (c) 2008 Gabriel Peyre
n = size(f,1);
Jmax = log2(n)-1;
if dir==1
%%% FORWARD %%%
... |
github | mathematical-tours/mathematical-tours.github.io-master | load_image.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/wasserstein-flows/toolbox/load_image.m | 19,798 | utf_8 | df61d87c209e587d6199fa36bbe979bf | function M = load_image(type, n, options)
% load_image - load benchmark images.
%
% M = load_image(name, n, options);
%
% name can be:
% Synthetic images:
% 'chessboard1', 'chessboard', 'square', 'squareregular', 'disk', 'diskregular', 'quaterdisk', '3contours', 'line',
% 'line_vertical', 'l... |
github | mathematical-tours/mathematical-tours.github.io-master | inpolyhedron.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/level-sets/inpolyhedron.m | 22,756 | utf_8 | 16738ef64a83b8c37c57511248fb93cf | function IN = inpolyhedron(varargin)
%INPOLYHEDRON Tests if points are inside a 3D triangulated (faces/vertices) surface
% BY CONVENTION, SURFACE NORMALS SHOULD POINT OUT from the object. (see
% FLIPNORMALS option below for details)
%
% IN = INPOLYHEDRON(FV,QPTS) tests if the query points (QPTS) are inside ... |
github | mathematical-tours/mathematical-tours.github.io-master | knnsearch.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/quantized-rendering/knnsearch.m | 4,137 | utf_8 | 40fbf8d0695309e13ce021d477c579c3 | function [idx,D]=knnsearch(varargin)
% KNNSEARCH Linear k-nearest neighbor (KNN) search
% IDX = knnsearch(Q,R,K) searches the reference data set R (n x d array
% representing n points in a d-dimensional space) to find the k-nearest
% neighbors of each query point represented by eahc row of Q (m x d array).
% The... |
github | mathematical-tours/mathematical-tours.github.io-master | lorenz.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/lorentz/lorenz.m | 1,363 | utf_8 | 9da3a6e8b70b72c64b10f262bb879ade | function [x,y,z,T] = lorenz(rho, sigma, beta, initV, T, eps)
% LORENZ Function generates the lorenz attractor of the prescribed values
% of parameters rho, sigma, beta
%
% [X,Y,Z] = LORENZ(RHO,SIGMA,BETA,INITV,T,EPS)
% X, Y, Z - output vectors of the strange attactor trajectories
% RHO - Rayleigh numb... |
github | mathematical-tours/mathematical-tours.github.io-master | demoUI.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/bilateral-filtering/bilateral-toolbox/demoUI.m | 11,896 | utf_8 | 66455746f1799fcc484ea751ad4eda26 | function varargout = demoUI(varargin)
% DEMOUI MATLAB code for demoUI.fig
% DEMOUI, by itself, creates a new DEMOUI or raises the existing
% singleton*.
%
% H = DEMOUI returns the handle to a new DEMOUI or the handle to
% the existing singleton*.
%
% DEMOUI('CALLBACK',hObject,eventData,handles,... |
github | mathematical-tours/mathematical-tours.github.io-master | CallbackFcns.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/bilateral-filtering/bilateral-toolbox/CallbackFcns.m | 3,734 | utf_8 | bb2767d88ebb2ec18d4b4dd2088ee8d5 | function CallbackFcns (action)
switch (action)
case 'sigmas_slider'
sigmas = get(gcbo, 'Value');
sigmas = round(sigmas) + 1;
updatesigmas(sigmas);
case 'sigmar_slider'
sigmar = get(gcbo, 'Value');
sigmar = (round(sigmar*10))/10 + 5;
updatesigmar(sigmar);
case... |
github | mathematical-tours/mathematical-tours.github.io-master | perform_ar_synthesis.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/motion-clouds/perform_ar_synthesis.m | 2,236 | utf_8 | b3c984def5c7d189f8756566ad7b839a | function F = perform_ar_synthesis(H, options)
% perform_ar_synthesis - perform motion cloud synthesis
%
% F = perform_ar_synthesis(H, options);
%
% Copyright (c) 2013 Gabriel Peyre
n = size(H,1);
synth2d = @(h)real(ifft2(fft2(randn(n,n)).*h));
extend = @(f)[f f(:,1); f(1,:) f(1)];
% movement
scale = getoptions... |
github | mathematical-tours/mathematical-tours.github.io-master | movie_display.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/motion-clouds/toolbox/movie_display.m | 766 | utf_8 | 72007c865584bc804987e7f24d64ce47 | function movie_display(f)
% movie_display - display a 3-D array as a movie.
%
% movie_display(f);
%
% Copyright (c) 2012 Gabriel Peyre
s = 2.5;
normalize = @(x)rescale( clamp( (x-mean(x(:)))/std(x(:)), -s,s) );
A = normalize(f)*256;
clf;
% stpo button
uicontrol(...
'Style','pushbutton', 'String', 'Stop',...
... |
github | mathematical-tours/mathematical-tours.github.io-master | demo_stepwise.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/dbscan/demo_stepwise.m | 4,650 | utf_8 | 9f483f576b60f8e3bc193aae38407161 | function demo_stepwise()
%twospirals
% data=twospirals(200,360,50,1.5,15);
data = twospirals(600, 360*1.3, 30, 50);
global it;
global rep;
it = 0;
addpath('../toolbox/');
rep = MkResRep();
% generate mixtures
k0 = 20;
z0 = (.1+.1i) + .8*( rand(k0,1) + 1i*rand(k0,1) );
% mean/scale/anisotrop/orientation
p = 30; % #s... |
github | mathematical-tours/mathematical-tours.github.io-master | DBSCAN.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/dbscan/DBSCAN.m | 2,588 | utf_8 | 232558b4366cd2668ad0f85e2185b21f | function Clust = DBSCAN(DistMat,Eps,MinPts)
%A simple DBSCAN implementation of the original paper:
%"A Density-Based Algorithm for Discovering Clusters in Large Spatial
%Databases with Noise" -- Martin Ester et.al.
%Since no spatial access method is implemented, the run time complexity
%will be N^2 rather than N*logN
%... |
github | mathematical-tours/mathematical-tours.github.io-master | load_image.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/total-variation/toolbox/load_image.m | 20,275 | utf_8 | c700b54853577ab37402e27e4ca061b8 | function M = load_image(type, n, options)
% load_image - load benchmark images.
%
% M = load_image(name, n, options);
%
% name can be:
% Synthetic images:
% 'chessboard1', 'chessboard', 'square', 'squareregular', 'disk', 'diskregular', 'quaterdisk', '3contours', 'line',
% 'line_vertical', 'l... |
github | mathematical-tours/mathematical-tours.github.io-master | resize_img.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/total-variation/toolbox/resize_img.m | 4,491 | utf_8 | 08e13146c462c4c031869291d64de7a5 | function resize_img(imnames, Voxdim, BB, ismask)
% resize_img -- resample images to have specified voxel dims and BBox
% resize_img(imnames, voxdim, bb, ismask)
%
% Output images will be prefixed with 'r', and will have voxel dimensions
% equal to voxdim. Use NaNs to determine voxdims from transformation matrix
% of i... |
github | mathematical-tours/mathematical-tours.github.io-master | perform_wavortho_transf.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/orthobases/perform_wavortho_transf.m | 2,736 | utf_8 | 362bed43d951f6bdefb520003047e2ea | function f = perform_wavortho_transf(f,Jmin,dir,options)
% perform_wavortho_transf - compute orthogonal wavelet transform
%
% fw = perform_wavortho_transf(f,Jmin,dir,options);
%
% You can give the filter in options.h.
%
% Works in arbitrary dimension.
%
% Copyright (c) 2009 Gabriel Peyre
options.n... |
github | mathematical-tours/mathematical-tours.github.io-master | nbECGM.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/displ-interp-2d/toolbox-lsap/nbECGM.m | 737 | utf_8 | 12c013e9e8fa1ded80b1fdb944a77e4f | % -----------------------------------------------------------
% file: nbECGM.m
% -----------------------------------------------------------
% authors: Sebastien Bougleux (UNICAEN) and Luc Brun (ENSICAEN)
% institution: Normandie Univ, CNRS - ENSICAEN - UNICAEN, GREYC UMR 6072
% ---------------------------------------... |
github | mathematical-tours/mathematical-tours.github.io-master | showDecoratedTiles.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/penrose/showDecoratedTiles.m | 2,810 | utf_8 | 335ec04536c1ee3229b4817c7b9de25a | function showDecoratedTiles(T)
%showDecoratedTiles Show Penrose rhombus tiles with connecting arcs.
%
% showDecoratedTiles(T) displays the Penrose rhombus tiles constructed
% from the triangles in the input table, T. Each triangle is decorated
% with arcs so that the arcs connect smoothly from triangle to
% tri... |
github | mathematical-tours/mathematical-tours.github.io-master | isoscelesTriangle.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/penrose/isoscelesTriangle.m | 1,580 | utf_8 | fb942b8fbc4f919cb973dd5524fac1be | function [apex,left,right] = isoscelesTriangle(apex,left,right,theta)
%isoscelesTriangle Isosceles triangle.
% [apex,left,right] = isoscelesTriangle(apex,left,right,theta) returns
% the three vertices of an isosceles triangle given any two vertices and
% the apex angle (in degrees). Triangle vertices are represen... |
github | mathematical-tours/mathematical-tours.github.io-master | showLabeledTriangles.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/penrose/showLabeledTriangles.m | 2,695 | utf_8 | 8d390c710fc92875de69726b2d36e2ea | function showLabeledTriangles(T)
%showLabeledTriangles Show triangles with type and side labels.
%
% showLabeledTriangles(T) shows the outline of each triangle contained
% in the input table. Each row of the input table has the form
% returned by aTriangle, apTriangle, bTriangle, or bpTriangle. Each
% displaye... |
github | mathematical-tours/mathematical-tours.github.io-master | solveTSP.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/tsp/solveTSP.m | 3,663 | utf_8 | 20479919ca2129026113b1c9c3f48ee5 | function varargout = solveTSP( cities, display, maxIteration, order)
% cities = solveTSP( cities, maxItt, display)
%
% cities - An Nx2 matrix containing cartesian coordinates of the "cities"
% beeing visited. The initial trail is assumed from the first city to the
% scond and so on...
%
% display - bolean flag d... |
github | mathematical-tours/mathematical-tours.github.io-master | tsp_ga.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/tsp/tsp_ga.m | 9,855 | utf_8 | d7af84e7693bc9af24e3d4164fd89ae6 | %TSP_GA Traveling Salesman Problem (TSP) Genetic Algorithm (GA)
% Finds a (near) optimal solution to the TSP by setting up a GA to search
% for the shortest route (least distance for the salesman to travel to
% each city exactly once and return to the starting city)
%
% Summary:
% 1. A single salesman travels... |
github | mathematical-tours/mathematical-tours.github.io-master | nbECGM.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/tsp/toolbox-lsap/nbECGM.m | 737 | utf_8 | 12c013e9e8fa1ded80b1fdb944a77e4f | % -----------------------------------------------------------
% file: nbECGM.m
% -----------------------------------------------------------
% authors: Sebastien Bougleux (UNICAEN) and Luc Brun (ENSICAEN)
% institution: Normandie Univ, CNRS - ENSICAEN - UNICAEN, GREYC UMR 6072
% ---------------------------------------... |
github | mathematical-tours/mathematical-tours.github.io-master | synth.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/texture-synthesis/synth.m | 7,300 | utf_8 | 63e55eb25b6cd0ff71909e7414adf4fb | function [Image, Mapping] = synth(rawSample, winsize, newRows, newCols, outpath)
% Non-parametric Texture Synthesis using Efros & Leung's algorithm
% Author: Alex Rubinsteyn (alex.rubinsteyn at gmail)
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General... |
github | mathematical-tours/mathematical-tours.github.io-master | spharm.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/spherical-harmonics/spharm.m | 3,033 | utf_8 | eab2f35cc9c57041cd97499a220f93a0 | % This function generates the Spherical Harmonics basis functions of degree
% L and order M.
%
% SYNTAX: [Ymn,THETA,PHI,X,Y,Z]=spharm4(L,M,RES,PLOT_FLAG);
%
% INPUTS:
%
% L - Spherical harmonic degree, [1x1]
% M - Spherical harmonic order, [1x1]
% RES - Vector of # of points to use [#Theta x #Phi... |
github | mathematical-tours/mathematical-tours.github.io-master | check_face_vertex.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/spherical-harmonics/toolbox/check_face_vertex.m | 669 | utf_8 | c940a837f5afef7c3a7f7aed3aff9f7a | function [vertex,face] = check_face_vertex(vertex,face, options)
% check_face_vertex - check that vertices and faces have the correct size
%
% [vertex,face] = check_face_vertex(vertex,face);
%
% Copyright (c) 2007 Gabriel Peyre
vertex = check_size(vertex,2,4);
face = check_size(face,3,4);
%%%%%%%%%%%%%%%%%%%%%%%... |
github | mathematical-tours/mathematical-tours.github.io-master | perform_bfgs.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/perceptron/perform_bfgs.m | 58,067 | utf_8 | 91b03f91b3bec570bfdda2f700810657 | function [f, R, info] = perform_bfgs(Grad, f, options)
% perform_bfgs - wrapper to HANSO code
%
% [f, R, info] = perform_bfgs(Grad, f, options);
%
% Grad should return (value, gradient)
% f is an initialization
% options.niter is the number of iterations.
% options.bfgs_memory is the memory for the hessian b... |
github | mathematical-tours/mathematical-tours.github.io-master | distinguishable_colors.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/pocs/toolbox/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 | mathematical-tours/mathematical-tours.github.io-master | plot_mesh.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/spherical-wavelets/toolbox_multires/plot_mesh.m | 11,185 | utf_8 | f48aac5032a78db13e31a0504dde8ce4 | function h = plot_mesh(vertex,face,options)
% plot_mesh - plot a 3D mesh.
%
% plot_mesh(vertex,face, options);
%
% 'options' is a structure that may contains:
% - 'normal' : a (nvertx x 3) array specifying the normals at each vertex.
% - 'edge_color' : a float specifying the color of the edges.... |
github | mathematical-tours/mathematical-tours.github.io-master | load_spherical_function.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/spherical-wavelets/toolbox_multires/load_spherical_function.m | 2,090 | utf_8 | e9c44feb124e0a5925b9c201378082dc | function f = load_spherical_function(name, pos, options)
% load_spherical_function - load a function on the sphere
%
% f = load_spherical_function(name, pos, options);
%
% Copyright (c) 2007 Gabriel Peyre
if iscell(pos)
pos = pos{end};
end
if size(pos,1)>size(pos,2)
pos = pos';
end
x = pos(1,:); x = x(:... |
github | mathematical-tours/mathematical-tours.github.io-master | perform_haar_transf.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/spherical-wavelets/toolbox_multires/perform_haar_transf.m | 3,170 | utf_8 | 14b7d7fd610eca05949ef196c55d7b83 | function f = perform_haar_transf(f, Jmin, dir, options)
% perform_haar_transf - peform fast Haar transform
%
% y = perform_haar_transf(x, Jmin, dir);
%
% Implement a Haar wavelets.
% Works in any dimension.
%
% Copyright (c) 2008 Gabriel Peyre
n = size(f,1);
Jmax = log2(n)-1;
if dir==1
%%% FORWARD %%%
... |
github | mathematical-tours/mathematical-tours.github.io-master | refine2.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/mesh-2d/refine2.m | 40,907 | utf_8 | 18e116aff5e1105226be34049478e95d | function [vert,conn,tria,tnum] = refine2(varargin)
%REFINE2 (Frontal)-Delaunay-refinement for two-dimensional,
%polygonal geometries.
% [VERT,EDGE,TRIA,TNUM] = REFINE2(NODE,EDGE) returns a co-
% nstrained Delaunay triangulation of the polygonal region
% {NODE,EDGE}. NODE is an N-by-2 array of polygonal verti-
% ... |
github | mathematical-tours/mathematical-tours.github.io-master | tridemo.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/mesh-2d/tridemo.m | 27,638 | utf_8 | 0d592600bfff8aa51497b1c6ea94a5a3 | function tridemo(demo)
%TRIDEMO run various triangulation demos for MESH2D.
% TRIDEMO(N) runs the N-TH demo problem. The following de-
% mo problems are currently available:
%
% - DEMO-0: very simple example to start with -- construct a
% mesh for a square domain with a square hold cut from its
% centre.
%
% - ... |
github | mathematical-tours/mathematical-tours.github.io-master | tricost.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/mesh-2d/tricost.m | 15,234 | utf_8 | 7da2993c7253435846c34a8b1244bc43 | function tricost(varargin)
%TRICOST draw quality-metrics for a 2-simplex triangulation
%embedded in the two-dimensional plane.
% TRICOST(VERT,EDGE,TRIA,TNUM) draws histograms of quality
% metrics for the triangulation.
% VERT is a V-by-2 array of XY coordinates in the triangu-
% lation, EDGE is an array of cons... |
github | mathematical-tours/mathematical-tours.github.io-master | smooth2.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/mesh-2d/smooth2.m | 18,053 | utf_8 | f11e4a411ca1d0f078610452258c13e9 | function [vert,conn,tria,tnum] = smooth2(varargin)
%SMOOTH2 "hill-climbing" mesh-smoothing for two-dimensional,
%2-simplex triangulations.
% [VERT,EDGE,TRIA,TNUM] = SMOOTH2(VERT,EDGE,TRIA,TNUM) re-
% turns a "smoothed" triangulation {VERT,TRIA}, incorpora-
% ting "optimised" vertex coordinates and mesh topology.
... |
github | mathematical-tours/mathematical-tours.github.io-master | savemsh.m | .m | mathematical-tours.github.io-master/tweets-sources/codes/mesh-2d/mesh-file/savemsh.m | 16,535 | utf_8 | dfee52330f9c2c724696cbf905df56bb | function savemsh(name,mesh)
%SAVEMSH save a *.MSH file for JIGSAW.
%
% SAVEMSH(NAME,MESH);
%
% The following are optionally written to "NAME.MSH". Ent-
% ities are written if they are present in MESH:
%
% .IF. MESH.MSHID == 'EUCLIDEAN-MESH':
% -----------------------------------
%
% MESH.POINT.CO... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.