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
ambarpal/3d-hough-master
ransac.m
.m
3d-hough-master/code/vidal/HopkinsMultiviewMultibody/helper_functions/ransac.m
7,904
utf_8
7847ae59e99503f67c783cf8b6735f5c
% RANSAC - Robustly fits a model to data with the RANSAC algorithm % % Usage: % % [M, inliers] = ransac(x, fittingfn, distfn, degenfn s, t, feedback) % % Arguments: % x - Data sets to which we are seeking to fit a model M % It is assumed that x is of size [d x Npts] % where d...
github
ambarpal/3d-hough-master
spectralclusternormalcut_recursive.m
.m
3d-hough-master/code/vidal/HopkinsMultiviewMultibody/helper_functions/spectralclusternormalcut_recursive.m
1,002
utf_8
0717854da603614e0d716528bf36f589
%function group=spectralclusternormalcut_recursive(n,simMat) %n final number of cluster %simMat similarity matrix function group=spectralclusternormalcut_recursive(n,simMat) %trivial case with 1 cluster if(n==1) group=ones(size(simMat,1),1); end %initial bipartition with spectral clustering group=spectralclust...
github
ambarpal/3d-hough-master
normalise2dpts.m
.m
3d-hough-master/code/vidal/HopkinsMultiviewMultibody/helper_functions/normalise2dpts.m
2,166
utf_8
b0206a3a2a4b9aa7d280efae69701fdd
% NORMALISE2DPTS - normalises 2D homogeneous points % % Function translates and normalises a set of 2D homogeneous points % so that their centroid is at the origin and their mean distance from % the origin is sqrt(2). This process typically improves the % conditioning of any equations used to solve homographies, fun...
github
ambarpal/3d-hough-master
Misclassification.m
.m
3d-hough-master/code/vidal/SSC_CVX/Misclassification.m
734
utf_8
3b553cd5fc50c024270bd4ba8de1c2fc
%-------------------------------------------------------------------------- % This function takes the groups resulted from spectral clutsering and the % ground truth to compute the misclassification rate. % groups: [grp1,grp2,grp3] for three different forms of Spectral Clustering % s: ground truth vector % Missrate: 3x...
github
ambarpal/3d-hough-master
BuildAdjacency.m
.m
3d-hough-master/code/vidal/SSC_CVX/BuildAdjacency.m
1,036
utf_8
1788e227e213caedb31998d4a254034c
%-------------------------------------------------------------------------- % This function takes a NxN coefficient matrix and returns a NxN adjacency % matrix by choosing only the K strongest connections in the similarity % graph % CMat: NxN coefficient matrix % K: number of strongest edges to keep; if K=0 use all the...
github
ambarpal/3d-hough-master
missclassGroups.m
.m
3d-hough-master/code/vidal/SSC_CVX/missclassGroups.m
1,099
utf_8
6ffcc03323c664987bd37aae59e91b29
%-------------------------------------------------------------------------- % [miss,index] = missclass(Segmentation,RefSegmentation,ngroups) % Computes the number of missclassified points in the vector Segmentation. % Segmentation: 1 by sum(npoints) or sum(ngroups) by 1 vector containing % the label for each group, r...
github
ambarpal/3d-hough-master
SparseCoefRecovery.m
.m
3d-hough-master/code/vidal/SSC_CVX/SparseCoefRecovery.m
3,615
utf_8
cc831870c242b6a31b96a4e5f1475ff7
%-------------------------------------------------------------------------- % This function takes the D x N matrix of N data points and write every % point as a sparse linear combination of other points. % Xp: D x N matrix of N data points % cst: 1 if using the affine constraint sum(c)=1, else 0 % Opt: type of optimiza...
github
ambarpal/3d-hough-master
DataProjection.m
.m
3d-hough-master/code/vidal/SSC_CVX/DataProjection.m
1,505
utf_8
cef106e68a393a7e5deed6b368101a9b
%-------------------------------------------------------------------------- % This function takes the D x N data matrix with columns indicating % different data points and project the D dimensional data into the r % dimensional space. Different types of projections are possible: % (1) Projection using PCA % (2) Project...
github
ambarpal/3d-hough-master
SpectralClustering.m
.m
3d-hough-master/code/vidal/SSC_CVX/SpectralClustering.m
2,037
utf_8
fa07e79a2d0dd4c5b0919934bbd7c796
%-------------------------------------------------------------------------- % This function takes a NxN matrix CMat as adjacency of a graph and % computes the segmentation of data from spectral clustering. % CMat: NxN adjacency matrix % n: number of groups for segmentation % K: number of largest coefficients to choose...
github
ambarpal/3d-hough-master
OutlierDetection.m
.m
3d-hough-master/code/vidal/SSC_CVX/OutlierDetection.m
1,322
utf_8
b6f1a1dc98d866c5be38ea52873cbb09
%-------------------------------------------------------------------------- % This function takes the coefficient matrix resulted from sparse % representation using \ell_1 minimization. If a point cannot be written as % a linear combination of other points, it should be an outlier. The % function detects the indices of...
github
ambarpal/3d-hough-master
ransacfitarbitraryplane.m
.m
3d-hough-master/code/vidal/RANSAC/helper_functions/ransacfitarbitraryplane.m
1,126
utf_8
b6dfe588e6abfe9c862f5bc7788b97bf
function [B,inliers,Borth]=ransacfitarbitraryplane(x,d,t) [K,N]=size(x); if(d>=K) error('Dimension requested for the plane equal or greater than the dimension of the data') end if(N<d) error('Number of points less than the dimension of the hyperplane') end s = 3; % Minimum No of points needed to fit a plan...
github
ambarpal/3d-hough-master
gramsmithorth.m
.m
3d-hough-master/code/vidal/RANSAC/helper_functions/gramsmithorth.m
303
utf_8
bac0b1b0bd989cf218054231c4156017
%function y=gramsmithorth(x) % Returns Y the Gram-Smith orthogonalization of the colums of X % Y and X have the same dimensions function y=gramsmithorth(x) [K,D]=size(x); I=eye(K); y=x(:,1)/norm(x(:,1)); for(i=2:D) newcol=(I-y*y')*x(:,i); newcol=newcol/norm(newcol); y=[y newcol]; end
github
ambarpal/3d-hough-master
ransac.m
.m
3d-hough-master/code/vidal/RANSAC/helper_functions/ransac.m
7,904
utf_8
7847ae59e99503f67c783cf8b6735f5c
% RANSAC - Robustly fits a model to data with the RANSAC algorithm % % Usage: % % [M, inliers] = ransac(x, fittingfn, distfn, degenfn s, t, feedback) % % Arguments: % x - Data sets to which we are seeking to fit a model M % It is assumed that x is of size [d x Npts] % where d...
github
ambarpal/3d-hough-master
cheegerpartition.m
.m
3d-hough-master/code/vidal/LSA/helper_functions/cheegerpartition.m
540
utf_8
805fd3f3628a368e8e290d864080c6c7
%evaluates the cheeger constant for a given partition function h=cheegerpartition(group,simMat); d=sum(simMat,2); %grade of each node (sum of distances on the row) [IcutA,IcutB]=meshgrid(group-1,2-group); %bool that indicates if a group is connected to A and/or B IcutAB=and(IcutA,IcutB); ...
github
ambarpal/3d-hough-master
evaluatenormalcut.m
.m
3d-hough-master/code/vidal/LSA/helper_functions/evaluatenormalcut.m
875
utf_8
632d9c3976c06872e169c6341f601334
%evaluates the normal cut function % group is a vector of zeros and ones that indicates the two partitions % simMat is the similarity matrix function cost=evaluatenormalcut(group,simMat); d=sum(simMat,2); %grade of each node (sum of distances on the row) assocA=sum(d(find(group==0))...
github
ambarpal/3d-hough-master
spectralcluster.m
.m
3d-hough-master/code/vidal/LSA/helper_functions/spectralcluster.m
765
utf_8
bb76077d06ddfb666bba7353094f70c1
% affmat is the affinity matrix A % k is the number of largest eigenvectors in matrix L % num_class is the number of classes %diagmat is the diagonal matrix D^(-0.5) % Lmat is the matrix L %X and Y ar matrices formed from eigenvectors of L % IDX is the clustering results % errorsum is the distance from kmeans functio...
github
ambarpal/3d-hough-master
gramsmithorth.m
.m
3d-hough-master/code/vidal/LSA/helper_functions/gramsmithorth.m
303
utf_8
bac0b1b0bd989cf218054231c4156017
%function y=gramsmithorth(x) % Returns Y the Gram-Smith orthogonalization of the colums of X % Y and X have the same dimensions function y=gramsmithorth(x) [K,D]=size(x); I=eye(K); y=x(:,1)/norm(x(:,1)); for(i=2:D) newcol=(I-y*y')*x(:,i); newcol=newcol/norm(newcol); y=[y newcol]; end
github
ambarpal/3d-hough-master
spectralclusternormalcut_recursive.m
.m
3d-hough-master/code/vidal/LSA/helper_functions/spectralclusternormalcut_recursive.m
1,002
utf_8
0717854da603614e0d716528bf36f589
%function group=spectralclusternormalcut_recursive(n,simMat) %n final number of cluster %simMat similarity matrix function group=spectralclusternormalcut_recursive(n,simMat) %trivial case with 1 cluster if(n==1) group=ones(size(simMat,1),1); end %initial bipartition with spectral clustering group=spectralclust...
github
ambarpal/3d-hough-master
ndstest.m
.m
3d-hough-master/code/resources/ndstest.m
28,392
utf_8
67f6679514ef3396ec0655aebabd626b
function varargout=ndstest(TOL) %Performs numerous tests of ndSparse math operations, % % ndstest(TOL) % %TOL is a tolerance value on the percent error. Execution will pause in debug %mode for inspection if any one of the tests exhibits an error greater than %TOL. if nargin<1 TOL=inf; %default tolerance value on di...
github
ambarpal/3d-hough-master
ndSparse.m
.m
3d-hough-master/code/resources/ndSparse.m
83,713
windows_1250
84fb8aad8ef9db370bdf9a8ee89a566a
classdef ndSparse %ndSparse - A class of N-dimensional sparse arrays. % % by Matt Jacobson % % Copyright, Xoran Technologies, Inc. 2010 % % % USAGE: % % S=ndSparse(X) where X is an ordinary MATLAB sparse matrix converts X into % an ndSparse object. S can be reshaped into an N-dimensional sparse array using %...
github
ambarpal/3d-hough-master
meshReduce.m
.m
3d-hough-master/code/resources/geom3d/meshes3d/meshReduce.m
9,863
utf_8
fe0668cc856377deaeeb38dfce52916d
function varargout = meshReduce(nodes, varargin) %MESHREDUCE Merge coplanar faces of a polyhedral mesh % % Note: deprecated, should use "mergeCoplanarFaces" instead % % [NODES FACES] = meshReduce(NODES, FACES) % [NODES EDGES FACES] = meshReduce(NODES, EDGES, FACES) % NODES is a set of 3D points (as a Nn-by-3 ar...
github
ambarpal/3d-hough-master
meshSurfaceArea.m
.m
3d-hough-master/code/resources/geom3d/meshes3d/meshSurfaceArea.m
1,881
utf_8
cb41ab6d25b207c9d6858e95e7cb65b6
function area = meshSurfaceArea(vertices, edges, faces) %MESHSURFACEAREA Surface area of a polyhedral mesh % % S = meshSurfaceArea(V, F) % S = meshSurfaceArea(V, E, F) % Computes the surface area of the mesh specified by vertex array V and % face array F. Vertex array is a NV-by-3 array of coordinates. % Fac...
github
ambarpal/3d-hough-master
mergeCoplanarFaces.m
.m
3d-hough-master/code/resources/geom3d/meshes3d/mergeCoplanarFaces.m
10,111
utf_8
28a4d5c9c038ed1d5250c1babe495a14
function varargout = mergeCoplanarFaces(nodes, varargin) %MERGECOPLANARFACES Merge coplanar faces of a polyhedral mesh % % [NODES FACES] = mergeCoplanarFaces(NODES, FACES) % [NODES EDGES FACES] = mergeCoplanarFaces(NODES, EDGES, FACES) % NODES is a set of 3D points (as a nNodes-by-3 array), % and FACES is one ...
github
ambarpal/3d-hough-master
loadCalibrationCamToCam.m
.m
3d-hough-master/code/kitti/devkit/matlab/loadCalibrationCamToCam.m
1,894
utf_8
88db832a2338f205ea36b1a9f6231aed
function calib = loadCalibrationCamToCam(filename) % open file fid = fopen(filename,'r'); if fid<0 calib = []; return; end % read corner distance calib.cornerdist = readVariable(fid,'corner_dist',1,1); % read all cameras (maximum: 100) for cam=1:100 % read variables S_ = readVariable(fid,['S_' num2s...
github
ambarpal/3d-hough-master
loadCalibrationRigid.m
.m
3d-hough-master/code/kitti/devkit/matlab/loadCalibrationRigid.m
855
utf_8
9148661cd7335b41dace4f57bd25b3a4
function Tr = loadCalibrationRigid(filename) % open file fid = fopen(filename,'r'); if fid<0 error(['ERROR: Could not load: ' filename]); end % read calibration R = readVariable(fid,'R',3,3); T = readVariable(fid,'T',3,1); Tr = [R T;0 0 0 1]; % close file fclose(fid); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%...
github
klabhub/neurostim-master
neurostimEyelinkDispatchCallback.m
.m
neurostim-master/tools/neurostimEyelinkDispatchCallback.m
15,643
utf_8
c7d9904414993935728029312255f618
function rc = neurostimEyelinkDispatchCallback(callArgs, msg) % Retrieve live eye-image from Eyelink, show it in onscreen window. % % This function is normally called from within the Eyelink() mex file. % Normal user code only calls it once to supply the eyelink defaults struct. % This is handled within the EyelinkInit...
github
klabhub/neurostim-master
testingGetDelay.m
.m
neurostim-master/tools/testingGetDelay.m
1,777
utf_8
21b2c3c5f5492f58b8b1c9a4577e9a82
function testingGetDelay %Script shows 3 ways of creating a cic and adding a plugin. All seem like %they SHOULD be equivalent, but show vastly different delays in reading basic properties. import neurostim.* commandwindow; elapsed = zeros(200,1); %Approach 1: disp('*** Approach 1 (cic and plugin created locally):');...
github
klabhub/neurostim-master
starstimClosedLoopDemo.m
.m
neurostim-master/demos/starstimClosedLoopDemo.m
3,942
utf_8
93ff80be0016f2bf9c50c370728d3ccb
function starstimClosedLoopDemo % Shows how a closed loop paradigm with stimulation and eeg can be setup. % See also starstimDemo for stimulation only examples % % BK - Jan 2019 import neurostim.*; %% Setup CIC and the stimuli. c = myRig('debug',true); c.screen.colorMode = 'RGB'; % Allow specification of RGB luminanc...
github
klabhub/neurostim-master
contrastDetection.m
.m
neurostim-master/demos/contrastDetection.m
2,153
utf_8
ac9eb652fd1eac08b423d3cdfd354b40
function contrastDetection % Contrast detection experiment. % Shows Gabor patches in random locations, user is required to click on % them %% Prerequisites. import neurostim.* %% Setup CIC and the stimuli. c = myRig; c.trialDuration = Inf; % A trial can only be ended by a mouse click c.cursor = 'arrow'; c.scree...
github
klabhub/neurostim-master
noiseGridDemo.m
.m
neurostim-master/demos/noiseGridDemo.m
5,188
utf_8
fe420a84a6592c8b9c15729d3f6e10f2
function noiseGridDemo(varargin) % These demos show how to present a grid of luminance/color noise, for reverse % correlation analysis and/or signal-in-noise detection tasks. % Demonstrates: % - how to make use of Matlab's built-in sampling distributions % - Different types of grid (Cartesian, polar grid...
github
klabhub/neurostim-master
scripting.m
.m
neurostim-master/demos/scripting.m
3,314
utf_8
97a1b2cdb992ee4dad281c93b26c33f1
function c= scripting %% This demo shows how to use control scripts. import neurostim.* %% Setup CIC and the stimuli. c = myRig; % We'll use experiment scripts to control this experiment. One is called before % every frame and it is specified in a separate m-file that should be on % the pat...
github
klabhub/neurostim-master
textureDemo.m
.m
neurostim-master/demos/textureDemo.m
5,504
utf_8
5e4ffd5686b1d34df18fbb7fbc138e8b
function textureDemo(varargin) % TEXTUREDEMO demo of the texture stimulus plugin. % TEXTUREDEMO([NUM][,NAME1,VALUE1]) runs demo NUM with the supplied % options (given as a list of name-value pairs). % % NUM defines the demo to run (Default: 1). % % Available options are: % RSVP - TRUE or FALSE, enables an r...
github
klabhub/neurostim-master
DataHash.m
.m
neurostim-master/+neurostim/+utils/DataHash.m
20,971
utf_8
d95b10498af264538a911ca227ab3467
function Hash = DataHash(Data, varargin) % DATAHASH - Checksum for Matlab array of any type % This function creates a hash value for an input of any type. The type and % dimensions of the input are considered as default, such that UINT8([0,0]) and % UINT16(0) have different hash values. Nested STRUCTs and CELLs are par...
github
darenlee/SimulinkARDroneTarget-master
createFit_Automate.m
.m
SimulinkARDroneTarget-master/AR_Drone_Models/Calibration/GyrometerTemp_Offset_Calib/createFit_Automate.m
1,019
utf_8
083216c20de042d99544edbeef35299c
% Copyright 2014 The MathWorks, Inc. function [fitresult, gof] = createFit_Automate(TempMeasureRefined, GyroDrift_Roll,PlotName) %CREATEFIT(TEMPMEASUREREFINED,GYRODRIFT_ROLL) % Create a fit. % % Data for 'CurveFit_Bias' fit: % X Input : TempMeasureRefined % Y Output: GyroDrift_Roll % Output: % ...
github
darenlee/SimulinkARDroneTarget-master
plot_and_calibrate_mag.m
.m
SimulinkARDroneTarget-master/AR_Drone_Models/Calibration/Magnetometer_calib/plot_and_calibrate_mag.m
4,175
utf_8
17fec1e72e61054c2d3395700d4e4ddf
% Copyright 2014 The MathWorks, Inc. function MagCurveFit_Results_Struct = plot_and_calibrate_mag(MagData) close all Mag_3d = MagData.signals.values; Mag_X = Mag_3d(:,1); Mag_Y = Mag_3d(:,2); Mag_Z = Mag_3d(:,3); shiftx = 1; shifty = 2; shiftz = 3; % scatter(Mag_X,Mag_Z) plot3(Mag_X,Mag_Y,Mag_Z, '.r'...
github
darenlee/SimulinkARDroneTarget-master
ellipsoid_fit.m
.m
SimulinkARDroneTarget-master/AR_Drone_Models/Calibration/Magnetometer_calib/ellipsoid_fit.m
4,929
utf_8
f2290af354b9dc4e1d9146bd321f3d65
% Copyright 2014 The MathWorks, Inc. function [ center, radii, evecs, v ] = ellipsoid_fit( X, flag, equals ) % % Fit an ellispoid/sphere to a set of xyz data points: % % [center, radii, evecs, pars ] = ellipsoid_fit( X ) % [center, radii, evecs, pars ] = ellipsoid_fit( [x y z] ); % [center, radii, evecs, p...
github
darenlee/SimulinkARDroneTarget-master
Calibrating_The_AR_Drone_Sensors.m
.m
SimulinkARDroneTarget-master/AR_Drone_Models/Calibration_Models/GUI_Source/Calibrating_The_AR_Drone_Sensors.m
21,463
utf_8
c12b3acbce449993c9a7c023f36ad9b3
function varargout = Calibrating_The_AR_Drone_Sensors(varargin) % calibrating_the_ar_drone_sensors MATLAB code for Calibrating_The_AR_Drone_Sensors.fig % calibrating_the_ar_drone_sensors, by itself, creates a new calibrating_the_ar_drone_sensors or raises the existing % singleton*. % % H = calibrating_th...
github
darenlee/SimulinkARDroneTarget-master
sl_customization.m
.m
SimulinkARDroneTarget-master/AR_Drone_Target/sl_customization.m
1,779
utf_8
a2a53f0e626acf4a7bab0f853e697875
% Copyright 2014 The MathWorks, Inc. function sl_customization(cm) %SL_CUSTOMIZATION Register individual targets with Coder Target % Copyright 2013 The MathWorks, Inc. cm.registerTargetRegistry(@loc_registerThisTarget); cm.registerTargetBoardRegistry(@loc_registerBoardsForThisTarget); cm.registerTargetInfo(...
github
darenlee/SimulinkARDroneTarget-master
gcc_codesourcery_arm_linux_gnueabihf.m
.m
SimulinkARDroneTarget-master/AR_Drone_Target/registry/gcc_codesourcery_arm_linux_gnueabihf.m
6,348
utf_8
7d5ff3a7b54eb103bb1268ecfc0cdd52
% Copyright 2014 The MathWorks, Inc. function [tc, results] = gcc_codesourcery_arm_linux_gnueabihf() %gcc_codesourcery_arm_linux_gnueabihf % Copyright 2013 The MathWorks, Inc. toolchain.Platforms = {'win64', 'win32'}; toolchain.Versions = {'4.8'}; toolchain.Artifacts = {'gmake'}; toolchain.FuncHandle = s...
github
darenlee/SimulinkARDroneTarget-master
rtwTargetInfo.m
.m
SimulinkARDroneTarget-master/AR_Drone_Target/registry/rtwTargetInfo.m
1,256
utf_8
948ec9b0e1a40e8008de8c0ea2eb3f7e
% Copyright 2014 The MathWorks, Inc. function rtwTargetInfo(tr) %RTWTARGETINFO Register toolchain % Copyright 2013 The MathWorks, Inc. tr.registerTargetInfo(@loc_createToolchain); end %-------------------------------------------------------------------------- function config = loc_createToolchain rootDir =...
github
darenlee/SimulinkARDroneTarget-master
slblocks.m
.m
SimulinkARDroneTarget-master/AR_Drone_Target/blocks/slblocks.m
399
utf_8
993da7a5a7cf39287a9b3cd0f82fac39
% Copyright 2014 The MathWorks, Inc. function blkStruct = slblocks blkStruct.Name = 'AR Drone 2 Library Blocks'; %Display name blkStruct.OpenFcn = 'AR_Drone_2_Library'; %Library name blkStruct.MaskDisplay = ''; Browser(1).Library = 'AR_Drone_2_Library'; %Library name % Copyright 2010 The MathWorks, Inc. Br...
github
darenlee/SimulinkARDroneTarget-master
check_init_block.m
.m
SimulinkARDroneTarget-master/AR_Drone_Target/blocks/check_init_block.m
281
utf_8
99533c92a69714d01b45af1f505f713c
% Copyright 2014 The MathWorks, Inc. function check_init_block persistent x; if(isempty(x)) msgbox('Both the Actuator and the LED blocks need the Init_Actuator block to work properly. Add this block to the model. It is part of the AR Drone 2 Target library'); x=0; end end
github
darenlee/SimulinkARDroneTarget-master
ARDroneVideoViewer.m
.m
SimulinkARDroneTarget-master/AR_Drone_Target/blocks/ARDroneVideoViewer.m
2,825
utf_8
0b4b6317f3947375f0b3ed44e918f30b
function ARDroneVideoViewer(block) % Level-2 MATLAB file S-Function for unit delay demo. % Copyright 1990-2009 The MathWorks, Inc. setup(block); %endfunction function setup(block) %% Register number of input and output ports block.NumInputPorts = 1; block.NumOutputPorts = 0; block.Num...
github
darenlee/SimulinkARDroneTarget-master
rtwmakecfg.m
.m
SimulinkARDroneTarget-master/AR_Drone_Target/blocks/rtwmakecfg.m
10,187
utf_8
95b7808279ac005162c40088f1c332bd
% Copyright 2014 The MathWorks, Inc. function makeInfo = rtwmakecfg() %RTWMAKECFG adds include and source directories to the make files. % makeInfo=RTWMAKECFG returns a structured array containing build info. % Please refer to the rtwmakecfg API section in the Simulink Coder % documentation for details on th...
github
darenlee/SimulinkARDroneTarget-master
RGBDroneVideoViewer.m
.m
SimulinkARDroneTarget-master/AR_Drone_Target/blocks/RGBDroneVideoViewer.m
1,373
utf_8
46904fb6114d94061cd8357355715fdc
function RGBDroneVideoViewer(block) % Level-2 MATLAB file S-Function for unit delay demo. % Copyright 1990-2009 The MathWorks, Inc. setup(block); %endfunction function setup(block) %% Register number of input and output ports block.NumInputPorts = 3; block.NumOutputPorts = 0; block.Nu...
github
darenlee/SimulinkARDroneTarget-master
onAfterCodeGen.m
.m
SimulinkARDroneTarget-master/AR_Drone_Target/+codertarget/+arm_cortex_a_drone/+internal/onAfterCodeGen.m
2,467
utf_8
6af59e625dd732487a70f7b9a8060938
function onAfterCodeGen(hCS, buildInfo) %ONAFTERCODEGEN Hook point for after code generation % Copyright 2013-2104 The MathWorks, Inc. if ~isequal(get_param(hCS, 'PositivePriorityOrder'), 'on') error('You have probably recently updated your AR Drone 2.0 Coder Target with the new UDP blocks. A new change has been m...
github
darenlee/SimulinkARDroneTarget-master
my_function.m
.m
SimulinkARDroneTarget-master/AR_Drone_Target/+codertarget/+arm_cortex_a_drone/+internal/my_function.m
254
utf_8
8a4c502a6f3e7d03b5b36aada9170bcf
% Copyright 2014 The MathWorks, Inc. function my_function() ab = getActiveConfigSet(bdroot); %was gcs but this is not the best method IP_String = codertarget.data.getParameterValue(ab,'IP'); setenv('AR_DRONE_IP_ADDRESS',IP_String) end
github
space-physics/glowaurora-master
glow.m
.m
glowaurora-master/glow.m
1,233
utf_8
1cab8da653572188740c9ab2c1dd442d
function glow() % quick demo calling GLOW model from Matlab. % https://www.scivision.co/matlab-python-user-module-import/ flux = 1; % [erg ...] E0 = 1e3; % [eV] glat = 65.1; glon = -147.5; t = '2015-12-13T10'; G = py.glowaurora.runglowaurora(flux, E0, t, glat, glon); ver = xarray2mat(G(1)); z_km = xarrayind2vec...
github
pins-ocs/TS-OCS-master
ArmijoSimpleSearch.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/scripts/ArmijoSimpleSearch.m
1,890
utf_8
95f86a8ca27f5241d988084ed0490974
% % Perform Armijo Line Search % % the input are % fun = the function to minimize with the derivative of the function % xk = starting point % d = search direction % % optional extra arguments % % tau = 0.5 reduction parameter for Armijo algorithm % c1 = 10-3 parameter for Armijo test % f...
github
pins-ocs/TS-OCS-master
TRESNEI.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/scripts/TRESNEI.m
31,349
utf_8
3e226638573a9390e8dc49cfc05e6360
function [sol,ierr,output] = TRESNEI(x,e_i,fun,l,u,options,varargin) % TRESNEI solves systems of nonlinear equalities and inequalities % % TRESNEI implements a trust-region Gauss-Newton method for % bound-constrained least-squares problem: % % min || F(x...
github
pins-ocs/TS-OCS-master
ArmijoLineSearch.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/scripts/ArmijoLineSearch.m
3,728
utf_8
db79568e5de7cdf8ac158d2ee752b46c
% % Perform Armijo Line Search % the input are % fun = the function to minimize with the derivative of the function % xk = starting point % d = search direction % % optional extra arguments % % tau = 0.5 reduction parameter for Armijo algorithm % c1 = 10-3 parameter for Armijo test % f0 ...
github
pins-ocs/TS-OCS-master
parseArgs.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/scripts/parseArgs.m
1,494
utf_8
0abfa36a0c9f5a084c36b335558b4d48
% Copyright (C) 2011 Enrico Bertolazzi % % This program is free software; you can redistribute it and/or % modify it under the terms of the GNU General Public License % as published by the Free Software Foundation; either version 2 % of the License, or (at your option) any later version. % % This program ...
github
pins-ocs/TS-OCS-master
WolfeLineSearch.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/scripts/WolfeLineSearch.m
4,961
utf_8
890d3c7385db59610cf324db2510b302
% % Perform Wolfe Line Search % % the input are % fun = the function to minimize with the derivative of the function % xk = starting point % d = search direction % % optional extra arguments % % tau = 0.5 reduction parameter for Armijo algorithm % c1 = 10E-3 parameter for Wolfe test % c2 ...
github
pins-ocs/TS-OCS-master
NewtonNonlinear.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/scripts/NewtonNonlinear.m
1,989
utf_8
aea7b28f6f066f25e0274bca31b8cce7
function [xk,fk,niter,ierr] = NewtonNonlinear( fun, X0, varargin ) global NewtonNonlinear_fun ; ierr = 0 ; NewtonNonlinear_fun = fun ; opts = { 'tol', 'linesearch', 'maxiter', 'c1', 'c2', 'tau', 'lmin', 'lmax', 'plotstep' } ; defs = { 1E-8, 1, 100, 1E-3, 0.5, 0.5, 1E-8, 1E+8, @plot...
github
pins-ocs/TS-OCS-master
direct_method_plot_solution.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/direct_method_plot_solution.m
1,303
utf_8
08658de370e34d8c4a04219f8b9731a8
%% Compute NLP solution with IPOPT % % This function computes the numerical solution of the optimal control problem % as a direct transcription problem (NLP) and unsing IPOPT Optimizer. % % See the paper for model details. % % Input parameters: % N number of grid points % p_data structure w...
github
pins-ocs/TS-OCS-master
direct_method_constraints.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/direct_method_constraints.m
826
utf_8
7ff4f18246f3806015fc3cb7d312dbd0
% % discretization of the constraints for the Direct Method Eqns. (27) % % (x[k+1]-x[k])/h-v[k+1/2] = 0 % (v[k+1]-v[k])/h-u[k+1/2]-k0-k1*v[k+1/2]-k2*v[k+1/2]^2 = 0 % x[0] = 0, v[0] = 0, v[N+1] = 0 % -1 <= u/(g+k3*v[k+1/2]^2) <= 1 % function f = direct_method_constraints(z,auxdata) % split vector z into z, v, an...
github
pins-ocs/TS-OCS-master
indirect_method_JF_pattern.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/indirect_method_JF_pattern.m
1,300
utf_8
db28a413812df79fc2ac520cecb6bded
%% % map the indices with the corresponding index in the spase matrix function jac = JfunPattern(auxdata) N = auxdata.N ; nvars = auxdata.nvars ; % calcolo f(z) sx = 0 ; sv = sx+N+1 ; sl = sv+N+1 ; sm = sl+N+1 ; nnz = 16*N+4 ; I = zeros(nnz,1) ; J = zeros(nnz,1) ; eq = 0 ; nz = 0 ; ...
github
pins-ocs/TS-OCS-master
direct_method_gradient.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/direct_method_gradient.m
539
utf_8
b9cc241f8e2e1643d0ab2ab294c48c1c
% % discretization of the constraints for the Direct Method Eqns. (27) % % sum (v[k+1]+v[k])/2 % function grad = direct_method_gradient(z,auxdata) % split vector z into z, v, and u part Eqns. (28) [x,v,u] = direct_method_extract_xvu(z,auxdata) ; N = auxdata.N ; nvars = auxdata.nvars ; % z = [ x, v, u...
github
pins-ocs/TS-OCS-master
test_indirect_method_with_matlab.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/test_indirect_method_with_matlab.m
1,137
utf_8
bf158d4865d2f4ce40d5f3144e93ab45
function [z,elapsed,ok] = test_indirect_method_with_matlab(auxdata_in) global NF_eval NJF_eval auxdata ; auxdata = auxdata_in ; NF_eval = 0 ; NJF_eval = 0 ; % compute guess solution z0 = indirect_method_guess_solution( auxdata ) ; opt = optimoptions('lsqnonlin','Display','iter', ... ...
github
pins-ocs/TS-OCS-master
indirect_method_guess_solution.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/indirect_method_guess_solution.m
451
utf_8
dc3b23d0826a7eff1f561f81823f57cc
%% % discretization of dynamical system % function z = indirect_method_guess_solution(auxdata) % step T_size = auxdata.T_size ; N = auxdata.N ; g = auxdata.g ; h = T_size/N ; k0 = auxdata.k0 ; k1 = auxdata.k1 ; k2 = auxdata.k2 ; k3 = auxdata.k3 ; x = zer...
github
pins-ocs/TS-OCS-master
direct_method_constraints_jacobian.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/direct_method_constraints_jacobian.m
2,309
utf_8
ff95b0c886deeb5c9270204b552f6040
% % discretization of the constraints for the Direct Method Eqns. (29-34) % % (x[k+1]-x[k])/h-v[k+1/2] = 0 % (v[k+1]-v[k])/h-u[k+1/2]-k0-k1*v[k+1/2]-k2*v[k+1/2]^2 = 0 % x[0] = 0, v[0] = 0, v[N+1] = 0 % g+k3*v[k+1/2]^2+u >= 0 % g+k3*v[k+1/2]^2-u >= 0 % Jacobian of cosntraints functions % % function jac = direct_m...
github
pins-ocs/TS-OCS-master
test_direct_method_with_ipopt.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/test_direct_method_with_ipopt.m
2,473
utf_8
eeb6a033f84ab16d6eafa94c4f2f821d
%% Compute NLP solution with IPOPT % % This function computes the numerical solution of the optimal control problem % as a direct transcription problem (NLP) and unsing IPOPT Optimizer. % % See the paper for model details. % % Input parameters: % N number of grid points % p_data structure w...
github
pins-ocs/TS-OCS-master
direct_method_constraints_jacobian_pattern.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/direct_method_constraints_jacobian_pattern.m
1,381
utf_8
7cfaec5d7c3d2b5a06ffa5abe7d688ea
%% % discretization of dynamical system % function jac = direct_method_constraints_jacobian_pattern(auxdata) % step T_size = auxdata.T_size ; N = auxdata.N ; nvars = auxdata.nvars ; % non zeros elements of sparse jacobian nnz = 10*N+3 ; I = zeros(1,nnz) ; J = zeros(1,nnz) ; VAL = zeros(1,...
github
pins-ocs/TS-OCS-master
indirect_method_u_Dmu.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/indirect_method_u_Dmu.m
510
utf_8
29c8aa050f07479adbb2e2e7a1b42d16
%% % map the indices with the corresponding index in the spase matrix function DuDmu = indirect_method_u_Dmu(z,auxdata) g = auxdata.g ; k3 = auxdata.k3 ; epsilon = auxdata.epsilon ; N = auxdata.N ; % calcolo f(z) sx = 0 ; sv = sx+N+1 ; sl = sv+N+1 ; sm = sl+N+1 ; su = sm+N+1 ; ...
github
pins-ocs/TS-OCS-master
direct_method_guess_solution.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/direct_method_guess_solution.m
391
utf_8
216e4848d365f2e530c0415ef3634222
%% % discretization of dynamical system % function z = direct_method_guess_solution(auxdata) % step T_size = auxdata.T_size ; N = auxdata.N ; g = auxdata.g ; h = T_size/N ; k0 = auxdata.k0 ; k1 = auxdata.k1 ; k2 = auxdata.k2 ; k3 = auxdata.k3 ; x = zeros(N+1,...
github
pins-ocs/TS-OCS-master
direct_method_save_solution.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/direct_method_save_solution.m
2,119
utf_8
66c6208624391619abc5095c0cca8751
%% Compute NLP solution with IPOPT % % This function computes the numerical solution of the optimal control problem % as a direct transcription problem (NLP) and unsing IPOPT Optimizer. % % See the paper for model details. % % Input parameters: % N number of grid points % p_data structure w...
github
pins-ocs/TS-OCS-master
indirect_method_auxdata.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/indirect_method_auxdata.m
441
utf_8
c7bf8b3cffba0d24a9a2a0d6d989a06e
%% % Setup data structure for computation % function auxdata = indirect_method_auxdata(N,p_data) auxdata.N = N ; auxdata.nvars = 4*N+4 ; auxdata.g = p_data.g ; auxdata.T_size = p_data.T_size ; % final time auxdata.h = auxdata.T_size/auxdata.N ; auxdata.k0 = p_data.k0 ; auxda...
github
pins-ocs/TS-OCS-master
direct_method_hessian_pattern.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/direct_method_hessian_pattern.m
1,254
utf_8
ebad160a30dd1dcfa1515fafee17b505
% % discretization of the constraints for the Direct Method Eqns. (29-34) % % hessian objective(z) + sum lambda(k) * hessian constraint[k](z) % % The hessian of objective is zero % % The hessian of constaints: (x[k+1]-x[k])/h-v[k+1/2] is 0 % The hessian of constaints: (v[k+1]-v[k])/h-u[k+1/2]-k0-k1*v[k+1/2]-k2*v[k...
github
pins-ocs/TS-OCS-master
direct_method_objective.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/direct_method_objective.m
313
utf_8
d6311449d771d3ca216248ad345b5701
% % discretization of the constraints for the Direct Method Eqns. (27) % % sum (v[k+1]+v[k])/2 % function f = direct_method_objective(z,auxdata) % split vector z into z, v, and u part Eqns. (28) [x,v,u] = direct_method_extract_xvu(z,auxdata) ; vave = (v(2:end)+v(1:end-1))/2 ; f = -sum(vave) ; end
github
pins-ocs/TS-OCS-master
direct_method_hessian.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/direct_method_hessian.m
1,173
utf_8
03a8d97ab909e8e8e30c6513b4280d5d
% % discretization of the constraints for the Direct Method Eqns. (29-34) % % hessian objective(z) + sum lambda(k) * hessian constraint[k](z) % % function jac = direct_method_hessian(z,sigma,lambda,auxdata) % step N = auxdata.N ; nvars = auxdata.nvars ; h = auxdata.h ; k2 = auxdata.k2 ; k3 ...
github
pins-ocs/TS-OCS-master
direct_method_extract_xvu.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/direct_method_extract_xvu.m
901
utf_8
7379dcdb84980ab822b28cc5b7ab9dc5
%% % discretization of dynamical system % function [x,v,u,varargout] = direct_method_extract_xvu(z,auxdata) % map x, v, lambda, mu, u from vector z N = auxdata.N ; T_size = auxdata.T_size ; h = T_size/N ; start_v = N+1 ; start_u = start_v+N+1 ; x = z(1:N+1) ; v = z(start_v+(1:N+1)) ; u = z...
github
pins-ocs/TS-OCS-master
test_direct_method_with_matlab.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/test_direct_method_with_matlab.m
1,389
utf_8
3b04f71f72226b0426d321f0bf8d3167
function [z,elapsed,ok] = test_direct_method_with_matlab(auxdata_in) global NF_eval NJF_eval auxdata ; auxdata = auxdata_in ; NF_eval = 0 ; NJF_eval = 0 ; [lb,ub,cl,cu] = direct_method_bound(auxdata) ; % compute guess solution z0 = direct_method_guess_solution( auxdata ) ; opt = optimoptions('f...
github
pins-ocs/TS-OCS-master
indirect_method_save_solution.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/indirect_method_save_solution.m
2,135
utf_8
a75136f745645804ac1949f61e3bcdca
%% Compute NLP solution with IPOPT % % This function computes the numerical solution of the optimal control problem % as a direct transcription problem (NLP) and unsing IPOPT Optimizer. % % See the paper for model details. % % Input parameters: % N number of grid points % p_data structure w...
github
pins-ocs/TS-OCS-master
indirect_method_plot_solution.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/indirect_method_plot_solution.m
1,315
utf_8
ff816e1d58f59e1fd8bd81de53acc7c9
%% Compute NLP solution with IPOPT % % This function computes the numerical solution of the optimal control problem % as a direct transcription problem (NLP) and unsing IPOPT Optimizer. % % See the paper for model details. % % Input parameters: % N number of grid points % p_data structure w...
github
pins-ocs/TS-OCS-master
indirect_method_u_eval.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/indirect_method_u_eval.m
507
utf_8
134de39b44a3aa1670dc5cb8a1c7d3e3
%% % map the indices with the corresponding index in the spase matrix function u = indirect_method_u_eval(z,auxdata) g = auxdata.g ; k3 = auxdata.k3 ; epsilon = auxdata.epsilon ; N = auxdata.N ; % calcolo f(z) sx = 0 ; sv = sx+N+1 ; sl = sv+N+1 ; sm = sl+N+1 ; v = z(sv+1:sl) ; ...
github
pins-ocs/TS-OCS-master
direct_method_auxdata.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/direct_method_auxdata.m
517
utf_8
024cc09109cc25e97ae448e0e747332b
%% % Setup data structure for computation % function auxdata = direct_method_auxdata(N,p_data) nvars = 3*N+2 ; nconts = 4*N+3 ; % x, v, u min, u max, BC auxdata.N = N ; auxdata.nvars = nvars ; auxdata.nconts = nconts ; auxdata.g = p_data.g ; auxdata.T_size = p_data....
github
pins-ocs/TS-OCS-master
direct_method_bound.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/direct_method_bound.m
340
utf_8
5e668060dedba9759c959360ce0f23ee
%% % discretization of dynamical system % function [lb,ub,cl,cu] = direct_method_bound(auxdata) N = auxdata.N ; lb = [ -Inf*ones(2*(N+1),1) ; -Inf*ones(N,1) ] ; ub = [ Inf*ones(2*(N+1),1) ; Inf*ones(N,1) ] ; cl = [ zeros(2*N+3,1) ; zeros(2*N,1) ] ; % 2*N+3 equality constraints cu = [ zeros(2*N+3,1) ; Inf*...
github
pins-ocs/TS-OCS-master
test_indirect_method_with_strscne.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/test_indirect_method_with_strscne.m
1,076
utf_8
6683e7f1363481bf3434248c7a276ef2
function [z,elapsed,ok] = test_indirect_method_with_strscne(auxdata_in) global auxdata ; addpath('../scripts') ; auxdata = auxdata_in ; % compute guess solution z0 = indirect_method_guess_solution( auxdata ) ; % compute guess solution lb = -1000*ones(auxdata.nvars,1) ; ub = 1000*ones(auxdata.nva...
github
pins-ocs/TS-OCS-master
indirect_method_f_model.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/indirect_method_f_model.m
263
utf_8
e77b33a93e59602367f493cbb82954ac
%% % map the indices with the corresponding index in the spase matrix function varargout = indirect_method_f_model(z) global auxdata ; varargout{1} = indirect_method_F(z,auxdata) ; if nargout > 1 varargout{2} = indirect_method_JF(z,auxdata) ; end end
github
pins-ocs/TS-OCS-master
indirect_method_JF.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/indirect_method_JF.m
2,203
utf_8
35a42127406704cdf0a79e1f90e6d679
%% % map the indices with the corresponding index in the spase matrix function jac = Jfun(z,auxdata) N = auxdata.N ; h = auxdata.h ; k1 = auxdata.k1 ; k2 = auxdata.k2 ; nvars = auxdata.nvars ; % calcolo f(z) sx = 0 ; sv = sx+N+1 ; sl = sv+N+1 ; sm = sl+N+1 ; %x = z(sx+1:sv) ...
github
pins-ocs/TS-OCS-master
indirect_method_extract_xvu.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/indirect_method_extract_xvu.m
973
utf_8
6ac60c6d8c7e9fb418eb5e31a5b18635
%% % discretization of dynamical system % function [x,v,u,lambda,mu,varargout] = indirect_method_extract_xvu(z,auxdata) % map x, v, lambda, mu, u from vector z N = auxdata.N ; T_size = auxdata.T_size ; h = T_size/N ; sx = 0 ; sv = sx+N+1 ; sl = sv+N+1 ; sm = sl+N+1 ; x = z(sx+1:sv) ...
github
pins-ocs/TS-OCS-master
indirect_method_F.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/indirect_method_F.m
762
utf_8
796163b461b2a6c0e734925a48e60151
% % % function f = indirect_method_F(z,auxdata) N = auxdata.N ; h = auxdata.h ; k0 = auxdata.k0 ; k1 = auxdata.k1 ; k2 = auxdata.k2 ; sx = 0 ; sv = sx+N+1 ; sl = sv+N+1 ; sm = sl+N+1 ; x = z(sx+1:sv) ; v = z(sv+1:sl) ; lambda = z(sl+1:sm) ; mu = z(sm+1:sm+N+1) ; u =...
github
pins-ocs/TS-OCS-master
indirect_method_u_Dv.m
.m
TS-OCS-master/Notes_on_Numerical_Methods/point-mass-test/indirect_method_u_Dv.m
641
utf_8
ff6af8d393a370cf55fa94f13e43b71c
%% % map the indices with the corresponding index in the spase matrix function DuDv = indirect_method_u_Dv(z,auxdata) g = auxdata.g ; k3 = auxdata.k3 ; epsilon = auxdata.epsilon ; N = auxdata.N ; % calcolo f(z) sx = 0 ; sv = sx+N+1 ; sl = sv+N+1 ; sm = sl+N+1 ; su = sm+N+1 ; ...
github
CJ-Davies/Crossing-Reality-master
FtspDataAnalyzer.m
.m
Crossing-Reality-master/demo/tinyos-2.1.0/apps/tests/TestFtsp/FtspDataAnalyzer.m
1,814
utf_8
b5321ca4514924c4534deb7594a32166
%load file written out by FtspDataLogger.java class %arg0 - filename, e.g. '1205543689171.report' function FTSPDataAnalyzer(file, varargin) [c1 c2 c3 c4 c5]= textread(file, '%u %u %u %u %u', 'commentstyle', 'shell'); data = [c2 c3 c4 c5]; %skipping the first column (java time) data1 = sortrows(sortrows(data,1),2);...
github
audiofilter/nmflib-master
nmf_kl_con.m
.m
nmflib-master/nmf_kl_con.m
6,532
utf_8
c9cc0b8f5d052f36809c49a2aa5e7d50
function [W,H,errs,vout] = nmf_kl_con(V,r,varargin) % function [W,H,errs,vout] = nmf_kl_con(V,r,varargin) % % Implements Convolutive NMF as described in [1]: % % min D(V||W*H) s.t. W>=0, H>=0 % % where V = sum_t W(t) shift(H,t) and the shift function moves H's columns % t positions to the right (introducing colum...
github
unconditional/projektarbeitcuda-master
idr.m
.m
projektarbeitcuda-master/Doc/IDR/idr.m
6,474
utf_8
c91af7264e9e3dad28e573d7788fda5c
function [x,resvec,iter,err,info]=idrs(A,b,s,tol,maxit,P,x0,Q,angle ); %IDRS Induced Dimension Reduction method % X = IDRS(A,B) attempts to solve the system of linear equations A*X=B % for X. The N-by-N coefficient matrix A must be square and the right hand % side column vector B must have length N. A may...
github
unconditional/projektarbeitcuda-master
Kondensator_Edge.m
.m
projektarbeitcuda-master/reference/src/xby/matlab/AW_ MatrixCreator-Solvertester/Kondensator_Edge.m
2,112
utf_8
fd8d3da1aeb9617abc298a5e93e52057
function [Star,q]=Kondensator_Edge(ngrid) xmin = -0.25; xmax = 0.25; ymin = -0.25; ymax = 0.25; zmin = 0; zmax = 0.01; xbox = 0; ybox = 0; D.nx = ngrid; D.ny = ngrid; D.nz =1; Mx = 1; My = D.nx; Np = D.nx*D.ny; D.xmesh = linspace(xmin, xmax, D.nx); D.ymesh = linspace(ymin, ymax, D.ny); D.zmesh = linspace(...
github
unconditional/projektarbeitcuda-master
nvmex_helper.m
.m
projektarbeitcuda-master/reference/src/Matlab_CUDA_1.1/nvmex_helper.m
8,678
utf_8
95177d5818ea641df37a6453697b13b1
function errorCode = nvmex_helper(varargin) %MEX_HELPER is a helper function that contains the code that MEX.M (an % autogenerated file) executes. It sets up the inputs to call mex.pl (on PC) % and mex (on Unix). % % For information on how to use MEX see MEX help by typing "help mex" or % "mex -h". ...
github
salivian/volsegtree-master
RecursiveSeg.m
.m
volsegtree-master/matlab/RecursiveSeg.m
1,428
utf_8
fba5b89d752a02572ef835433c5931ca
%%% Place this file in and run it from the ncut code directory function SegLabel = RecursiveSeg(I,nbSegments); levels = ceil(log(nbSegments)/log(2)); [W,imageEdges] = ICgraph(I); %%Filter out the zero mask=find(I > 0); LocalW=W(mask,mask); [NcutDiscrete,NcutEigenvectors,NcutEigenvalues] = ncutW(LocalW,2); nsegs=2; ...
github
chiahan/vfx-project1-hdr-master
alignment.m
.m
vfx-project1-hdr-master/program/alignment.m
2,876
utf_8
7878ac3db0a8d106450804e19ffa1f18
% % This function takes two exposure images, and determines how much to move % the second exposure (img2) in x and y to align it with the first exposure % (img1) % % input % g_img: 3 dimensional matrices, represneting the whole gray_image set. % [row, col, i] for i = 1:number of images. % shift_bits: the maximum n...
github
chiahan/vfx-project1-hdr-master
tmoReinhard02.m
.m
vfx-project1-hdr-master/program/tmoReinhard02.m
2,306
utf_8
2d2d87829473c0ee5fa6fa8f28534e51
% % Tone Mapping Operator, by Reinhard 02 paper. % % input: % img: 3 channel HDR img % type_: 'global'(default) or 'local'. % alpha_: scalar constant to specify a high key or low key. (0.18) % delta: scalar constant to prevent log(0). (1e-6) % white_: scalar constant, the smallest luminance to be mapped to 1....
github
chiahan/vfx-project1-hdr-master
readImages.m
.m
vfx-project1-hdr-master/program/readImages.m
1,439
utf_8
2fad8cc24ed0a9e76c2fb0011275fdcf
% % read in several images with different exposures. % % input % folder: folder name containing images. % extension: file extension. default to 'jpg'. % % output % images: 4 dimensional matrices, representing the whole image set. % [row, col, channel, i] for i = 1:number of images. % exposureTimes: (number, 1) matr...
github
chiahan/vfx-project1-hdr-master
main.m
.m
vfx-project1-hdr-master/program/main.m
3,180
utf_8
caf14abb423822e31ca2a62e3a9b62a1
% % alignment images, convert an image set into HDR, then tone mapping it. % % input: % folder: the (relative) path containing the image set. % type_: 'global' or 'local' tone mapping % phi: used by local tone mapping % epsilon: used by local tone mapping (find the max gaussian scale) % lambda: smoothness fac...
github
chiahan/vfx-project1-hdr-master
gsolve.m
.m
vfx-project1-hdr-master/program/gsolve.m
1,638
utf_8
6bf42b84750a0d74d011f6e271db9643
% % This code is from the following paper: % % P. E. Debevec and J. Malik, “Recovering High Dynamic Range Radiance Maps from % Photographs,” Proceedings of SIGGRAPH 1997, ACM Press / ACM SIGGRAPH, 369– % 378, 1997. % % % gsolve.m − Solve for imaging system response function % % Given a set of pixel values observed for ...
github
chiahan/vfx-project1-hdr-master
hdrDebevec.m
.m
vfx-project1-hdr-master/program/hdrDebevec.m
1,040
utf_8
0b94a0f174dd0e24018079b5374be842
% input % images: 4 dimensional matrices, representing the whole image set. % [row, col, channel, i] for i = 1:number of images. % g: 2 dimensional matrices, [0~255, channel] % ln_t: [ln_e, i]for i = 1:number of images, representing image's log exposure time in second. % w: the weighting function value for pixel v...
github
Alzathar/b-tk.googlecode.backup-master
testSample.m
.m
b-tk.googlecode.backup-master/Utilities/matlab_xunit/architecture/testSample.m
150
utf_8
8b67b7df9d9f1b950b8071780e330763
function test_suite = testSample initTestSuite; function testMyCode assertEqual(1, 1); assertElementsAlmostEqual(1, 1.1); assertTrue(10 == 10);
github
Alzathar/b-tk.googlecode.backup-master
testFliplr.m
.m
b-tk.googlecode.backup-master/Utilities/matlab_xunit/doc/example_subfunction_tests/testFliplr.m
210
utf_8
dba2423d0ec496209cb1ad0e9db20302
function test_suite = testFliplr initTestSuite; function testFliplrMatrix in = magic(3); assertEqual(fliplr(in), in(:, [3 2 1])); function testFliplrVector assertEqual(fliplr([1 4 10]), [10 4 1]);
github
Alzathar/b-tk.googlecode.backup-master
test_that.m
.m
b-tk.googlecode.backup-master/Utilities/matlab_xunit/doc/+abc/+tests/test_that.m
161
utf_8
97300fd8d3adec69102d836a63110ca5
% Do-nothing test used in the examples for organizing tests inside packages. % % Steven L. Eddins % Copyright 2010 The MathWorks, Inc. function test_that
github
Alzathar/b-tk.googlecode.backup-master
test_this.m
.m
b-tk.googlecode.backup-master/Utilities/matlab_xunit/doc/+abc/+tests/test_this.m
161
utf_8
fa26021122fc1ebe7ff54a143d85c458
% Do-nothing test used in the examples for organizing tests inside packages. % % Steven L. Eddins % Copyright 2010 The MathWorks, Inc. function test_this
github
Alzathar/b-tk.googlecode.backup-master
testWithSetupError.m
.m
b-tk.googlecode.backup-master/Utilities/matlab_xunit/doc/examples_general/testWithSetupError.m
297
utf_8
754e7acc098bd1d5b72421ff071bc6af
function test_suite = testWithSetupError %Example of a test with an error. The setup function calls cos with %too many input arguments. initTestSuite; function testData = setup testData = cos(1, 2); function testMyFeature(testData) assertEqual(1, 1); function teardown(testData)