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
lijunzh/fd_elastic-master
L1GeneralOrthantWise.m
.m
fd_elastic-master/src/PQN/L1General/L1GeneralOrthantWise.m
5,512
utf_8
5e4e4772d674902f60c0bf7ef517fd4f
function [w,fEvals] = L1GeneralOrthantWise(gradFunc,w,lambda,params,varargin) % % computes argmin_w: gradFunc(w,varargin) + sum lambda.*abs(w) % % Method used: % Orthant-Wise Regression % % Parameters % gradFunc - function of the form gradFunc(w,varargin{:}) % w - initial guess % lambda - scale of L1 ...
github
lijunzh/fd_elastic-master
L1GeneralProjection.m
.m
fd_elastic-master/src/PQN/L1General/L1GeneralProjection.m
5,083
utf_8
268e1936eb38842e70a15acc9b06b47f
function [w,fEvals] = L1GeneralProjection(gradFunc,w,lambda,params,varargin) % % computes argmin_w: gradFunc(w,varargin) + sum lambda.*abs(w) % % Method used: % Two-Metric Projection method w/ non-negative variables % % Parameters % gradFunc - function of the form gradFunc(w,varargin{:}) % w - initial gu...
github
lijunzh/fd_elastic-master
logdetFunction.m
.m
fd_elastic-master/src/PQN/GGM/logdetFunction.m
442
utf_8
e089e4642ff4aaaf50516b6488a257a1
function [f,g] = logdetFunction(w,sigma) n = size(sigma,1); w = reshape(w,[n,n]); f = -logdet(sigma + w,-Inf); if ~isinf(f) g = -inv(sigma + w); else g = zeros(size(sigma)); end g = g(:); global trace if trace == 1 global fValues fValues(end+1,1) = -f; drawnow end end funct...
github
lijunzh/fd_elastic-master
drawGraph.m
.m
fd_elastic-master/src/PQN/KPM/drawGraph.m
46,847
utf_8
d2429b94526ebcbca9649f90cd0a6b9d
function drawGraph(adj, varargin) % drawGraph Automatic graph layout: interface to Neato (see http://www.graphviz.org/) % % drawGraph(adjMat, ...) draws a graph in a matlab figure % % Optional arguments (string/value pair) [default in brackets] % % labels - labels{i} is a *string* for node i [1:n] % removeSelf...
github
lijunzh/fd_elastic-master
process_options.m
.m
fd_elastic-master/src/PQN/KPM/process_options.m
4,394
utf_8
483b50d27e3bdb68fd2903a0cab9df44
% PROCESS_OPTIONS - Processes options passed to a Matlab function. % This function provides a simple means of % parsing attribute-value options. Each option is % named by a unique string and is given a default % value. % % Usage: [var1, var2, ......
github
lijunzh/fd_elastic-master
UGM_Sample_Gibbs.m
.m
fd_elastic-master/src/PQN/UGM/sample/UGM_Sample_Gibbs.m
1,407
utf_8
ada59ec0acf3f3aa12d629909aa9ba4b
function [samples] = UGM_Sample_Gibbs(nodePot,edgePot,edgeStruct,burnIn,y) % Single Site Gibbs Sampling if nargin < 5 % Initialize [junk y] = max(nodePot,[],2); end if edgeStruct.useMex samples = UGM_Sample_GibbsC(nodePot,edgePot,int32(edgeStruct.edgeEnds),int32(edgeStruct.nStates),int32(edgeStruct.V),int32(edgeS...
github
lijunzh/fd_elastic-master
UGM_Sample_Exact.m
.m
fd_elastic-master/src/PQN/UGM/sample/UGM_Sample_Exact.m
1,876
utf_8
3bca2622a6fc60f6cb4da8101e748893
function [samples] = UGM_Sample_Exact(nodePot,edgePot,edgeStruct) % Exact sampling [nNodes,maxState] = size(nodePot); nEdges = size(edgePot,3); edgeEnds = edgeStruct.edgeEnds; nStates = edgeStruct.nStates; maxIter= edgeStruct.maxIter; samples = zeros(nNodes,0); Z = computeZ(nodePot,edgePot,edgeEnds,nStates); for s ...
github
lijunzh/fd_elastic-master
UGM_Infer_Exact.m
.m
fd_elastic-master/src/PQN/UGM/infer/UGM_Infer_Exact.m
1,746
utf_8
36e8e9290900e570414b692a29509b72
function [nodeBel, edgeBel, logZ] = UGM_Infer_Exact(nodePot, edgePot, edgeStruct) % INPUT % nodePot(node,class) % edgePot(class,class,edge) where e is referenced by V,E (must be the same % between feature engine and inference engine) % % OUTPUT % nodeBel(node,class) - marginal beliefs % edgeBel(class,class,e) ...
github
lijunzh/fd_elastic-master
UGM_makeCRFedgePotentials.m
.m
fd_elastic-master/src/PQN/UGM/sub/UGM_makeCRFedgePotentials.m
1,989
utf_8
5ad22bbbc0fc345892b37a8ef4e8e102
function [edgePot] = UGM_makeEdgePotentials(Xedge,v,edgeStruct,infoStruct) % Makes pairwise class potentials for each node % % Xedge(1,feature,edge) % v(feature,variable,variable) - edge weights % nStates - number of States per node % % edgePot(class1,class2,edge) if edgeStruct.useMex % Mex Code edgeP...
github
lijunzh/fd_elastic-master
UGM_makeCRFNodePotentials.m
.m
fd_elastic-master/src/PQN/UGM/sub/UGM_makeCRFNodePotentials.m
1,028
utf_8
6558b6ec74648c9b18d6851c2ae6f7ca
function [nodePot] = UGM_makeCRFnodePotentials(X,w,edgeStruct,infoStruct) % Makes class potentials for each node % % X(1,feature,node) % w(feature,variable,variable) - node weights % nStates - number of states per node % % nodePot(node,class) if edgeStruct.useMex % Mex Code nNodes = size(X,3); nSt...
github
lijunzh/fd_elastic-master
UGM_initWeights.m
.m
fd_elastic-master/src/PQN/UGM/sub/UGM_initWeights.m
572
utf_8
b52adde4da67db63cf469d1eefd6d65f
function [w,v,wLinInd,vLinInd] = UGM_initWeights(infoStruct,initFunc) % [w,v,wLinInd,vLinInd] = UGM_initWeights(infoStruct,initFunc) % % Generates an initial weight vector % % X(instance,feature,node) % Xedge(instance,feature,edge) % infoStruct: structure containing nStates, tied, and ising % type - 'random' or 'zero' ...
github
lijunzh/fd_elastic-master
UGM_MRFLoss.m
.m
fd_elastic-master/src/PQN/UGM/train/UGM_MRFLoss.m
5,348
utf_8
23a3516c53c625c2451571adbbe4d5e7
function [f,g] = UGM_MRFLoss(wv,y,edgeStruct,infoStruct,inferFunc,varargin) % wv(variable) % X(instance,feature,node) % Xedge(instance,feature,edge) % y(instance,node) % edgeStruct % inferFunc % varargin - additional parameters of inferFunc nNodeFeatures = 1; nEdgeFeatures = 1; [nInstances,nNodes] = size(y); nFeatures...
github
lijunzh/fd_elastic-master
UGM_PseudoLoss.m
.m
fd_elastic-master/src/PQN/UGM/train/UGM_PseudoLoss.m
9,070
utf_8
fb2b963f6e701ed3ee560190279f043a
function [f,g,H] = UGM_loss(wv,X,Xedge,y,edgeStruct,infoStruct) % wv(variable) % X(instance,feature,node) % Xedge(instance,feature,edge) % y(instance,node) % edgeStruct % inferFunc % tied % Form weights [w,v] = UGM_splitWeights(wv,infoStruct); % Make Potentials nodePot = UGM_makeNodePotentials(X,w,edgeStruct,infoStru...
github
lijunzh/fd_elastic-master
UGM_CRFpseudoLoss.m
.m
fd_elastic-master/src/PQN/UGM/train/UGM_CRFpseudoLoss.m
9,857
utf_8
4f2c7be5956dc41f8c3d0ffeb9e3cb83
function [f,g,H] = UGM_loss(wv,X,Xedge,y,edgeStruct,infoStruct) % wv(variable) % X(instance,feature,node) % Xedge(instance,feature,edge) % y(instance,node) % edgeStruct % inferFunc % tied % Form weights [w,v] = UGM_splitWeights(wv,infoStruct); % Make Potentials nodePot = UGM_makeCRFNodePotentials(X,w,edgeStruct,infoS...
github
lijunzh/fd_elastic-master
UGM_makeNodePotentials.m
.m
fd_elastic-master/src/PQN/UGM/potentials/UGM_makeNodePotentials.m
1,046
utf_8
5a2e8c508b9eacbbf1d0dbcafff5fa91
function [nodePot] = makeNodePotentials(X,w,edgeStruct,infoStruct) % Makes class potentials for each node % % X(1,feature,node) % w(feature,variable,variable) - node weights % nStates - number of states per node % % nodePot(node,class) if edgeStruct.useMex % Mex Code nNodes = size(X,3); nStates = ...
github
lijunzh/fd_elastic-master
WolfeLineSearch.m
.m
fd_elastic-master/src/PQN/minFunc/WolfeLineSearch.m
11,395
utf_8
3d2acf1139093fe11df95ccdf888aab8
function [t,f_new,g_new,funEvals,H] = WolfeLineSearch(... x,t,d,f,g,gtd,c1,c2,LS,maxLS,tolX,debug,doPlot,saveHessianComp,funObj,varargin) % % Bracketing Line Search to Satisfy Wolfe Conditions % % Inputs: % x: starting location % t: initial step size % d: descent direction % f: function value at st...
github
lijunzh/fd_elastic-master
minFunc_processInputOptions.m
.m
fd_elastic-master/src/PQN/minFunc/minFunc_processInputOptions.m
3,704
utf_8
b1c1b56fb4cf20e8a7b44b359a27a792
function [verbose,verboseI,debug,doPlot,maxFunEvals,maxIter,tolFun,tolX,method,... corrections,c1,c2,LS_init,LS,cgSolve,qnUpdate,cgUpdate,initialHessType,... HessianModify,Fref,useComplex,numDiff,LS_saveHessianComp,... DerivativeCheck,Damped,HvFunc,bbType,cycle,... HessianIter,outputFcn,useMex,use...
github
EdwardDixon/facenet-master
detect_face_v1.m
.m
facenet-master/tmp/detect_face_v1.m
7,954
utf_8
678c2105b8d536f8bbe08d3363b69642
% MIT License % % Copyright (c) 2016 Kaipeng Zhang % % Permission is hereby granted, free of charge, to any person obtaining a copy % of this software and associated documentation files (the "Software"), to deal % in the Software without restriction, including without limitation the rights % to use, copy, modify, mer...
github
EdwardDixon/facenet-master
detect_face_v2.m
.m
facenet-master/tmp/detect_face_v2.m
9,016
utf_8
0c963a91d4e52c98604dd6ca7a99d837
% MIT License % % Copyright (c) 2016 Kaipeng Zhang % % Permission is hereby granted, free of charge, to any person obtaining a copy % of this software and associated documentation files (the "Software"), to deal % in the Software without restriction, including without limitation the rights % to use, copy, modify, mer...
github
nikos-kekatos/SpaceEx-tutorials-master
plotting_template_bball.m
.m
SpaceEx-tutorials-master/Files/Plotting/MATLAB/examples/Bouncing_Ball/plotting_template_bball.m
811
utf_8
95ab77bfe873660cdd96c11ff9c9fab8
% ======================================================================== % This example illustrates the use of Matlab functions for plotting % flowpipes obtained with SpaceEx. There are two functions: % % USAGE: % % >> addpath('../../src/') % >> plotting_template_bball('bball_timed.gen') % % If you want to use the si...
github
nikos-kekatos/SpaceEx-tutorials-master
plotting_template_pendulum.m
.m
SpaceEx-tutorials-master/Files/Plotting/MATLAB/examples/pendulum/plotting_template_pendulum.m
2,716
utf_8
b469a023b66b8639d8cdcaa56d881595
% ======================================================================== % INTRODUCTION: % % This example illustrates the use of Matlab functions for plotting % flowpipes obtained with SpaceEx. There are two functions: % % (i) `gen_to_mat.m` : save the plot as a .mat file. % % (ii) `plot_flowpipe.m` : plot the flowpi...
github
nikos-kekatos/SpaceEx-tutorials-master
plot_flowpipe.m
.m
SpaceEx-tutorials-master/Files/Plotting/MATLAB/src/plot_flowpipe.m
4,462
utf_8
dc6dfc2df1f0aadd10e9543fa0596d96
function plot_flowpipe(fname, options) % PLOT_FLOWPIPE Approximate plot of a large sequence of polygons by % sampling. % % INPUT: % % "fname" - gen file name if it is in the same folder of this script, % or the full path otherwise. % % "options" - see the code. % % EXAMPLES: % % Export the gen data to a...
github
ALandauer/qDIC-master
areaMapping_2D.m
.m
qDIC-master/areaMapping_2D.m
3,277
utf_8
20e26769dd3d161a11287ddad4a11366
function I = areaMapping_2D(varargin) % I = areaMapping(I0,m,u0) symmetrically warps undeformed % and deformed 2-D images by the displacement field from previous iteration % using trilinear interpolation. % % INPUTS % ------------------------------------------------------------------------- % I0: cell containing the ...
github
ALandauer/qDIC-master
flagOutliers_2D.m
.m
qDIC-master/flagOutliers_2D.m
3,702
utf_8
ddb4ec41cea2100a2ee76b4279621524
function [cc,normFluctValues] = flagOutliers_2D(u,cc,thr,epsilon) % u = flagOutliers(u,cc,thr,epsilon) removes outliers using the universal % outlier test based on % % J. Westerweel and F. Scarano. Universal outlier detection for PIV data. % Exp. Fluids, 39(6):1096{1100, August 2005. doi: 10.1007/s00348-005-0016-6 % % ...
github
ALandauer/qDIC-master
mirt2D_mexinterp.m
.m
qDIC-master/mirt2D_mexinterp.m
1,421
utf_8
dfd88fbc1da9b7dd1ebdebd7550e746e
%MIRT2D_MEXINTERP Fast 2D linear interpolation % % ZI = mirt2D_mexinterp(Z,XI,YI) interpolates 2D image Z at the points with coordinates XI,YI. % Z is assumed to be defined at regular spaced points 1:N, 1:M, where [M,N]=size(Z). % If XI,YI values are outside the image boundaries, put NaNs in ZI. % % The performance...
github
ALandauer/qDIC-master
funIDIC.m
.m
qDIC-master/funIDIC.m
6,999
utf_8
497a1c899f871561f66a8339663f6529
function [u, cc, dm, m, tSwitch] = funIDIC(varargin) % u = funIDIC(filename, sSize, sSizeMin, runMode) is the main function that performs % IDIC on a time series of images. % % INPUTS % ------------------------------------------------------------------------- % filename: string for the filename prefix for the images ...
github
ALandauer/qDIC-master
filterDisplacements_2D.m
.m
qDIC-master/filterDisplacements_2D.m
2,096
utf_8
4981dbc2aeac0aabf27a93a89aaf7701
function u = filterDisplacements_2D(u0,filterSize,z) % I = filterDisplacements(I0,filterSize,z) applies a low-pass convolution % filter to the displacement field to mitigate divergence based on % % F. F. J. Schrijer and F. Scarano. Effect of predictor corrector filtering % on the stability and spatial resolution of ite...
github
ALandauer/qDIC-master
IDIC.m
.m
qDIC-master/IDIC.m
9,851
utf_8
b58b5a6a6108a0052bc17280a07fe1f1
function [u, cc, dm, mFinal, decorrFlag] = IDIC(varargin) % % INPUTS % ------------------------------------------------------------------------- % I0: cell containing the undeformed, I0{1}, and deformed, I0{2} images % sSize: interrogation window (subset) size % sSizeMin: interrogation window (subset) minimum siz...
github
ALandauer/qDIC-master
DIC.m
.m
qDIC-master/DIC.m
15,845
utf_8
c948e88b9c8f469ad981db5b79bd89cb
function [u, cc] = DIC(varargin) % [du, cc] = DIC(I,sSize,sSpacing,ccThreshold) estimates % displacements between two images through digital image % correlation. % % INPUTS % ------------------------------------------------------------------------- % I: cell containing the undeformed, I{1}, and deformed, I{2} 2-D ima...
github
SwanLab/Swan-master
test3d_micro_cube.m
.m
Swan-master/test3d_micro_cube.m
203,004
utf_8
f411079847d1d58632af11c52d4c4fc2
%================================================================== % General Data File % Title: Default_title % Units: SI % Dimensions: 3D % Type of problem: Plane_Stress % Type of Phisics: ELASTIC % Micro/Macro: MICRO % %================================================================== clc clo...
github
SwanLab/Swan-master
PlaneOfResiduals.m
.m
Swan-master/Vigdergauz/Understunding/PlaneOfResiduals.m
1,518
utf_8
1ef438b0307f2ba91420175d20cca1a9
function PlaneOfResiduals rhoOptimal = 0.2;%0.61; tanXiV = tan(20*pi/80); %tanXiV = 0.9; r1_0 = 0.97; r2_0 = 0.99; r2o = 0.998709640937773; r1o = 0.998709640937773; r0 = [r2o;r1o] computeResidual(r0,rhoOptimal,tanXiV) eps = 1e-13; n1 = 20; n2 = 20; r1V = linspace(0.8,1-eps,n1); r2V = linspace(0.8,1-eps,n2); fo...
github
SwanLab/Swan-master
understundingVigdergauz.m
.m
Swan-master/Vigdergauz/Understunding/understundingVigdergauz.m
7,777
utf_8
d1788294d4b548df453add891f916e25
function understundingVigdergauz x0 = [0.8,0.8]; fun = @(x) computeEquations(x); mesh = createMesh; % problem.objective = fun; % problem.x0 = x0; % problem.solver = 'fsolve'; % problem.lb = [0,0]; % problem.ub = [1,1]; % problem.options = optimset('Display','iter'); % % [x,fsol] = fsolve(problem) r2o = 0.998709640937...
github
SwanLab/Swan-master
interpolate3mat.m
.m
Swan-master/Multimaterial/interpolate3mat.m
1,386
utf_8
ac8bc29cc989139c740e7a48298013b5
function interpolate3mat X(:,1) = [1 0 0]; X(:,2) = [0 1 0]; X(:,3) = [0 0 1]; xi1Init = 0.4; xi2Init = 0.01; alpha1Init = 17; alpha2Init = 2; alpha3Init = 4; rho(1,1) = xi1Init; rho(2,1) = xi2Init; rho(3,1) = 1 - rho(1) - rho(2); gamma(1,1) = alpha1Init; gamma(2,1) = alpha2Init; gamma(3,1) = alpha3Init; figure('...
github
SwanLab/Swan-master
ExperimentingGraph.m
.m
Swan-master/Graph/ExperimentingGraph.m
1,017
utf_8
7bdb9a17e749e4ee39708c048c0d1f4f
function ExperimentingGraph nmax = 280; G = graph(); G = addnode(G,nmax); plot(G) allEdges = nchoosek(1:nmax,2); allEdgesN = allEdges; nEdgeMax = size(allEdges,1); sparsity = 0.05; nEdge = round(sparsity*nEdgeMax); for i = 1:nEdge nPosibleEdges = size(allEdgesN,1); newEdge = randi(nPosibleEdges); edge =...
github
SwanLab/Swan-master
compareInterations.m
.m
Swan-master/Topology Optimization/Applications/compareInterations.m
1,267
utf_8
898b2a9d8cf583ae62e1bffeb21a0298
function compareInterations fCase{1} = 'LatticeExperimentInputCantileverSymmetricMeshSuperEllipsePDE'; folder{1} = '/media/alex/My Passport/LatticeResults/CantileverSymmetricMeshSuperEllipsePDEGradientEpsilonH'; fCase{2} = 'LatticeExperimentInputCantileverSymmetricMeshSuperEllipsePDE'; folder{2} = '/media/alex/My Pa...
github
SwanLab/Swan-master
compareInterations2.m
.m
Swan-master/Topology Optimization/Applications/compareInterations2.m
1,151
utf_8
08f836d5383d17f1087d9a83511f384e
function compareInterations2 fCase{1} = 'ExperimentingPlot'; folder{1} = '/media/alex/My Passport/LatticeResults/StressNormSuperEllipseRotation'; fCase{2} = 'ExperimentingPlot'; folder{2} = '/media/alex/My Passport/LatticeResults/StressNormRectangleRotation'; %fCase{3} = 'LatticeExperimentInputCantileverSymmetricM...
github
SwanLab/Swan-master
PlottinMaxWithPNorm.m
.m
Swan-master/Topology Optimization/Applications/LatticeExperiments/PlottinMaxWithPNorm.m
2,404
utf_8
3e3e82396177aa8ba1af2ed9930eaf55
function PlottinMaxWithPNorm p = 64; %nIteration = 498; %fCase = 'ExperimentingPlot'; %folder = ['/home/alex/git-repos/Swan/Output/',fCase]; %nIteration = 545; %fCase = 'LatticeExperimentInputCantileverSymmetricMeshSuperEllipsePDE'; %folder = '/media/alex/My Passport/LatticeResults/CantileverSymmetricMeshSuperEllips...
github
SwanLab/Swan-master
plotSuperVsRectangleOptim.m
.m
Swan-master/Topology Optimization/Applications/LatticeExperiments/plotSuperVsRectangleOptim.m
1,157
utf_8
67ddc0dd208b2a5f59f6e43def2d9d02
function plotSuperVsRectangleOptim mCase = 'Middle'; folderR = ['/home/alex/Desktop/ExperimentingPlotRectangle',mCase,'/']; [iter,cost,maxStress] = obtainCostShapes(folderR); f = figure(); h{1} = plot(iter,[cost;maxStress]','b'); hline = findobj(gcf, 'type', 'line'); set(hline(1),'LineStyle','--') folderS = ['/home/...
github
SwanLab/Swan-master
plotPerimeterComplianceCost.m
.m
Swan-master/Topology Optimization/Applications/PerimeterExperiments/plotPerimeterComplianceCost.m
992
utf_8
1541075216b1ca60d25a199b97dc5dec
function plotPerimeterComplianceCost %perCase = 'Total'; perCase = 'Relative'; plotCost(perCase); end function plotCost(perCase) folder = ['/media/alex/My Passport/PerimeterResults/FineMesh/',perCase,'Perimeter01/']; [iter,compliance,perimeter] = obtainCostShapes(folder); f = figure(); hold on pN{1} = plot(iter,0...
github
SwanLab/Swan-master
MaterialDesignApproachComparison.m
.m
Swan-master/Topology Optimization/Applications/MaterialDesign/MaterialDesignApproachComparison.m
1,242
utf_8
24c6edbd0f8363c1de5fc2ae22889c67
function MaterialDesignApproachComparison matCase = 'Horizontal'; path = '/media/alex/My Passport/MaterialDesign/'; element = {'Tri','Quad'}; desVar = {'Density','LevelSet'}; filter = {'P1';'PDE'}; fCase{1} = 'CompositeMaterialDesign'; folder{1} = fullfile(path,matCase,element,desVar,filter); fCase{2} = 'Composit...
github
SwanLab/Swan-master
fixIndex.m
.m
Swan-master/Topology Optimization/Benchmarks/Maintenance/fixIndex.m
583
utf_8
7d0f4e250640e6f9903ef1790848a787
function new_name = fixIndex(name,destination_folderpath) index = 1; list = updateList(destination_folderpath); try_name = assembleName(name,index); for i = 1:length(list) if strcmpi(try_name,list(i).name) index = index + 1; try_name = assembleName(name,index); ...
github
SwanLab/Swan-master
ImportCases.m
.m
Swan-master/Topology Optimization/Benchmarks/Maintenance/ImportCases.m
1,368
utf_8
e7755aeae6ea77e29d878e9c8f55f7f4
clear; close all; clc; %% *************************** IMPORT CASES **************************** %% % Move cases from an origin folder to a destination folder considering case % indexes. origin_folderpath = uigetdir; destination_superfolderpath = uigetdir; list = updateList(origin_folderpath); for i = 1:length(list) ...
github
SwanLab/Swan-master
removePatternFromFilename.m
.m
Swan-master/Topology Optimization/Benchmarks/Maintenance/removePatternFromFilename.m
746
utf_8
eb96fd35e0b68d8987eefe0d32fbb89c
clear; close all; clc; %% ***************** REMOVE PATTERN FROM FILENAME CASES **************** %% % Remove a certain pattern from the name of a file. folderpath = uigetdir; list = updateList(folderpath); pattern_to_remove = 'ORIOL_'; for i = 1:length(list) old_name = list(i).name; if contains(old_name,patt...
github
SwanLab/Swan-master
RunningOneMicrostructureVademecum.m
.m
Swan-master/Topology Optimization/Homogenization/Sources/VadamecumCalculator/RunningOneMicrostructureVademecum.m
752
utf_8
76b1d3aa121b8db9aafec4290bb1be2d
function RunningOneMicrostructureVademecum %dSmooth = obtainSettings('SquareMesh4b','Rectangle'); dSmooth = obtainSettings('SmallCircleQ2','SmoothRectangle'); vc = VademecumCellVariablesCalculator(dSmooth); vc.computeVademecumData() end function d = obtainSettings(prefix,freeFemFile) d = SettingsVademecumCellVariab...
github
SwanLab/Swan-master
ComparingSymmetry.m
.m
Swan-master/Topology Optimization/Homogenization/Sources/VadamecumCalculator/ComparingSymmetry.m
770
utf_8
6bce34d7d895f1eb38c40ab27a731a88
function ComparingSymmetry incPhi = pi/180; fileName = 'StressSymmetryTraction'; sPnormT = computeExperiment(incPhi,fileName); fileName = 'StressSymmetryCompression'; sPnormC = computeExperiment(-incPhi,fileName); end function sPnorm = computeExperiment(incPhi,fileName) txi = pi/2 - 0.2;%1083; rho = 0.9; q = 4;...
github
SwanLab/Swan-master
StressMeshVariation.m
.m
Swan-master/Topology Optimization/Homogenization/Sources/VadamecumCalculator/StressMeshVariation.m
732
utf_8
a969aa16faf878fb7fb8cab9ad3ff016
function StressMeshVariation hMesh = [0.1, 0.05, 0.0025, 0.00125]; for imesh = 1:length(hMesh) dSmooth = obtainSettings(['RectangleStressMeshDependency',num2str((imesh))],'Rectangle',hMesh(imesh)); computeVademecum(dSmooth); end end function computeVademecum(d) vc = VademecumCellVariablesCalculator(d); vc.computeVad...
github
SwanLab/Swan-master
RunningVademecum.m
.m
Swan-master/Topology Optimization/Homogenization/Sources/VadamecumCalculator/RunningVademecum.m
1,060
utf_8
c087a7f4123f17683e191c603552a2c8
function RunningVademecum % % dSmooth = obtainSettings('SuperEllipseQMax'); % dSmooth.smoothingExponentSettings.type = 'Given'; % dSmooth.smoothingExponentSettings.q = 32; % computeVademecum(dSmooth); % % dSmooth = obtainSettings('SuperEllipseQ2'); % dSmooth.smoothingExponentSettings.type = 'Given'; % dSmooth.smooth...
github
SwanLab/Swan-master
findingVolumeMatch.m
.m
Swan-master/Topology Optimization/Homogenization/Sources/VadamecumCalculator/findingVolumeMatch.m
422
utf_8
228e5717e73d0b12bb85e910b6d51067
function findingVolumeMatch vS = findVolume('SmoothRectangle'); vR = findVolume('Rectangle'); end function volV = findVolume(micro) d = load(['/home/alex/git-repos/SwanLab/Swan/Output/',micro,'/',micro,'.mat']); var = d.d.variables; mxV = d.d.domVariables.mxV; myV = d.d.domVariables.myV; for imx = 1:l...
github
SwanLab/Swan-master
runningOptimalSuperEllipseExponent.m
.m
Swan-master/Topology Optimization/Homogenization/Sources/VadamecumCalculator/runningOptimalSuperEllipseExponent.m
475
utf_8
31302449ab211ee6c0af81872433cc84
function runningOptimalSuperEllipseExponent s.samplePoints = createSamplePoints(); s.fileName = 'OptimalSuperEllipseExponentDataFromFixedRho'; exponentComputer = OptimalExponentComputer(s); exponentComputer.compute(); end function sample = createSamplePoints() s.type = 'FromMxMy'; sample = SamplePointsCreatorForOpti...
github
SwanLab/Swan-master
AnalyticalVsNumerical.m
.m
Swan-master/Topology Optimization/Homogenization/Sources/VadamecumCalculator/SmoothingExponentComputer/AnalyticalVsNumerical.m
1,394
utf_8
b57cbc83d117e1270badaadba4371921
function AnalyticalVsNumerical v = VademecumReader(); s.vademecum = v; sE = PonderatedOptimalSuperEllipseComputer(s); sE.compute(); %t = abs(v.mxV(:,1) - v.myV(:,1)) < 1e-6; m1 = v.mxV(:,1); m2 = v.myV(:,1); q = sE.qMean; thet = 45; theta = thet*pi/180; m1L = @(x) sqrt(x^2*(1+tan(theta)^2)); m2L = @(y) sqrt(y^2*(...
github
SwanLab/Swan-master
runningSimpleTopOpt.m
.m
Swan-master/SimpleTopOpt/runningSimpleTopOpt.m
498
utf_8
dd5f5b99ad2c9facf9a1b431261ba41a
%% Simple topology optimization example % Note that the beta term function runningSimpleTopOpt s.maxIter = 100; s.TOL = 1e-12; s.topOptProblem = createFullTopOptProblem(); solver = SimpleShapeOptimizationSolver(s); solver.solve(); end function t = createFullTopOptProblem() settings = Settings('Example1'); translator...
github
SwanLab/Swan-master
subsolv.m
.m
Swan-master/TopOptEig/OptimalBucklingColumn/subsolv.m
5,887
utf_8
4d6cc3eb2f01df75cb6feae665525c62
% This is the file subsolv.m % function [xmma,ymma,zmma,lamma,xsimma,etamma,mumma,zetmma,smma] = ... subsolv(m,n,epsimin,low,upp,alfa,beta,p0,q0,P,Q,a0,a,b,c,d); % % Written in May 1999 by % Krister Svanberg <krille@math.kth.se> % Department of Mathematics % SE-10044 Stockholm, Sweden. % % This...
github
SwanLab/Swan-master
mmasub.m
.m
Swan-master/TopOptEig/OptimalBucklingColumn/mmasub.m
5,946
utf_8
58dc1410125aaae8d671b426a85f3608
% This is the file mmasub.m % function [xmma,ymma,zmma,lam,xsi,eta,mu,zet,s,low,upp] = ... mmasub(m,n,iter,xval,xmin,xmax,xold1,xold2, ... f0val,df0dx,df0dx2,fval,dfdx,dfdx2,low,upp,a0,a,c,d); % % Written in May 1999 by % Krister Svanberg <krille@math.kth.se> % Department of Mathematics % SE-100...
github
SwanLab/Swan-master
bound.m
.m
Swan-master/TopOptEig/OptimalBucklingColumn/bound.m
6,682
utf_8
813de3962b18bd8c013d954ff9690fc3
function [x] = bound(N) % This algorithm maximizes the least eigenvalue of a clamped-clamped % column, accounting for the presence of simple or multiple eigenvalues. % It also illustrates the best strongest profile of that column against % buckling as well as it gives its buckling modes. Its input variable is N...
github
SwanLab/Swan-master
vert2lcon.m
.m
Swan-master/polytopes_2017_10_04_v1.9/vert2lcon.m
5,773
utf_8
3c50975c970cc4f5961715a166e01407
function [A,b,Aeq,beq]=vert2lcon(V,tol) %An extension of Michael Kleder's vert2con function, used for finding the %linear constraints defining a polyhedron in R^n given its vertices. This %wrapper extends the capabilities of vert2con to also handle cases where the %polyhedron is not solid in R^n, i.e., where the...
github
SwanLab/Swan-master
lcon2vert.m
.m
Swan-master/polytopes_2017_10_04_v1.9/lcon2vert.m
15,372
utf_8
adab98b0f5c2f025ba76f9c88f0c8c64
function [V,nr,nre]=lcon2vert(A,b,Aeq,beq,TOL,checkbounds) %An extension of Michael Kleder's con2vert function, used for finding the %vertices of a bounded polyhedron in R^n, given its representation as a set %of linear constraints. This wrapper extends the capabilities of con2vert to %also handle cases where the ...
github
SwanLab/Swan-master
rayTracer.m
.m
Swan-master/gypsilabModified/openRay/rayTracer.m
3,683
utf_8
1770ad508b72889ee203feed1ff679a2
function ray = rayTracer(ray,ord,rMax) %+========================================================================+ %| | %| OPENRAY - LIBRARY FOR TRI-DIMENSIONAL RAY TRACING | %| openRay is part of the GYPSILAB toolbox ...
github
SwanLab/Swan-master
integralEbd.m
.m
Swan-master/gypsilabModified/openEbd/integralEbd.m
4,100
utf_8
fde80394e93a08ea414a874b5f3cdc4a
function [I,loc] = integralEbd(Xdom,Ydom,u,green,k,v,tol) %+========================================================================+ %| | %| OPENDOM - LIBRARY FOR NUMERICAL INTEGRATION | %| openDom is part of th...
github
SwanLab/Swan-master
besselJRobinzeros.m
.m
Swan-master/gypsilabModified/openEbd/utils/besselJRobinzeros.m
1,431
utf_8
2743c8f9d8c380a9fa5622efd4db0470
function [zs] = besselJRobinzeros(c,k,N,freqCenter) if ~exist('freqCenter','var') freqCenter = 0; end xmin = max(freqCenter - pi*N,0); xmax = freqCenter + 2*pi*N; % Using zn ~ pi*n if c == Inf % Returns the N first zeros of the function % Jk(x) zs = AllZeros(@(x)(besselj(k,x)),xmin,xmax,5*(N+freqCente...
github
SwanLab/Swan-master
RadialQuadrature.m
.m
Swan-master/gypsilabModified/openEbd/radialQuad/RadialQuadrature.m
12,212
utf_8
4d0c3e0a8e95bc4506e6e8bf419e7105
classdef RadialQuadrature % Approximation of a function as a series of the functions (e_i) % where e_i is the i-th normalized (in H10 norm) eigenfunction of the % Laplace operator with Dirichlet boundary conditions. % The approximation takes place on the set a(1) < |x| < a(2) of R^2 % and writes ...
github
SwanLab/Swan-master
sphereMaxwell.m
.m
Swan-master/gypsilabModified/miscellaneous/sphereMaxwell.m
5,141
utf_8
c2edb73ded59a527e93e4ed4ea6309c0
function [esTheta, esPhi] = sphereMaxwell(radius, frequency, theta, phi, nMax) % Compute the complex-value scattered electric far field of a perfectly % conducting sphere using the mie series. Follows the treatment in % Chapter 3 of % % Ruck, et. al. "Radar Cross Section Handbook", Plenum Press, 1970. % % The incide...
github
SwanLab/Swan-master
mshClean.m
.m
Swan-master/gypsilabModified/openMsh/mshClean.m
5,217
utf_8
ad930c538762f562dbac6b0dabb0bc02
function mesh = mshClean(mesh,dst) %+========================================================================+ %| | %| OPENMSH - LIBRARY FOR MESH MANAGEMENT | %| openMsh is part of the GYPSILAB toolbox for ...
github
SwanLab/Swan-master
mshReadPly.m
.m
Swan-master/gypsilabModified/openMsh/mshReadPly.m
17,258
utf_8
d02bba04d191d09e5e18680d30103adf
function [vertex,face] = mshReadPly(filename) % read_ply - read data from PLY file. % % [vertex,face] = read_ply(filename); % % 'vertex' is a 'nb.vert x 3' array specifying the position of the vertices. % 'face' is a 'nb.face x 3' array specifying the connectivity of the mesh. % % IMPORTANT: works only for tria...
github
SwanLab/Swan-master
mshReadStl.m
.m
Swan-master/gypsilabModified/openMsh/mshReadStl.m
3,520
utf_8
68055d9984fbde771248884d606df172
function [vtx,elt] = mshReadStl(file) % STLREAD imports geometry from an STL file into MATLAB. % FV = STLREAD(FILENAME) imports triangular faces from the ASCII or binary % STL file idicated by FILENAME, and returns the patch struct FV, with fields % 'faces' and 'vertices'. % % [F,V] = STLREAD(FILENAME) retu...
github
SwanLab/Swan-master
mshTree.m
.m
Swan-master/gypsilabModified/openMsh/mshTree.m
7,421
utf_8
4adb5dc5a797e4fae6a0167bb58ed1d3
function tree = mshTree(mesh,typ,Nlf,fig) %+========================================================================+ %| | %| OPENMSH - LIBRARY FOR MESH MANAGEMENT | %| openMsh is part of the GYPSILAB toolb...
github
SwanLab/Swan-master
mshMidpoint.m
.m
Swan-master/gypsilabModified/openMsh/mshMidpoint.m
6,741
utf_8
dddacc98db280b2469202b171e440e64
function [meshr,Ir] = mshMidpoint(mesh,I) %+========================================================================+ %| | %| OPENMSH - LIBRARY FOR MESH MANAGEMENT | %| openMsh is part of the GYPSILAB toolb...
github
SwanLab/Swan-master
mshReadMsh.m
.m
Swan-master/gypsilabModified/openMsh/mshReadMsh.m
4,296
utf_8
bb060ec4ccb725d2837eac69deaaa6b8
function [vtx,elt,col,data] = mshReadMsh(filename) %+========================================================================+ %| | %| OPENMSH - LIBRARY FOR MESH MANAGEMENT | %| openMsh is part of the GYPSI...
github
SwanLab/Swan-master
ffmInteractionsSparse.m
.m
Swan-master/gypsilabModified/openFfm/ffmInteractionsSparse.m
6,847
utf_8
24a505db7ba4f09c90852a9030e47f92
function MV = ffmInteractionsSparse(X,Xbox,Y,Ybox,V,Ibox,green,k,edg,tol) %+========================================================================+ %| | %| OPENFFM - LIBRARY FOR FAST AND FREE MEMORY CONVOLUTION | %| openF...
github
SwanLab/Swan-master
ffmInteractionsSparseHF.m
.m
Swan-master/gypsilabModified/openFfm/ffmInteractionsSparseHF.m
7,864
utf_8
6e507eb2dc266efb27bf9fd99d6e0304
function MV = ffmInteractionsSparseHF(X,Xbox,Y,Ybox,V,Ibox,green,k,edg,tol) %+========================================================================+ %| | %| OPENFFM - LIBRARY FOR FAST AND FREE MEMORY CONVOLUTION | %| ope...
github
SwanLab/Swan-master
domSemiAnalyticInt2D.m
.m
Swan-master/gypsilabModified/openDom/domSemiAnalyticInt2D.m
3,515
utf_8
2da8f9735e072de96405ed6bcae8e470
function [logR,rlogR,gradlogR] = domSemiAnalyticInt2D(X,S,n,tau) %+========================================================================+ %| | %| OPENDOM - LIBRARY FOR NUMERICAL INTEGRATION | %| openDom is pa...
github
SwanLab/Swan-master
createSTL.m
.m
Swan-master/PostProcess/STL/createSTL.m
1,760
utf_8
52f2112d13e434c8770602ea429328c4
function createSTL pathTcl = '/home/alex/Desktop/tclFiles/'; gidPath = '/home/alex/GiDx64/15.0.1/'; resultsFile = '/home/alex/git-repos/FEM-MAT-OO/Output/GrippingTriangleFine_Case_1_1_1/GrippingTriangleFine_Case_1_1_1_12.flavia.res'; writeTclFile(pathTcl,gidPath,resultsFile) writeExportTclFile(pathTcl,gidPath) command ...
github
SwanLab/Swan-master
getSubclasses.m
.m
Swan-master/Other/getSubclasses.m
7,309
utf_8
47de174f369d7029c2615f02e92929fd
function tb = getSubclasses(rootclass,rootpath) % GETSUBCLASSES Display all subclasses % % GETSUBCLASSES(ROOTCLASS, [ROOTPATH]) % Lists all subclasses of ROOTCLASS and their node dependency. % ROOTCLASS can be a string with the name of the class, an % object or a meta.class(). % % It looks for...
github
SwanLab/Swan-master
genop.m
.m
Swan-master/Other/Utilities/Multiprod_2009/Testing/genop.m
3,837
utf_8
2c087f1f1c6d8843c6f5198716d04526
function z = genop(op,x,y) %GENOP Generalized array operations. % GENOP(OP, X, Y) applies the function OP to the arguments X and Y where % singleton dimensions of X and Y have been expanded so that X and Y are % the same size, but this is done without actually copying any data. % % OP must be a function h...
github
SwanLab/Swan-master
arraylab133.m
.m
Swan-master/Other/Utilities/Multiprod_2009/Testing/arraylab133.m
2,056
utf_8
46c91102f1666d2e8a3f0accd7d809ed
function c = arraylab133(a,b,d1,d2) % Several adjustments to ARRAYLAB13: % 1) Adjustment used in ARRAYLAB131 was not used here. % 2) Nested statement used in ARRAYLAB132 was used here. % 3) PERMUTE in subfunction MBYV was substituted with RESHAPE % (faster by one order of magnitude!). ndimsA ...
github
SwanLab/Swan-master
timing_MX.m
.m
Swan-master/Other/Utilities/Multiprod_2009/Testing/timing_MX.m
1,472
utf_8
7db26cc2c4954f1026e93f2d0c44139a
function timing_MX % TIMING_MX Speed of MX as performed by MULTIPROD and by a nested loop. % TIMING_MX compares the speed of matrix expansion as performed by % MULTIPROD and an equivalent nested loop. The results are shown in the % manual (fig. 2). % Notice that MULTIPROD enables array expansion which...
github
SwanLab/Swan-master
timing_matlab_commands.m
.m
Swan-master/Other/Utilities/Multiprod_2009/Testing/timing_matlab_commands.m
7,975
utf_8
5384e23295d7b37d3318825a1d5c3dfe
function timing_matlab_commands % TIMING_MATLAB_COMMANDS Testing for speed different MATLAB commands. % % Main conclusion: RESHAPE and * (i.e. MTIMES) are very quick! % Paolo de Leva % University of Rome, Foro Italico, Rome, Italy % 2008 Dec 24 clear all % Checking whether needed software exists if ~exist('bsxfun'...
github
SwanLab/Swan-master
arraylab13.m
.m
Swan-master/Other/Utilities/Multiprod_2009/Testing/arraylab13.m
1,913
utf_8
942e4a25270936f264b83f4367d9b7fa
function c = arraylab13(a,b,d1,d2) % This is the engine used in MULTIPROD 1.3 for these cases: % PxQ IN A - Rx1 IN B % PxQ IN A - RxS IN B (slowest) ndimsA = ndims(a); % NOTE - Since trailing singletons are removed, ndimsB = ndims(b); % not always NDIMSB = NDIMSA NsA = d2 - ndimsA; % Number of added trailing si...
github
SwanLab/Swan-master
ExperimentingAcceleratedShapeOpt.m
.m
Swan-master/ImageProcessing/ExperimentingAccelerationForShapeOptimization/ExperimentingAcceleratedShapeOpt.m
1,304
utf_8
c32b58cf71f0c4f321fc2d30bec70b69
function ExperimentingAcceleratedShapeOpt() exp1 = computeStandardCase(); exp2 = computeMomentumCase(); exp3 = computeConstantOne(); nFigures = 5; fh = figure('units', 'pixels'); hold on fh.set('Position',[4000 1500 3000 500]) plotSubFigure(nFigures,1,'Cost',exp1.JV,exp2.JV,exp3.JV) plotSubFigure(nFigures,2,'Li...
github
SwanLab/Swan-master
learningConvergence.m
.m
Swan-master/ImageProcessing/Old/learningConvergence.m
2,079
utf_8
eda54498760dd18ec103fc1b2b0bf942
function learningConvergence k = 10; iter = 1:200; lblRate = LowerBoundLipshitzFirstOrder(iter); lbscRate = lowerBoundStronglyConvexFirstOrder(iter,k); sRate = subgradientConvergence(iter); nRate = stronglyConvexNesterovConvergence(iter,k); qRate = quadraticConvergence(iter,1/k); lgRate = LipschitzGradientConvergenc...
github
ha-ha-ha-han/NeuromicsCellDetection-master
registerSixPoints.m
.m
NeuromicsCellDetection-master/+neuroReg/registerSixPoints.m
4,847
utf_8
84d89f2c880829628c40d20530726a1d
function M_1 = registerSixPoints(pts_1,pts_2) % This function calculate the M that let the equation % point_set_2 = M^(-1) * point_set_1 best holds. % x and y should be 3-by-6 arrays. % in the neuroReg case, x(2,:) is assumed as zero. % Because it is 1am and this is the 4th day that I work until 1am during the % week ...
github
ha-ha-ha-han/NeuromicsCellDetection-master
cutVolume.m
.m
NeuromicsCellDetection-master/+neuroReg/cutVolume.m
4,191
utf_8
c21ab95b4df9ef6cce89c058b2ca584b
function [data_out,b_plane,b_list_volume] = cutVolume(data,cut_grid,M,d) % cutVolume cut a slice from the data. % data_out.x, data_out.y, data_out.value is the output slice. % b_list is the boundary polygon (5-by-2) in the plane coordination % b_list1 is the boundary polygon (5-by-3) in the volume coordination % The sl...
github
ha-ha-ha-han/NeuromicsCellDetection-master
rotationCorr3.m
.m
NeuromicsCellDetection-master/+neuroReg/rotationCorr3.m
12,671
utf_8
ae693186f8640431e3d90302a603c363
function TransTable = rotationCorr3(pt_list_slice,pt_list_vol,data_slice,AngleRange,Option,ex_list) % rotationCorr3 returns the transformation parameters and the corresponding % correlation functions. % TransTable = ... % rotationCorr3(pt_list_slice,pt_list_vol,data_slice,AngleRange,Option,ex_list) % The transfermation...
github
ha-ha-ha-han/NeuromicsCellDetection-master
plotTransform.m
.m
NeuromicsCellDetection-master/+neuroReg/plotTransform.m
7,273
utf_8
346f38d7e1f14d32aee85c590a274023
function plotTransform(h,TransTable,DataSets,pt_list_vol,pt_list_slice,Option,ex_list,M_icp_s2v,M_icp_v2s,UseMe) % plotTransform visualize the registration from dataZ to data_slice. % h specifies the Figure handle to plot in. % TransTable is a 1-by-7 table. It can be one row from the output of % rotationCorr3. It recor...
github
ha-ha-ha-han/NeuromicsCellDetection-master
detectCells2.m
.m
NeuromicsCellDetection-master/+neuroReg/detectCells2.m
4,844
utf_8
11a89cd603ebc1b64185caae30a5f639
function [pt_list,pt_area] = detectCells2(data,Option,ex_list) % detectCells2 detects cells from a slice data. % [data_out,pt_list] = detectCells2(data,Option,ex_list) % INPUT: % data: a slice data with data.x, data.y, data.value (2D only). % For 3D data, use bwCell3. % Option: see neuroReg.setOption % ex_list: points ...
github
ha-ha-ha-han/NeuromicsCellDetection-master
detectCells3.m
.m
NeuromicsCellDetection-master/+neuroReg/detectCells3.m
7,994
utf_8
7eba0e222e182ece0386402da4122839
function [pt_list,pt_area] = detectCells3(data,Option) % detectCells3 detects cell positions from a ZStack data. % [pt_list,pt_area] = detectCells3(data,Option) % --------- % OUTPUT: % pt_list: positions of the detected cells (3-by-N array) % pt_area: volume of each detected cells (1-by-N array) % --------- % INPUT % d...
github
ha-ha-ha-han/NeuromicsCellDetection-master
rotationCorr3_20170727.m
.m
NeuromicsCellDetection-master/+neuroReg/rotationCorr3_20170727.m
14,541
utf_8
f20cc8f00c80e34760d981c40f935455
function PeakTable = rotationCorr3(pt_list,data_slice,AngleRange,Option,ex_list) % rotationCorr3 returns the transformation parameters and the corresponding % correlation functions. % The transfermation matrix is from volume to slice. % OUTPUT: % PeakTable record the possible transformation parameters and the % coorela...
github
ha-ha-ha-han/NeuromicsCellDetection-master
rotationHist3.m
.m
NeuromicsCellDetection-master/+neuroReg/rotationHist3.m
13,151
utf_8
aadff69f7a896a683b1b400a671d2cda
function PeakTable = rotationHist3(pt_list_slice,pt_list_vol,data_slice,AngleRange,Option,ex_list) % rotationHist3 returns the transformation parameters and the corresponding % correlation functions using histogram method.. % The transfermation matrix is from volume to slice. % OUTPUT: % PeakTable record the possible t...
github
ha-ha-ha-han/NeuromicsCellDetection-master
correction.m
.m
NeuromicsCellDetection-master/+neuroReg/@PlotSlices/correction.m
7,284
utf_8
692c480b324e30dab5e20d08685a7fbb
function correction(obj,varargin) % Set the Upper and Lower limit. It is changeable, but now % disabled. % tll=1; %Tolerance lower limit. %Max of tolerance is 1 and zero tolerance is forbidden. %Choose this value in between. % tul=1; %Tolerance upper limit. %Max of tolerance is 1 and zero tolera...
github
ha-ha-ha-han/NeuromicsCellDetection-master
area_secant_ph.m
.m
NeuromicsCellDetection-master/+neuroReg/@PlotSlices/private/area_secant_ph.m
1,303
utf_8
6481a9d3042db7acdb53481253370c1d
function [x,y,r] = area_secant_ph( x_grid , y_grid, x0, y0, x1, y1 ) % Area_secant_ph returns the coodinates of points of a secant of a %rectangular area defined by x_grid and y_grid. %% determine the line k=(y1-y0)/(x1-x0); reverse_flag=0; if k>10e4 % in case the line is vertical to x-axis [x_grid,y_grid]=e...
github
thk2dth/LocalSmoothing-master
Proposed.m
.m
LocalSmoothing-master/Proposed.m
3,481
utf_8
579e28d64f4fd10c4032d2e3c3027495
function [ nrbsPos, nrbsOri] = Proposed( wcs, pe, oe, c ) % Proposed method smooths the tool position and tool % orientation both in WCS. % Input: % wcs, cutter data in WCS. % pe, position error, in mm. % oe, orientation error, in rad. % c, d1/d2. c=0.25, by default. % Output: % nrbsPos, inserted B-splines du...
github
thk2dth/LocalSmoothing-master
Yang.m
.m
LocalSmoothing-master/Yang.m
2,907
utf_8
e6d6d8da4fbb32ac58939ba066de274e
function [ nrbsPos, nrbsRot] = Yang( mcs, pe, oe, mp ) % Yang's method smooths the tool position in WCS and tool % orientation in MCS. % Input: % mcs, cutter data in MCS. % pe, position error in WCS. % oe, orientation error in WCS. % mp, geometric property of machine tool. % Output: % nrbsPos, inserted B-spli...
github
thk2dth/LocalSmoothing-master
Bi.m
.m
LocalSmoothing-master/Bi.m
2,686
utf_8
dfb6f6b7f590a9f043fb61ef5bd1b555
function [ nrbsTrans, nrbsRot] = Bi( mcs, pe, oe, mp ) % Bi's method smooths the tool position and tool % orientation both in MCS. % Input: % mcs, cutter data in MCS. % pe, position error in WCS. % oe, orientation error in WCS. % mp, geometric property of machine tool. % Output: % nrbsTrans, inserted B-spline...
github
thk2dth/LocalSmoothing-master
SuccessRate.m
.m
LocalSmoothing-master/SuccessRate.m
2,362
utf_8
3f9c393aa7956fc7ec048dbccd6c7b4f
function [ra, rm, ea, em] = SuccessRate( nrbs, oe, isWCS, cornerIndex ) % Evaluate the success rate of the transition method. % If the orientation error is under the specified value, i.e., oe, % the method succeedes. % Input: % nrbs, inserted B-splines during orientation smoothing. % oe, specified orientation error...
github
thk2dth/LocalSmoothing-master
bspdegelev.m
.m
LocalSmoothing-master/nurbs_toolbox/bspdegelev.m
20,232
utf_8
f3f726254444c07038e088dfbb120a32
function [ic,ik] = bspdegelev(d,c,k,t) % % Function Name: % % bspdegevel - Degree elevate a univariate B-Spline. % % Calling Sequence: % % [ic,ik] = bspdegelev(d,c,k,t) % % Parameters: % % d : Degree of the B-Spline. % % c : Control points, matrix of size (dim,nc). % % k : Knot sequenc...
github
evanrussek/Predictive-Representations-PLOS-CB-2017-master
model_SRDYNA.m
.m
Predictive-Representations-PLOS-CB-2017-master/agents/model_SRDYNA.m
4,145
utf_8
b9bde41bec4a7e50ff64602bbf08bed6
function model = model_SRDYNA() model.init = @modelinit; model.update = @modelupdate; model.eval = @modeleval; model.choose = @modelchoose; model.dyna_update = @dyna_update; model.qlearn_update = @qlearn_update; function model = modelinit(model,game,params_in) n_sa = length(game.sa_to_nextstate); H = eye(n_s...
github
evanrussek/Predictive-Representations-PLOS-CB-2017-master
model_SRMB.m
.m
Predictive-Representations-PLOS-CB-2017-master/agents/model_SRMB.m
4,385
utf_8
ca063c120e201d37da8b2964a3a6eaba
function model = model_SRMB() model.init = @modelinit; model.update = @modelupdate; model.eval = @modeleval; model.choose = @modelchoose; model.dyna_update = @dyna_update; model.qlearn_update = @qlearn_update; function model = modelinit(model,game, params_in) if nargin < 3 % parameters model.param.epsilon = .1...
github
evanrussek/Predictive-Representations-PLOS-CB-2017-master
model_dynaQ3.m
.m
Predictive-Representations-PLOS-CB-2017-master/agents/model_dynaQ3.m
3,212
utf_8
65c8ca122cbbf62b77b3917514daccc9
function model = model_dynaQ() model.init = @modelinit; model.update = @modelupdate; model.eval = @modeleval; model.choose = @modelchoose; model.dyna_update = @dyna_update; model.q_update = @q_update; % store samples, but function model = modelinit(model,game,params_in) n_sa = length(game.sa_to_nextstate); Q = ze...
github
evanrussek/Predictive-Representations-PLOS-CB-2017-master
model_Qsr_r.m
.m
Predictive-Representations-PLOS-CB-2017-master/agents/model_Qsr_r.m
4,016
utf_8
fb07da7010d4fd773602b1dc76111181
function model = model_QSR() model.init = @modelinit; model.update = @modelupdate; model.eval = @modeleval; model.choose = @modelchoose; model.dyna_update = @dyna_update; model.qlearn_update = @qlearn_update; function model = modelinit(model,game) n_sa = length(game.sa_to_nextstate); H = eye(n_sa); H(n_sa,:) = 0;...
github
evanrussek/Predictive-Representations-PLOS-CB-2017-master
model_SRTD.m
.m
Predictive-Representations-PLOS-CB-2017-master/agents/model_SRTD.m
2,428
utf_8
5621145bdb915387e3db6b3a711936dc
function model = model_SRTD() model.init = @modelinit; model.update = @modelupdate; model.eval = @modeleval; model.choose = @modelchoose; function model = modelinit(model,game, params_in) if nargin < 3 % parameters model.param.epsilon = .1; model.param.sr_alpha = .25; model.param.w_alpha = .25; model....
github
evanrussek/Predictive-Representations-PLOS-CB-2017-master
model_Vsr_r.m
.m
Predictive-Representations-PLOS-CB-2017-master/agents/model_Vsr_r.m
2,142
utf_8
cd3291fd57ade21cafd7ca1516478814
function model = model_Vsr() model.init = @modelinit; model.update = @modelupdate; model.eval = @modeleval; model.choose = @modelchoose; function model = modelinit(model,game,params_in) if nargin < 3 % parameters model.param.epsilon = .1; model.param.sr_alpha = .25; model.param.w_alpha = .25; model.pa...