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 | mccahill/docker-novnc-fmri-master | copyfile.m | .m | docker-novnc-fmri-master/mri/BIAC/fix/MATLAB60/copyfile.m | 5,259 | utf_8 | 6494a85601f1af3853336358e873a144 | function varargout=copyfile(SourceFile,DestinationFile,flag)
%COPYFILE Copy file.
% COPYFILE(SOURCE,DEST) will copy the file SOURCE to the new file DEST.
% SOURCE and DEST may be an absolute pathname or a pathname relative to the
% current directory.
%
% COPYFILE(SOURCE,DEST,'writable') will make sure DE... |
github | mccahill/docker-novnc-fmri-master | filename2url.m | .m | docker-novnc-fmri-master/mri/BIAC/general/filename2url.m | 9,444 | utf_8 | 3e2e2c9d7bc4115defe3dcabbb4cf986 | function newURL=filename2url(fileorurl,base)
%FILENAME2URL - get valid URL from rel. or abs. filename or URI
%
% urlobj = filename2url(fileOrURL);
% urlobj = filename2url(fileOrURL, baseFileOrURL);
%
% Use this function to get a new URL object that describes the
% relative or absolute location described by '... |
github | mccahill/docker-novnc-fmri-master | toexcel.m | .m | docker-novnc-fmri-master/mri/BIAC/general/toexcel.m | 15,277 | utf_8 | 898a9f5e11759cb9f772befd3aef359d | function h=toexcel(varargin)
%TOEXCEL Export data variable to new Excel worksheet.
%
% toexcel(data,row,col,sheet,visible);
% toexcel('SaveAs',filename);
% toexcel('Save');
% toexcel('Cleanup');
% toexcel('Quit');
% toexcel('ForceQuit');
% toexcel('Done');
% toexcel('ForceDone');
% h=toexce... |
github | mccahill/docker-novnc-fmri-master | parseXPaths.m | .m | docker-novnc-fmri-master/mri/BIAC/general/parseXPaths.m | 57,971 | utf_8 | 4da1c9018903807bc4a7a129f40824d6 | function matchnodes=parseXPaths(inpaths, domcontextnode, nsdecls)
%PARSEXPATHS XPath evaluator, for DOM nodes
%
% matchnodes = parseXPaths(inpaths, domcontextnode)
% matchnodes = parseXPaths(inpaths, domcontextnode, nsdecls)
%
% Returns all nodes that match any of the XPath expressions passed
% as a cell array of ... |
github | mccahill/docker-novnc-fmri-master | chexp.m | .m | docker-novnc-fmri-master/mri/BIAC/general/chexp.m | 9,313 | utf_8 | 1c953deb48badae2a5e6309c00ada16e | function currExp = chexp(expName,expPath)
% CHEXP - Setup for experiment
%
% Setup MATLAB for the experiment selected.
% The setup consists of:
% (1) Add the Scripts directory for the current
% experiment to the path
% (2) Change directory to the experiment
%
% chexp
% Change to a curren... |
github | mccahill/docker-novnc-fmri-master | readxml.m | .m | docker-novnc-fmri-master/mri/BIAC/general/readxml.m | 15,403 | utf_8 | cf3b1cdb55822a86c0761a495764ea0e | function xmlret = readxml(varargin)
%READXML XML reader, using libxml2 or java DOM.
%
% xml = readxml(xmlfilename)
% xml = readxml(xmlfilename, [stringpaths...])
% xml = readxml(xmlfilename, namespacestruct, [stringpaths...])
%
% Converts an XML file into a MATLAB struct. Each XML element is
% represented by a s... |
github | mccahill/docker-novnc-fmri-master | findexp.m | .m | docker-novnc-fmri-master/mri/BIAC/general/findexp.m | 13,649 | utf_8 | 3bf2ed6b498efedd5ac8e1b7273c1e29 | function [expPath,expName,emsg]=findexp(expName)
% FINDEXP - Find the experiment path for given experiment name
%
% [expPath,expName,emsg]=findexp(expName)
%
% Find the path of the given experiment name in the experiment database
%
% Inputs:
% expName - Name of experiment to find (e.g. 'visual.01') - Not case sen... |
github | mccahill/docker-novnc-fmri-master | writexml.m | .m | docker-novnc-fmri-master/mri/BIAC/general/writexml.m | 8,331 | utf_8 | a9e0605d50e25f1a8a0ca81333959a85 | function writexml(xmlstruct, filename)
%WRITEXML XML writer, using libxml2 or java DOM.
%
% writexml(xmlstruct, xmlfilename)
%
% Routine for writing an XML-based MATLAB struct (as returned by
% readxml()) to an XML file.
%
% Any struct that fails the validity test used by writexml()
% will not be written. All structs ... |
github | mccahill/docker-novnc-fmri-master | dcmtkdic2matlabdic.m | .m | docker-novnc-fmri-master/mri/BIAC/general/dcmtkdic2matlabdic.m | 8,905 | utf_8 | 5888880a087a8b779da391102c4d1855 | function dcmtkdic2matlabdic(dicFilename,baseMatlabDicomDict,outputMatlabDicomDict)
%DCMTKDIC2MATLABDIC - Translate DCMTK DICOM Dictionary into MATLAB DICOM Dictionary
%
% Translate DICOM Dictionary file in format used by
% "OFFIS DICOM Software: DCMTK - DICOM Toolkit"
% into format used by MATLAB function dico... |
github | mccahill/docker-novnc-fmri-master | xpathquery.m | .m | docker-novnc-fmri-master/mri/BIAC/general/xpathquery.m | 13,562 | utf_8 | 0752c7ff7a27a50fe86a669bffdf52c4 | function [values,code] = xpathquery(xml,query_string)
%XPATHQUERY - Query an XML structure for a field using XPath
%
% [values,code] = xpathquery(xml,query_string);
%
% xml - an XML structure (as read by READXML) or an XML filename.
% query_string - the XPath query string.
% values - the VALUE if ... |
github | mccahill/docker-novnc-fmri-master | grablocation.m | .m | docker-novnc-fmri-master/mri/BIAC/general/private/grablocation.m | 10,824 | utf_8 | 63254c1f6ae1b5582c37874a727ebae9 | function [retvals,messages]=grablocation(method,URIs,base,methodargs)
%GRABLOCATION Return file ids or local filenames corresponding to given URI(s)
%
% [retvals,messages]=grablocation(method,URIs);
% [retvals,messages]=grablocation(method,URIs,base);
% [retvals,messages]=grablocation(method,URIs,base,methodargs)... |
github | jianliaoim/talk-ios-master | OnePasswordExtension.m | .m | talk-ios-master/Talk/Helper/1password/OnePasswordExtension.m | 39,548 | utf_8 | 89c1cc65949ebd8bdbd002105254f134 | //
// 1Password Extension
//
// Lovingly handcrafted by Dave Teare, Michael Fey, Rad Azzouz, and Roustem Karimov.
// Copyright (c) 2014 AgileBits. All rights reserved.
//
#import "OnePasswordExtension.h"
// Version
#define VERSION_NUMBER @(180)
static NSString *const AppExtensionVersionNumberKey = @"version_number... |
github | romainecarter/dicom2xml-master | dicom2xml.m | .m | dicom2xml-master/dicom2xml.m | 1,123 | utf_8 | c6da7390929f5c546f1dd46a877fbd72 | %Convert DICOM to XML
%Created: 8/30/2014
%Author: Romaine A. Carter
function obj = struct2xml(param)
doc = com.mathworks.xml.XMLUtils.createDocument(inputname(1));
root = doc.getDocumentElement;
obj = xmlwrite(parse(param, doc, root));
end
function obj = parse(param, doc, root)
if isstruct(... |
github | 24icewolf42/gtsam-master | ccolamd_test.m | .m | gtsam-master/gtsam/3rdparty/CCOLAMD/MATLAB/ccolamd_test.m | 11,944 | utf_8 | ab91fed9a7d6b40fa30544983b26cc7f | function ccolamd_test
%CCOLAMD_TEST extensive test of ccolamd and csymamd
%
% Example:
% ccolamd_test
%
% See also csymamd, ccolamd, ccolamd_make.
% Copyright 1998-2007, Timothy A. Davis, Stefan Larimore, and Siva Rajamanickam
% Developed in collaboration with J. Gilbert and E. Ng.
help ccolamd_test
global ccolamd... |
github | 24icewolf42/gtsam-master | geodarea.m | .m | gtsam-master/gtsam/3rdparty/GeographicLib/matlab/geodarea.m | 4,241 | utf_8 | a20b9abbe24d8781e0c053b3ddfd9f3a | function [A, P, N] = geodarea(lats, lons, ellipsoid)
%GEODAREA Surface area of polygon on an ellipsoid
%
% A = GEODAREA(lats, lons)
% [A, P, N] = GEODAREA(lats, lons, ellipsoid)
%
% calculates the surface area A of the geodesic polygon specified by the
% input vectors lats, lons (in degrees). The ellipsoid ve... |
github | 24icewolf42/gtsam-master | geoddistance.m | .m | gtsam-master/gtsam/3rdparty/GeographicLib/matlab/geoddistance.m | 17,333 | utf_8 | 3b8e33df114efbd010cafcfdd2b79868 | function [s12, azi1, azi2, S12, m12, M12, M21, a12] = geoddistance ...
(lat1, lon1, lat2, lon2, ellipsoid)
%GEODDISTANCE Distance between points on an ellipsoid
%
% [s12, azi1, azi2] = GEODDISTANCE(lat1, lon1, lat2, lon2)
% [s12, azi1, azi2, S12, m12, M12, M21, a12] =
% GEODDISTANCE(lat1, lon1, lat2, lo... |
github | 24icewolf42/gtsam-master | tranmerc_fwd.m | .m | gtsam-master/gtsam/3rdparty/GeographicLib/matlab/tranmerc_fwd.m | 5,674 | utf_8 | acff0226812f95bc17989337218cdde5 | function [x, y, gam, k] = tranmerc_fwd(lat0, lon0, lat, lon, ellipsoid)
%TRANMERC_FWD Forward transverse Mercator projection
%
% [X, Y] = TRANMERC_FWD(LAT0, LON0, LAT, LON)
% [X, Y, GAM, K] = TRANMERC_FWD(LAT0, LON0, LAT, LON, ELLIPSOID)
%
% performs the forward transverse Mercator projection of points (LAT,LON)... |
github | 24icewolf42/gtsam-master | tranmerc_inv.m | .m | gtsam-master/gtsam/3rdparty/GeographicLib/matlab/tranmerc_inv.m | 5,994 | utf_8 | 3ccf6b37ca13daed68a0ae8f166151ce | function [lat, lon, gam, k] = tranmerc_inv(lat0, lon0, x, y, ellipsoid)
%TRANMERC_INV Inverse transverse Mercator projection
%
% [LAT, LON] = TRANMERC_INV(LAT0, LON0, X, Y)
% [LAT, LON, GAM, K] = TRANMERC_INV(LAT0, LON0, X, Y, ELLIPSOID)
%
% performs the inverse transverse Mercator projection of points (X,Y) to
... |
github | 24icewolf42/gtsam-master | gtsamExamples.m | .m | gtsam-master/matlab/gtsam_examples/gtsamExamples.m | 5,664 | utf_8 | f2621b78fabdb370c4f63d5e0309b7e9 | function varargout = gtsamExamples(varargin)
% GTSAMEXAMPLES MATLAB code for gtsamExamples.fig
% GTSAMEXAMPLES, by itself, creates a new GTSAMEXAMPLES or raises the existing
% singleton*.
%
% H = GTSAMEXAMPLES returns the handle to a new GTSAMEXAMPLES or the handle to
% the existing singleton*.
%
% ... |
github | 24icewolf42/gtsam-master | VisualISAM_gui.m | .m | gtsam-master/matlab/gtsam_examples/VisualISAM_gui.m | 10,009 | utf_8 | ed501f5a7d855d179385d3bb29e65500 | function varargout = VisualISAM_gui(varargin)
% VisualISAM_gui: runs VisualSLAM iSAM demo in GUI
% Interface is defined by VisualISAM_gui.fig
% You can run this file directly, but won't have access to globals
% By running ViusalISAMDemo, you see all variables in command prompt
% Authors: Duy Nguyen Ta
% Last Mod... |
github | quantiacs-legacy/quantiacs-matlab-master | Carstens_Illustration3.m | .m | quantiacs-matlab-master/sample-trading-strategies/Carstens_Illustration3.m | 1,343 | utf_8 | c2da6a1ae4a8e96558376f1bfeccde9b | function [p, settings] = Carstens_Illustration3(DATE, OPEN, HIGH, LOW, CLOSE, exposure, settings)
settings.markets = {'CASH', 'F_CL'};
settings.budget = 1000000;
settings.slippage = 0.0;
settings.samplebegin = 20040101;
settings.sampleend = 20140101;
settings.lookback = 504;
p = zeros(1,numel(setting... |
github | quantiacs-legacy/quantiacs-matlab-master | heikinAshi.m | .m | quantiacs-matlab-master/sample-trading-strategies/heikinAshi.m | 3,564 | utf_8 | 07dad624e0f554e6c3bff9fc27fae596 | function [p, settings] = heikinAshi(DATE, OPEN, HIGH, LOW, CLOSE, VOL, exposure, equity, settings)
settings.markets = {'BAC','UNH','TWX'};
settings.slippage = 0.05;
settings.budget = 1000000;
settings.samplebegin = 20150301;
settings.sampleend = 20160301;
settings.lookback = 11;
% Check if ini... |
github | quantiacs-legacy/quantiacs-matlab-master | Carstens_Illustration7.m | .m | quantiacs-matlab-master/sample-trading-strategies/Carstens_Illustration7.m | 2,043 | utf_8 | 997f6f2dcd96314c0ccebfac8712795e | function [p, settings] = Carstens_Illustration7(DATE, OPEN, HIGH, LOW, CLOSE, exposure, settings)
settings.markets = {'CASH','F_NG', 'F_CL'};
settings.budget = 1000000;
settings.slippage = 0.0;
settings.samplebegin = 20040101;
settings.sampleend = 20200101;
settings.lookback = 504;
if ~any(strcmp('lon... |
github | quantiacs-legacy/quantiacs-matlab-master | getSettings.m | .m | quantiacs-matlab-master/QuantiacsMatlabToolbox/getSettings.m | 7,159 | utf_8 | efae60d63f3d0868441261e6e7240e08 | function [settings] = getSettings(tsN)
%GETSETTINGS scans a trading system file for its global settings and
% returns them in struct settings.
% getSettings is called once from runts prior to the first call of a
% trading system.
%
% USAGE:
%
% s = getSettings('tsName') parses trading system tsName and stores i... |
github | quantiacs-legacy/quantiacs-matlab-master | plotts.m | .m | quantiacs-matlab-master/QuantiacsMatlabToolbox/plotts.m | 21,503 | utf_8 | 6c3f7e230de4ef21e26b04bb4630980c | function [factsheet] = plotts(res)
global ress val1 val2 tsName
ress = res;
val1 = 1;
val2 = 1;
ss = get(0,'screensize');
width = 1024;
height = 600;
tsName = ress.tsName;
if ~exist('tsName','var'); tsName = 'Tradingsystem';end
factsheet = figure('Color',[1 1 1]); %, 'unit... |
github | wayne391/music-structure-analysis-in-matlab-master | pitch_to_CRP.m | .m | music-structure-analysis-in-matlab-master/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/pitch_to_CRP.m | 6,299 | utf_8 | 2b1ff346fc7f39897d4398b1102d905b | function [f_CRP,sideinfo] = pitch_to_CRP(f_pitch,parameter,sideinfo)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Name: pitch_to_CRP
% Date of Revision: 2011-03
% Programmer: Meinard Mueller, Sebastian Ewert
%
% Description:
% - Calculates CRP (Chroma DCT-reduced Log Pitch) F... |
github | wayne391/music-structure-analysis-in-matlab-master | estimateTuning.m | .m | music-structure-analysis-in-matlab-master/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/estimateTuning.m | 8,316 | utf_8 | 647298b8c7b461e8cb6a37366155a8a9 | function [shiftFB,centerA4,tuningSemitones,sideinfo] = estimateTuning(f_input,parameter,sideinfo)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Name: estimateTuning
% Date of Revision: 2011-03
% Programmer: Sebastian Ewert
%
% Description:
% - input is either a mono audio sign... |
github | MeGrimlock/libraries-master | RotToQuat.m | .m | libraries-master/libraries/AP_NavEKF/Models/Common/RotToQuat.m | 288 | utf_8 | 9239706354267c8f5f2a29f992c07de9 | % convert froma rotation vector in radians to a quaternion
function quaternion = RotToQuat(rotVec)
vecLength = sqrt(rotVec(1)^2 + rotVec(2)^2 + rotVec(3)^2);
if vecLength < 1e-6
quaternion = [1;0;0;0];
else
quaternion = [cos(0.5*vecLength); rotVec/vecLength*sin(0.5*vecLength)];
end |
github | MeGrimlock/libraries-master | NormQuat.m | .m | libraries-master/libraries/AP_NavEKF/Models/Common/NormQuat.m | 198 | utf_8 | ed913e87efc9194a2c52b266fced8da7 | % normalise the quaternion
function quaternion = normQuat(quaternion)
quatMag = sqrt(quaternion(1)^2 + quaternion(2)^2 + quaternion(3)^2 + quaternion(4)^2);
quaternion(1:4) = quaternion / quatMag;
|
github | MeGrimlock/libraries-master | QuatToEul.m | .m | libraries-master/libraries/AP_NavEKF/Models/Common/QuatToEul.m | 436 | utf_8 | c19c9235052d99b8b943a7157e83fc94 | % Convert from a quaternion to a 321 Euler rotation sequence in radians
function Euler = QuatToEul(quat)
Euler = zeros(3,1);
Euler(1) = atan2(2*(quat(3)*quat(4)+quat(1)*quat(2)), quat(1)*quat(1) - quat(2)*quat(2) - quat(3)*quat(3) + quat(4)*quat(4));
Euler(2) = -asin(2*(quat(2)*quat(4)-quat(1)*quat(3)));
Euler(3) =... |
github | OpenOCL/OpenOCL-master | ocl.m | .m | OpenOCL-master/ocl.m | 1,678 | utf_8 | a4bb5955537046fe0a2b5f9621957ecd | %% OpenOCL Open Optimal Control Library
% Software for optimal control, trajectory optimization, and
% model predictive control.
%
% Web: <a href="https://openocl.org/">https://openocl.org/</a>
% API docs: <a href="https://openocl.org/api-docs/">https://openocl.org/api-docs/</a>
%
%% Get started
%
% Run an example wit... |
github | OpenOCL/OpenOCL-master | plot.m | .m | OpenOCL-master/+ocl/plot.m | 399 | utf_8 | 570720cc9715025cce1769b54ac17a12 | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function plot(x,y,varargin)
ocl.utils.checkStartup()
x = ocl.Variable.getValue(x);
y = ... |
github | OpenOCL/OpenOCL-master | examples.m | .m | OpenOCL-master/+ocl/examples.m | 789 | utf_8 | ec8702ff770cd93f343315f5a4e72bd3 | %% List of optimal control examples
%
% * <a href="matlab:open ocl.examples.ballandbeam">ocl.examples.ballandbeam</a>
% * <a href="matlab:open ocl.examples.bouncingball">ocl.examples.bouncingball</a> (two-stage)
% * <a href="matlab:open ocl.examples.cartpole">ocl.examples.cartpole</a>
% * <a href="matlab:open ocl... |
github | OpenOCL/OpenOCL-master | stairs.m | .m | OpenOCL-master/+ocl/stairs.m | 401 | utf_8 | de002c41ca0dbfdccfbb157df5de3c05 | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function stairs(x, y, varargin)
ocl.utils.checkStartup()
x = ocl.Variable.getValue(x);
... |
github | OpenOCL/OpenOCL-master | stage.m | .m | OpenOCL-master/+ocl/+tests/stage.m | 5,031 | utf_8 | 7f734950de06eeb0e2db08c8db052019 | function stage
% stage empty test
stage = ocl.Stage(1, @emptyVars, @emptyDae);
pathcostfun = @(x,z,u,p) ocl.model.pathcosts(stage.pathcostsfh, ...
stage.x_struct, ...
stage.z_struct, ...
... |
github | OpenOCL/OpenOCL-master | structure.m | .m | OpenOCL-master/+ocl/+tests/structure.m | 1,322 | utf_8 | a57e933d8cc72ef5c5085d4219ad8253 | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function structure
assertEqual = @ocl.utils.assertEqual;
x = ocl.types.Structure();
assertEqual(x.si... |
github | OpenOCL/OpenOCL-master | run.m | .m | OpenOCL-master/+ocl/+tests/run.m | 275 | utf_8 | 699b9ebf9a5762405054f6fab80148da | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function [nFails] = run()
nFails = ocl.tests.run.core(); |
github | OpenOCL/OpenOCL-master | model.m | .m | OpenOCL-master/+ocl/+tests/model.m | 6,506 | utf_8 | 371f8c11a4f72206a42ec0fd2bf1721e | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function model
% empty dae test
[x_struct, z_struct, u_struct, p_struct, ...
~, ~, ~, ~, ...... |
github | OpenOCL/OpenOCL-master | examples.m | .m | OpenOCL-master/+ocl/+tests/examples.m | 2,499 | utf_8 | 021871e3014064f6b74f05469c138f03 | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function [o1,o2,o3,o4,o5] = examples
% test basic example (VanDerPol)
[sol,~,solver] = ocl.examples.va... |
github | OpenOCL/OpenOCL-master | variable.m | .m | OpenOCL-master/+ocl/+tests/variable.m | 6,022 | utf_8 | 8fcfbf1ca91c6f0a3fa7cd3f80003149 | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function variable
% small number of numeric value comparison
mx = false;
eps = 1e-5;
v1 = [5;2.8;2];
... |
github | OpenOCL/OpenOCL-master | integrator.m | .m | OpenOCL-master/+ocl/+tests/integrator.m | 2,189 | utf_8 | 83a00d755d703ef6c45d1fbe02aee71e | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function integrator
% linear system defined below
[x_struct, z_struct, u_struct, p_struct, ...
... |
github | OpenOCL/OpenOCL-master | treeVariable.m | .m | OpenOCL-master/+ocl/+tests/treeVariable.m | 3,142 | utf_8 | 227d313ec94e6d65dda32a52722d27e6 | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function treeVariable
assertEqual = @ocl.utils.assertEqual;
assertSqueezeEqual = @ocl.utils.asse... |
github | OpenOCL/OpenOCL-master | all.m | .m | OpenOCL-master/+ocl/+tests/+run/all.m | 272 | utf_8 | c023e69ece13abfe5944ca31b0fe376b | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function [nFails] = all
nFails = ocl.tests.run.core(1); |
github | OpenOCL/OpenOCL-master | log.m | .m | OpenOCL-master/+ocl/+tests/+run/log.m | 294 | utf_8 | 588d983a6b9e7d8e89d38e986fa90554 | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function [nFails] = log(suffix)
nFails = ocl.tests.run.core(1,1,suffix); |
github | OpenOCL/OpenOCL-master | core.m | .m | OpenOCL-master/+ocl/+tests/+run/core.m | 4,533 | utf_8 | 6bdd13e9052dc0a3d082a17d13c87200 | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function [nFails] = core(testExamples,saveLog,suffix)
% runTests()
% runTests(testExamples)
% run... |
github | OpenOCL/OpenOCL-master | stage_transition_type.m | .m | OpenOCL-master/+ocl/+tests/+feature_tests/stage_transition_type.m | 1,465 | utf_8 | 2512faf78dda65304f3fc6d1a5d0383f | function stage_transition_type
before_contact = ocl.Stage([], @before_contact_vars, @before_contact_ode, 'N', 3, 'd', 2);
after_contact = ocl.Stage(1, @after_contact_vars, @after_contact_ode, ...
@after_contact_cost, 'N', 5, 'd', 2);
before_contact.setInitialBounds('s', 1);
before_contact.setInitialBounds('v', 0);
... |
github | OpenOCL/OpenOCL-master | stage_bounds.m | .m | OpenOCL-master/+ocl/+tests/+feature_tests/stage_bounds.m | 1,290 | utf_8 | 0654aed3398b387e03c7bdca705adcdd | function stage_bounds
before_contact = ocl.Stage([], @before_contact_vars, @before_contact_ode, 'N', 3, 'd', 2);
after_contact = ocl.Stage(1, @after_contact_vars, @after_contact_ode, ...
@after_contact_cost, 'N', 5, 'd', 2);
before_contact.setInitialBounds('s', 1);
before_contact.setInitialBounds('v', 0);
before_co... |
github | OpenOCL/OpenOCL-master | stage_userdata.m | .m | OpenOCL-master/+ocl/+tests/+feature_tests/stage_userdata.m | 1,419 | utf_8 | 574cbe0ed8918408eefbf8c47fa738aa | function stage_userdata
before_contact = ocl.Stage([], @before_contact_vars, @before_contact_ode, 'N', 3, 'd', 2, ...
'userdata', 1);
after_contact = ocl.Stage(1, @after_contact_vars, @after_contact_ode, ...
@after_contact_cost, 'N', 5, 'd', 2, ...
'userdata', 2);
before_contact.setInitialStateBounds('s', 1);
b... |
github | OpenOCL/OpenOCL-master | coefficients.m | .m | OpenOCL-master/+ocl/+collocation/coefficients.m | 861 | utf_8 | 1f3e149ac83d0b202d182bc522560e52 | % This function is derived from:
%
% An implementation of direct collocation
% Joel Andersson, 2016
% https://github.com/casadi/casadi/blob/master/docs/examples/matlab/direct_collocation.m
%
% CasADi -- A symbolic framework for dynamic optimization.
% Copyright (C) 2010-2014 Joel Andersson, Joris Gillis, Moritz ... |
github | OpenOCL/OpenOCL-master | equations.m | .m | OpenOCL-master/+ocl/+collocation/equations.m | 1,242 | utf_8 | 6a54a8c2c4fe8cd7a49e0b89e92fa326 | % This function is derived from:
%
% An implementation of direct collocation
% Joel Andersson, 2016
% https://github.com/casadi/casadi/blob/master/docs/examples/matlab/direct_collocation.m
%
% CasADi -- A symbolic framework for dynamic optimization.
% Copyright (C) 2010-2014 Joel Andersson, Joris Gillis, Moritz ... |
github | OpenOCL/OpenOCL-master | evalCoefficients.m | .m | OpenOCL-master/+ocl/+collocation/evalCoefficients.m | 640 | utf_8 | 5f86f71afa1fff3613884fff6602943a | % This function is derived from:
%
% An implementation of direct collocation
% Joel Andersson, 2016
% https://github.com/casadi/casadi/blob/master/docs/examples/matlab/direct_collocation.m
%
% CasADi -- A symbolic framework for dynamic optimization.
% Copyright (C) 2010-2014 Joel Andersson, Joris Gillis, Moritz ... |
github | OpenOCL/OpenOCL-master | evalCoefficientsIntegral.m | .m | OpenOCL-master/+ocl/+collocation/evalCoefficientsIntegral.m | 778 | utf_8 | 205b7afb36196e96228efed7add4a2f5 | % This function is derived from:
%
% An implementation of direct collocation
% Joel Andersson, 2016
% https://github.com/casadi/casadi/blob/master/docs/examples/matlab/direct_collocation.m
%
% CasADi -- A symbolic framework for dynamic optimization.
% Copyright (C) 2010-2014 Joel Andersson, Joris Gillis, Moritz ... |
github | OpenOCL/OpenOCL-master | evalCoefficientsDerivative.m | .m | OpenOCL-master/+ocl/+collocation/evalCoefficientsDerivative.m | 668 | utf_8 | 7fe8e255ade418976f54a53057b83464 | % This function is derived from:
%
% An implementation of direct collocation
% Joel Andersson, 2016
% https://github.com/casadi/casadi/blob/master/docs/examples/matlab/direct_collocation.m
%
% CasADi -- A symbolic framework for dynamic optimization.
% Copyright (C) 2010-2014 Joel Andersson, Joris Gillis, Moritz ... |
github | OpenOCL/OpenOCL-master | bouncingball.m | .m | OpenOCL-master/+ocl/+examples/bouncingball.m | 1,794 | utf_8 | 901572f5722f69009e4f2cfd23b1fc46 | function [sol,times,ocp] = bouncingball
before_contact = ocl.Stage([], @before_contact_vars, @before_contact_ode, 'N', 3, 'd', 2);
after_contact = ocl.Stage(1, @after_contact_vars, @after_contact_ode, ...
@after_contact_cost, 'N', 5, 'd', 2);
before_contact.setInitialStateB... |
github | OpenOCL/OpenOCL-master | bouncingball_sim.m | .m | OpenOCL-master/+ocl/+examples/bouncingball_sim.m | 1,691 | utf_8 | 73591aab07cef3e153c0a8c7738aa7fb | function [sol,times,ocp] = bouncingball_sim
num_stages = 5;
N = 10;
stage0 = ocl.Stage([], @vars, @ode, 'N', N, 'd', 2);
stage = ocl.Stage([], @vars, @ode, 'N', N, 'd', 2);
stage0.setInitialStateBounds('s', 1);
stage0.setInitialStateBounds('v', 0);
stage0.setEndStateBounds('s', 0);
s... |
github | OpenOCL/OpenOCL-master | pendulum_sim.m | .m | OpenOCL-master/+ocl/+examples/pendulum_sim.m | 948 | utf_8 | 95ba733542f73dc6d8c7f8cfde949f9a | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Copyright 2015-2018 Jonas Koennemanm, Giovanni Licitra
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function p_vec = pendulum_sim
conf = ... |
github | OpenOCL/OpenOCL-master | vanderpol.m | .m | OpenOCL-master/+ocl/+examples/vanderpol.m | 1,472 | utf_8 | 532067012898bc7de81b4ee6d48d7135 | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Copyright 2015-2018 Jonas Koennemanm, Giovanni Licitra
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function [solution,times,problem] = vander... |
github | OpenOCL/OpenOCL-master | racecar.m | .m | OpenOCL-master/+ocl/+examples/racecar.m | 6,488 | utf_8 | a7f3b0959220ea743bc3a420e712cde9 | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Copyright 2015-2018 Jonas Koennemanm, Giovanni Licitra
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function [solution,times,ocp] = racecar
... |
github | OpenOCL/OpenOCL-master | cartpole.m | .m | OpenOCL-master/+ocl/+examples/cartpole.m | 4,179 | utf_8 | 16d8219d3469b3452b5f0df278dfddc3 | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function [sol,times,ocp] = cartpole
ocp = ocl.Problem([], 'vars', @varsfun, 'dae', @daefun, ...... |
github | OpenOCL/OpenOCL-master | ballandbeam.m | .m | OpenOCL-master/+ocl/+examples/ballandbeam.m | 5,575 | utf_8 | 53b861efefb6568ddfdaf690cd769475 | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Copyright 2015-2018 Jonas Koennemanm, Giovanni Licitra
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function [vars,times,ocp] = ballandbeam
... |
github | OpenOCL/OpenOCL-master | main_cartpole_closedloop.m | .m | OpenOCL-master/+ocl/+examples/+cartpole/main_cartpole_closedloop.m | 3,395 | utf_8 | 44469d1f5e151390dfe2e832d2652ce4 | function main_cartpole_closedloop
close all;
T = 3;
N = 60;
solver = ocl.acados.Solver( ...
T, ...
'vars', @ocl.examples.cartpole.vars, ...
'dae', @ocl.examples.cartpole.dae, ...
'pathcosts', @ocl.examples.cartpole.pathcosts, ...
'terminalcost', @ocl.examples.cartpole.terminalcost, ...
'N', N,... |
github | OpenOCL/OpenOCL-master | main_cartpole_time.m | .m | OpenOCL-master/+ocl/+examples/+cartpole/main_cartpole_time.m | 3,905 | utf_8 | c2303bedcda01b5c0cf3e93b01a9b786 | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function [sol,times,ocp] = main_cartpole_time
ocp = ocl.Problem([], 'vars', @varsfun, 'dae', @d... |
github | OpenOCL/OpenOCL-master | setup.m | .m | OpenOCL-master/+ocl/+acados/setup.m | 3,788 | utf_8 | 1d04b0bb9d71776e63a681ddf543087b | function setup()
ocl.utils.checkStartup;
latest_acados_version = 'n3_7a83d3';
cc_conf = mex.getCompilerConfigurations('C','Selected');
ocl.utils.assert(~isempty(cc_conf) && ...
(strcmp(cc_conf.ShortName, 'mingw64') || strcmp(cc_conf.ShortName, 'gcc')), ...
'Please setup gcc (Linux) or MinGW (Windows) as your c c... |
github | OpenOCL/OpenOCL-master | assertAlmostEqual.m | .m | OpenOCL-master/+ocl/+utils/assertAlmostEqual.m | 398 | utf_8 | 962a48f32ee31d26bba9a2646c82d6be | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function assertAlmostEqual(a,b,msg,eps)
if nargin<=2
msg = '';
end
if nargin<=3
eps = ... |
github | OpenOCL/OpenOCL-master | error.m | .m | OpenOCL-master/+ocl/+utils/error.m | 248 | utf_8 | e403b4ea170773f230e5cf0daa7a0b3b | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function error(msg)
error(msg) |
github | OpenOCL/OpenOCL-master | isFunHandle.m | .m | OpenOCL-master/+ocl/+utils/isFunHandle.m | 273 | utf_8 | 740b6c853b0f56084266a2331153c132 | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function r = isFunHandle(v)
r = isa(v,'function_handle'); |
github | OpenOCL/OpenOCL-master | isFunHandleOrEmpty.m | .m | OpenOCL-master/+ocl/+utils/isFunHandleOrEmpty.m | 295 | utf_8 | 6490a15adf05c5abc89ce1a83eca1496 | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function r = isFunHandleOrEmpty(v)
r = isa(v,'function_handle') || isempty(v);
|
github | OpenOCL/OpenOCL-master | startup.m | .m | OpenOCL-master/+ocl/+utils/startup.m | 8,179 | utf_8 | 594fbf3f312515e378ef5cb6296d2771 | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function startup(in)
% ocl.utils.startup(workingDirLocation)
%
% Startup script for OpenOCL
% Ad... |
github | OpenOCL/OpenOCL-master | assertSetEqual.m | .m | OpenOCL-master/+ocl/+utils/assertSetEqual.m | 417 | utf_8 | a00df3ad0dbca333d08b24e27f4009c4 | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function assertSetEqual(A,B)
if iscell(A);A=cell2mat(A);end
if iscell(B);B=cell2mat(B);end
ocl.uti... |
github | OpenOCL/OpenOCL-master | findjobj.m | .m | OpenOCL-master/+ocl/+utils/findjobj.m | 171,131 | utf_8 | 677aedb611ed0ecbfdfe6b8e71499e06 | function [handles,levels,parentIdx,listing] = findjobj(container,varargin) %#ok<*CTCH,*ASGLU,*MSNU,*NASGU>
%findjobj Find java objects contained within a specified java container or Matlab GUI handle
%
% Syntax:
% [handles, levels, parentIds, listing] = findjobj(container, 'PropName',PropValue(s), ...)
%
% Inp... |
github | OpenOCL/OpenOCL-master | deprecation.m | .m | OpenOCL-master/+ocl/+utils/deprecation.m | 267 | utf_8 | 5b4ad4603b10e2bbcced80417e1d5094 | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function deprecation(msg)
ocl.utils.warning(msg); |
github | OpenOCL/OpenOCL-master | checkStartup.m | .m | OpenOCL-master/+ocl/+utils/checkStartup.m | 704 | utf_8 | e308427cab11429f335fc408873c8adc | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function checkStartup()
OCL_CASADI_SETUP = getenv('OCL_CASADI_SETUP');
if strcmp(OCL_CASAD... |
github | OpenOCL/OpenOCL-master | assertEqual.m | .m | OpenOCL-master/+ocl/+utils/assertEqual.m | 290 | utf_8 | 72853ef2eb638589575b6487256d8828 | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function assertEqual(a,b,varargin)
assert(isequal(a,b),varargin{:})
end
|
github | OpenOCL/OpenOCL-master | getReportOctave.m | .m | OpenOCL-master/+ocl/+utils/getReportOctave.m | 1,165 | utf_8 | 682a4d8bc882ffc7f6c781ed36ec7d17 | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
% Copyright (C) 2016 Andrew Thornton
% Author: Andrew Thornton <art27@cantab.net>
% Created: December 20... |
github | OpenOCL/OpenOCL-master | exception.m | .m | OpenOCL-master/+ocl/+utils/exception.m | 273 | utf_8 | b6aa61af5136fd0e51fd1455f355a5fd | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function exception(msg)
error(['OCL EXCEPTION: ', msg]) |
github | OpenOCL/OpenOCL-master | isTestRun.m | .m | OpenOCL-master/+ocl/+utils/isTestRun.m | 299 | utf_8 | 75014d370968bfb6438862baa90319c2 | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function r = isTestRun()
global testRun
r = ~isempty(testRun) && testRun;
|
github | OpenOCL/OpenOCL-master | isOctave.m | .m | OpenOCL-master/+ocl/+utils/isOctave.m | 290 | utf_8 | beb0ff7138af210a88c5a38218412f8d | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function r = isOctave()
r = exist('OCTAVE_VERSION', 'builtin') > 0;
end
|
github | OpenOCL/OpenOCL-master | warningNotice.m | .m | OpenOCL-master/+ocl/+utils/warningNotice.m | 571 | utf_8 | f8f8de55fde156e8cabaec15ad07be8a | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function warningNotice()
global oclHasWarnings
if ~isempty(oclHasWarnings) && oclHasWarnings
ocl... |
github | OpenOCL/OpenOCL-master | warning.m | .m | OpenOCL-master/+ocl/+utils/warning.m | 301 | utf_8 | ae247301a4c203c73594758ef3fe965d | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function warning(msg)
warning(msg)
global oclHasWarnings
oclHasWarnings = true; |
github | OpenOCL/OpenOCL-master | info.m | .m | OpenOCL-master/+ocl/+utils/info.m | 648 | utf_8 | c707586ee25b19c4582d0045740c663e | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function info(msg)
N = 60; % max line width
l = length(msg);
d = floor(l/N);
new_msg = '';
offset =... |
github | OpenOCL/OpenOCL-master | assertSqueezeEqual.m | .m | OpenOCL-master/+ocl/+utils/assertSqueezeEqual.m | 433 | utf_8 | d433d59d0472353cbd5c3552c683cd6a | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function assertSqueezeEqual(a,b,varargin)
if iscell(a)
a = cell2mat(a);
end
if iscell(b)
b = cell2... |
github | OpenOCL/OpenOCL-master | assertException.m | .m | OpenOCL-master/+ocl/+utils/assertException.m | 688 | utf_8 | 78e37d2e9ca5f8cef2384752bfb548cb | % Copyright 2019 Jonas Koenemann, Moritz Diehl, University of Freiburg
% Redistribution is permitted under the 3-Clause BSD License terms. Please
% ensure the above copyright notice is visible in any derived work.
%
function assertException(compStr,fh, varargin)
thrown = false;
try
fh(varargin{:});
catch e
... |
github | runphilrun/TDU-master | tdu.m | .m | TDU-master/Matlab/tdu.m | 6,718 | utf_8 | e790d86816aaf0f044d9e8aaa75adbe0 | function varargout = tdu % main function
clear all;
clc;
format long
%% universal constants
universal_gas_constant= 8.3144598; % [J/(mol*K)]
standard_gravity = 9.81; % [m/s^2]
unitless='[-]';
%% === EDIT THESE ===
% gas properties of propellant
propellant_name = 'Air';
spec... |
github | runphilrun/TDU-master | test.m | .m | TDU-master/Matlab/test.m | 6,450 | utf_8 | 283d6869682803f60f4955cf2987eb1a | function varargout = tdu % main function
clear all;
clc;
%% universal constants
universal_gas_constant= 8.3144598; % [J/(mol*K)]
standard_gravity = 9.81; % [m/s^2]
unitless='[-]';
%% === EDIT THESE ===
% gas properties of propellant
propellant_name = 'xenon';
specific_heat_rati... |
github | AllonKleinLab/SPRING-master | dump.m | .m | SPRING-master/preprocessing_matlab/+json/dump.m | 3,925 | utf_8 | 8b7ce6e7a70fef2dc18ecf361daa486d | function str = dump(value, varargin)
%DUMP Encode matlab value into a JSON string.
%
% SYNOPSIS
%
% str = json.dump(value)
% str = json.dump(..., optionName, optionValue, ...)
%
% The function converts a matlab value to a JSON string. A value can be any
% of a double array, a logical array, a char array, a cell arr... |
github | AllonKleinLab/SPRING-master | load.m | .m | SPRING-master/preprocessing_matlab/+json/load.m | 5,366 | utf_8 | f3ad1dde39b6e80eeee2052804379bf7 | function value = load(str, varargin)
%LOAD Load matlab value from a JSON string.
%
% SYNOPSIS
%
% value = json.load(str)
% value = json.dump(..., optionName, optionValue, ...)
%
% The function parses a JSON string into a matlab value. By default,
% numeric literals are converted to double, string is converted to a ... |
github | harishrithish7/Fall-Detection-master | fitellipse.m | .m | Fall-Detection-master/fitellipse.m | 4,575 | utf_8 | ec9b880900e189a4972f3134d49be61a | %
function a = fitellipse(X,Y)
% FITELLIPSE Least-squares fit of ellipse to 2D points.
% A = FITELLIPSE(X,Y) returns the parameters of the best-fit
% ellipse to 2D points (X,Y).
% The returned vector A contains the center, radii, and orientation
% of the ellipse, stored as (Cx, Cy, Rx, Ry,... |
github | ydcun/libsvm_action-master | make.m | .m | libsvm_action-master/svm/libsvm/matlab/make.m | 888 | utf_8 | 4a2ad69e765736f8cca8e3b721fb7ebd | % This make.m is for MATLAB and OCTAVE under Windows, Mac, and Unix
function make()
try
% This part is for OCTAVE
if (exist ('OCTAVE_VERSION', 'builtin'))
mex libsvmread.c
mex libsvmwrite.c
mex -I.. svmtrain.c ../svm.cpp svm_model_matlab.c
mex -I.. svmpredict.c ../svm.cpp svm_model_matlab.c
% This part is fo... |
github | salzahrani/Matlab-Source-Code-An-Implementation-of-the-Expectation-Maximization-Algorithm-master | plot_gaussian_ellipsoid.m | .m | Matlab-Source-Code-An-Implementation-of-the-Expectation-Maximization-Algorithm-master/Matlab/plot_gaussian_ellipsoid.m | 3,937 | utf_8 | ae2127fbc22ee6e04ff9fa0b51052530 | function h = plot_gaussian_ellipsoid(m, C, sdwidth, npts, axh)
% PLOT_GAUSSIAN_ELLIPSOIDS plots 2-d and 3-d Gaussian distributions
%
% H = PLOT_GAUSSIAN_ELLIPSOIDS(M, C) plots the distribution specified by
% mean M and covariance C. The distribution is plotted as an ellipse (in
% 2-d) or an ellipsoid (in 3-d).... |
github | salzahrani/Matlab-Source-Code-An-Implementation-of-the-Expectation-Maximization-Algorithm-master | KMEANS_Part1.m | .m | Matlab-Source-Code-An-Implementation-of-the-Expectation-Maximization-Algorithm-master/Matlab/KMEANS_Part1.m | 897 | utf_8 | 59b06617f5c4e0f95acbda9312746e6d | %r: number number of iterations...
%k: number of clusters...
%x: data input
%return membership array
function [membership,centroids,count,sse_self] = KMEANS_Part1(x,intialCentroid_idx,r)
sizeX = size(x,1);
numOfClunters = size(intialCentroid_idx,2);
count = 0;
centroids = x(intialCentroid_idx,:);
sse_se... |
github | polossk/Finite-Differences-Assignments-master | hyper_demo.m | .m | Finite-Differences-Assignments-master/FinalExam/ex3/hyper_demo.m | 2,026 | utf_8 | c7fcf844fa14272dc0d909af8456d394 | %% Demonstrate hyperbolic solvers
function hyper_demo()
close all;
global s;
a = 0;
b = 1;
N = 80;
x = linspace(a,b,N+1);
xf = linspace(a,b,201);
dx = (b-a)/N;
s = 1; % wave speed
init_cond = @periodic_wave;
cfl = 0.9;
dt_stable = cfl*dx/s;
Tfinal = 2;
Nfinal =... |
github | polossk/Finite-Differences-Assignments-master | wave_eqn.m | .m | Finite-Differences-Assignments-master/FinalExam/ex3/wave_eqn.m | 3,959 | utf_8 | 9a1d981b9e74da520a1f616c9c5f92a4 | function wave_eqn()
close all;
global c f_init G_init make_periodic;
% Initial conditions
N = 320;
Tfinal = 1;
f_init = @zero_wave;
G_init = @ramp;
pause_on = false;
make_periodic = true;
% ------------------------------------------------
% Start of code
% ---------------... |
github | FilipJanasz/2016ClosedTubeSimulator-master | checkLog.m | .m | 2016ClosedTubeSimulator-master/checkLog.m | 1,142 | utf_8 | 8850f3576985e2718c422dd28ff2ec87 | %set default values for starting_file, batch size, execution time
function [starting_file,execution_time,processed_amount,starting_batch,batch_size]=checkLog(paths)
default_starting_file=1;
default_batch_size=4;
default_processed_amount=0;
default_execution_time=1500400;
default_starting_batch=1;
... |
github | FilipJanasz/2016ClosedTubeSimulator-master | IAPWS_IF97.m | .m | 2016ClosedTubeSimulator-master/IAPWS_IF97.m | 191,800 | utf_8 | 849869d5c33eccea3891f68e5fd59a01 | function out = IAPWS_IF97(fun,in1,in2)
% IAPWS_IF97(FUN,IN1,IN2)
% 27 basic water functions of water properties, based on the International
% Association on Properties of Water and Steam Industrial Formulation 1997
% (IAPWS-IF97), IAPWS-IF97-S01, IAPWS-IF97-S03rev, IAPWS-IF97-S04,
% IAPWS-IF97-S05, Revised Advi... |
github | FilipJanasz/2016ClosedTubeSimulator-master | RelapGUI.m | .m | 2016ClosedTubeSimulator-master/RelapGUI.m | 24,438 | utf_8 | 119f5996204b979ef3c2f2e9fe259aa8 | function varargout = RelapGUI(varargin)
% RELAPGUI MATLAB code for RelapGUI.fig
% RELAPGUI, by itself, creates a new RELAPGUI or raises the existing
% singleton*.
%
% H = RELAPGUI returns the handle to a new RELAPGUI or the handle to
% the existing singleton*.
%
% ... |
github | FilipJanasz/2016ClosedTubeSimulator-master | subdir.m | .m | 2016ClosedTubeSimulator-master/subdir.m | 1,218 | utf_8 | 9c025158b1ea540152ec4af07a91313a | function [sub,fls] = subdir(CurrPath)
% SUBDIR lists (recursive) all subfolders and files under given folder
%
% SUBDIR
% returns all subfolder under current path.
%
% P = SUBDIR('directory_name')
% stores all subfolders under given directory into a variable 'P'
%
% [P F] = SUBDIR('directory_... |
github | TWANG006/TW-master | histtruncate.m | .m | TW-master/TW/MATLAB/histtruncate.m | 1,814 | utf_8 | a65c56e99141ba8f131331a84ab9b039 | function [newim, sortv] = histtruncate(im, lHistCut, uHistCut, varargin)
if lHistCut < 0 | lHistCut > 100 | uHistCut < 0 | uHistCut > 100
error('Histogram truncation values must be between 0 and 100');
end
if ndims(im) == 3 % Assume colour image in RGB
hsv = rgb2hsv(im); % Convert to HSV
... |
github | Space-at-VT/CubeSatRPO-master | newSatellite.m | .m | CubeSatRPO-master/CubeSatProxOps/newSatellite.m | 70,390 | utf_8 | 1d15ea1fe3c19c5e1d2c87d8d0a7974a | %% New Satellite
classdef newSatellite < handle
%% Default properties of a basic 6U cubesat
properties
%% Model
name = 'CubeSat' %Satellite name
EOM = 'LERM' %Relative motion model
mode = 'approach' %Satellite objective
color = ... |
github | Space-at-VT/CubeSatRPO-master | twoImpulse.m | .m | CubeSatRPO-master/CubeSatProxOps/twoImpulse.m | 2,059 | utf_8 | 2d5fab6588421867e73d9b5503043f30 | function twoImpulse()
clear,clc
close all
r = 6803.1366e3;
n = sqrt(3.986e14/r^3);
TP = 2*pi/n;
t0 = 0;
tf = 1;
tspan = TP*linspace(t0,tf,1000);
% R = linspace(1,20,10);
R = [2,4,8,16];
figure
hold on
for jj = 1:length(R)
for ii = 1:length(tspan)
dv(ii) = twoIM(tspan(ii),R(jj));
end
dvhalf = two... |
github | Space-at-VT/CubeSatRPO-master | setEOM.m | .m | CubeSatRPO-master/CubeSatProxOps/oldLPfunctions/setEOM.m | 1,415 | utf_8 | efeee4ca71a623c30d168c05fe7b5518 | % Solve for equations of motion
function [Aeqnew,beqnew] = setEOM(Aeqold,beqold,sat,R)
if nargin < 4 || isempty(R),R = sat.Rib;end
dt = sat.scenario.dt;
Nsim = sat.Nsim;
Nvar = sat.Nvar;
Ntotal = sat.Ntotal;
alpha = sat.umax*dt/sat.m; %position multiplier
beta = sat.umax*dt^2/sat.m; %velocity multiplier
t = sat.t(en... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.