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
F-Dominguez/Diffusion-Matlab-Code-master
Evolve_MPopulation.m
.m
Diffusion-Matlab-Code-master/Evolve_MPopulation.m
5,941
utf_8
b1a69fe297475992c2cab1ed66c94e77
%*********************************************************** %* Evolve_MPopulation * %* Core of the program, the percolation is simulated here. * %* By Francisco Dominguez * %*********************************************************** %This is the c...
github
F-Dominguez/Diffusion-Matlab-Code-master
Reshape_Variable.m
.m
Diffusion-Matlab-Code-master/Reshape_Variable.m
2,538
utf_8
25ac9603aaa7a2c5c98b5abee9fe69ff
%********************************************************* %* Reshape_Variable * %* Data Reshaping for 2d plots. * %* By Francisco Dominguez * %********************************************************* %This script was made to...
github
F-Dominguez/Diffusion-Matlab-Code-master
Graph_User_Int.m
.m
Diffusion-Matlab-Code-master/Graph_User_Int.m
21,044
utf_8
6687d8b29dbfe8b66b7a0a902e7be7e9
%********************************************************** %* GraphUserInt * %* Graphical User Interface for dynamic plotting of data. * %* By Francisco Dominguez * %********************************************************** %This is the Graphi...
github
F-Dominguez/Diffusion-Matlab-Code-master
ex_guide_timergui.m
.m
Diffusion-Matlab-Code-master/ex_guide_timergui.m
8,944
utf_8
dc94c5d7ae75caac75357216e8938ac5
%********************************************************* %* ex_guide_timergui * %* Matlab generated code for the GUI. * %* By Francisco Dominguez * %********************************************************* %This is part of the GUI...
github
F-Dominguez/Diffusion-Matlab-Code-master
timebar.m
.m
Diffusion-Matlab-Code-master/timebar.m
8,214
utf_8
15e17e2697a003309ee51a489317c97c
%*************************************************** %* Timebar * %* Modified waitbar function of Matlab to estimate * %* time remaining. * %*************************************************** %This is a modified version of MATLAB's waitbar functi...
github
isetbio/UnitTestToolbox-master
pushToGithub.m
.m
UnitTestToolbox-master/@UnitTest/pushToGithub.m
13,908
utf_8
44111747bad4758b621ee842fb1b71dc
% Method to push ALL published HTML directories to github function pushToGithub(obj, vScriptsList) fprintf('\n------------------------------------------------------------------------------------------------------------'); fprintf('\nPushing to github (%s)', UnitTest.getPref('githubRepoURL')); fprintf('...
github
isetbio/UnitTestToolbox-master
assert.m
.m
UnitTestToolbox-master/@UnitTest/assert.m
275
utf_8
a3f8703929470471833f53472cc68fe6
% Ask whether passed expression is true. function assert(expression,msgString) if (~expression) UnitTest.validationRecord('FAILED', ['Assertion ' msgString ' is false ']); else UnitTest.validationRecord('PASSED', ['Assertion ' msgString ' is true ']); end end
github
isetbio/UnitTestToolbox-master
initializeUnitTest.m
.m
UnitTestToolbox-master/@UnitTest/initializeUnitTest.m
2,147
utf_8
52d73ca490969654ba8340928a266a88
% Method to initialize the instantiated @UnitTest object function initializeUnitTest(obj) % setup default validation params for k = 1:numel(UnitTest.validationOptionNames) eval(sprintf('obj.defaultValidationParams.%s = UnitTest.validationOptionDefaultValues{k};', UnitTest.validationOptionNames{k})); ...
github
isetbio/UnitTestToolbox-master
importGroundTruthData.m
.m
UnitTestToolbox-master/@UnitTest/importGroundTruthData.m
3,489
utf_8
991647258e54cb9cd1915ea9334bb9de
% Method to import a ground truth data entry function [validationData, extraData, validationTime, hostInfo] = importGroundTruthData(obj, dataFileName) % Choose loading strategy and delegate to subfunction. if (obj.useRemoteDataToolbox) [validationData, extraData, validationTime, hostInfo] = fromRemoteDa...
github
isetbio/UnitTestToolbox-master
describeValidationOptions.m
.m
UnitTestToolbox-master/@UnitTest/describeValidationOptions.m
675
utf_8
d71e47254adbb6f0fc7b7ac2a6383fd2
% Method to print what validation options are available and their default values function describeValidationOptions() fprintf('\nAvailable validation options and their default values:\n'); for k = 1:numel(UnitTest.validationOptionNames) if ischar(UnitTest.validationOptionDefaultValues{k}) fp...
github
isetbio/UnitTestToolbox-master
roundToNdigits.m
.m
UnitTestToolbox-master/@UnitTest/roundToNdigits.m
355
utf_8
207d505ae211099ad97e615f2e29319e
% Method to round numeric values to N decimal digits function roundedValue = roundToNdigits(numericValue, decimalDigits) if (isempty(numericValue)) roundedValue = numericValue; return; end truncator = 10^(-decimalDigits); roundedValue = sign(numericValue) .* round(abs(numericVa...
github
isetbio/UnitTestToolbox-master
assertIsZero.m
.m
UnitTestToolbox-master/@UnitTest/assertIsZero.m
592
utf_8
84fa9ffb08291fd58d5c0ae80a8ecbb9
% Ask whether passed expression is within tolerance of zero. function assertIsZero(diffExpression,exprString,tolerance) %% Do the comparison if (max(abs(diffExpression(:)) > tolerance)) message = sprintf('%s differs from zero by more than tolerance (%0.1g). [Diff: %g]', exprString, tolerance, max(a...
github
isetbio/UnitTestToolbox-master
setPref.m
.m
UnitTestToolbox-master/@UnitTest/setPref.m
1,705
utf_8
8ba4a0cb554ca961ff7db4d6f1a5d787
% Method to set a preference for the current project function setPref(preferenceName, value) % Get current project name theProjectName = getpref('UnitTest', 'projectName'); if ~(ispref(theProjectName, preferenceName)) error('''%s is not a valid preference name', preferenceName); end ...
github
isetbio/UnitTestToolbox-master
closeAllNonDataMismatchFigures.m
.m
UnitTestToolbox-master/@UnitTest/closeAllNonDataMismatchFigures.m
518
utf_8
1d16bf77ed79d4d294cdb0216ed17248
% Method to close all non-data mismatch figures function closeAllNonDataMismatchFigures() % Deal with this 2014b issue ? later. if (1==2) % Get all open figure objects fh = findall(0,'type','figure'); % Go through each open figure and if it is NOT a data mismatch % figure, clo...
github
isetbio/UnitTestToolbox-master
extraData.m
.m
UnitTestToolbox-master/@UnitTest/extraData.m
946
utf_8
7334b8c3d92f619cd8bcbb9406eacee9
% Method to add new data to the extra data struct function data = extraData(varargin) data = []; persistent extraData if ischar(varargin{1}) && ischar(varargin{2}) && (strcmp(varargin{1}, 'command')) && (strcmp(varargin{2}, 'init')) extraData = struct(); return; end if...
github
isetbio/UnitTestToolbox-master
describeRunTimeOptions.m
.m
UnitTestToolbox-master/@UnitTest/describeRunTimeOptions.m
646
utf_8
7d9de180df3596d4d538464e4cf5df49
% Method to print what runtime options are available and their default values function describeRunTimeOptions() fprintf('\nAvailable runTime options and their default values:\n'); for k = 1:numel(UnitTest.runTimeOptionNames) if ischar(UnitTest.runTimeOptionDefaultValues{k}) fprintf('\t %-25s...
github
isetbio/UnitTestToolbox-master
queryUserWhetherToReallyGenerateGroundTruth.m
.m
UnitTestToolbox-master/@UnitTest/queryUserWhetherToReallyGenerateGroundTruth.m
2,248
utf_8
502c12b625b1e51df05508bdd3c3dec1
% Method to query the user whether to really generate ground truth % (only evoked if the validation data set is not found) function [forceGenerateGroundTruth, cancelRun] = queryUserWhetherToReallyGenerateGroundTruth(obj, validationMode, scriptName) generateDataForAllScripts = upper('Yes, generate missing ground tr...
github
isetbio/UnitTestToolbox-master
publishProjectTutorials.m
.m
UnitTestToolbox-master/@UnitTest/publishProjectTutorials.m
16,153
utf_8
b10753a550a903e90450aab45ca1f8d3
% Method to publish a project's tutorials function publishProjectTutorials(p, scriptsToSkip, scriptCollection) % Unload params struct % These are: % - rootDirectory % - ghPagesCloneDir % - wikiCloneDir % - tutorialsSourceDir % - tutorialsTargetHTMLsubdir % - tutorialDocsURL % - verb...
github
isetbio/UnitTestToolbox-master
removeValidationDataDir.m
.m
UnitTestToolbox-master/@UnitTest/removeValidationDataDir.m
350
utf_8
d3ced89886502dbd5418e76565490e86
% Method to remove the root validationData directory function removeValidationDataDir(obj) if (exist(obj.validationDataDir, 'dir')) fprintf('\nRemoving validation data directory ''%s''.\n', obj.validationDataDir); rmpath(obj.validationDataDir); system(sprintf('rm -r -f %s', obj.validationD...
github
isetbio/UnitTestToolbox-master
displayNicelyFormattedStruct.m
.m
UnitTestToolbox-master/@UnitTest/displayNicelyFormattedStruct.m
3,714
utf_8
94156eccf3a07fe4527ddfb532048060
% Method to display a nicely formatted view of all the fields in a nested structure function s = displayNicelyFormattedStruct(varargin) if (nargin ~= 4) error('Usage: displayNicelyFormattedStruct(structVar, structName, '''', maxFieldWidth)'); else datum = varargin{1}; datumName = varargi...
github
isetbio/UnitTestToolbox-master
usePreferencesForProject.m
.m
UnitTestToolbox-master/@UnitTest/usePreferencesForProject.m
4,103
utf_8
cf862a9711932fbdc8a48c3922b4c73a
% Method to select the preference group corresponding to the given project function usePreferencesForProject(theProjectName, initMode) if ((nargin == 0) || (~ischar(theProjectName))) error('''UnitTest.usePreferencesForProject()'' requires a character string as its only argument'); end setpref(...
github
isetbio/UnitTestToolbox-master
validate.m
.m
UnitTestToolbox-master/@UnitTest/validate.m
38,802
utf_8
ebb3c1b6d1cfa4037dd8876814edfbbf
% Main validation engine function abortValidationSession = validate(obj, vScriptsToRunList) % get validation params validationParams = obj.validationParams; if (validationParams.verbosity > -1) fprintf('\n------------------------------------------------------------------------------------------...
github
isetbio/UnitTestToolbox-master
removeHTMLDir.m
.m
UnitTestToolbox-master/@UnitTest/removeHTMLDir.m
286
utf_8
13b039c6badf62d7faedae9f8e7378a4
% Method to remove the root HTML directory function removeHTMLDir(obj) if (exist(obj.htmlDir, 'dir')) fprintf('\nRemoving HTML directory ''%s''.\n', obj.htmlDir); rmpath(obj.htmlDir); system(sprintf('rm -r -f %s', obj.htmlDir)); end end
github
isetbio/UnitTestToolbox-master
selectScriptFromExistingOnes.m
.m
UnitTestToolbox-master/@UnitTest/selectScriptFromExistingOnes.m
2,584
utf_8
c27f010675e59bfbcc1c1841aa7e58eb
% Method that prints all available validation scripts and asks the user to select one for validation. % % Optional key/value pairs % 'prompt' - string (default 'Enter script no. to validate/publish'). % Selection prompt string function scriptToValidate = selectScriptFromExistingOnes(varargin) p = inputParser; p....
github
isetbio/UnitTestToolbox-master
roundCellArrayGivenTolerance.m
.m
UnitTestToolbox-master/@UnitTest/roundCellArrayGivenTolerance.m
1,853
utf_8
46e2f467185e4aa0c6548c3a7a2f2534
% Method to recursively round a cellArray (alternative to roundCellArray) function cellArray = roundCellArrayGivenTolerance(oldCellArray, fieldName, globalTolerance, customTolerances) cellArray = oldCellArray; for k = 1:numel(cellArray) % get field fieldValue = cellArray{k}; ...
github
isetbio/UnitTestToolbox-master
issueGitCommand.m
.m
UnitTestToolbox-master/@UnitTest/issueGitCommand.m
233
utf_8
c03b8867b1257a72706504d60e0c2d05
% Method to issue a git command with output capture function issueGitCommand(obj, commandString) [status,cmdout] = system(commandString,'-echo'); if (obj.validationParams.verbosity > 2) disp(cmdout) end end
github
isetbio/UnitTestToolbox-master
generateDirectory.m
.m
UnitTestToolbox-master/@UnitTest/generateDirectory.m
1,360
utf_8
d718f4f24d210882e03901df83f5c844
% Method to generate the directory path/subDir, if this directory does not exist function directoryExistedAlready = generateDirectory(obj, path, subDir) fullDir = sprintf('%s/%s', path, subDir); directoryExistedAlready = true; % Get current project name theProjectName = getpref('UnitTest', 'project...
github
isetbio/UnitTestToolbox-master
setValidationOptions.m
.m
UnitTestToolbox-master/@UnitTest/setValidationOptions.m
2,823
utf_8
8a7c967904e6bbf80bedbd9dc5597108
% Method to set certain validation options function setValidationOptions(obj,varargin) % parse inputs parser = inputParser; parser.addParamValue('type', obj.validationParams.type, @ischar); parser.addParamValue('onRunTimeError', obj.validationParams.on...
github
isetbio/UnitTestToolbox-master
structsAreSimilar.m
.m
UnitTestToolbox-master/@UnitTest/structsAreSimilar.m
18,571
utf_8
c539dbd37c29420ebbafb9d1478aa928
function [structsAreSimilarWithinSpecifiedTolerance, result, customToleranceFieldsArray] = structsAreSimilar(obj, groundTruthData, validationData, customTolerances) tolerance = obj.validationParams.numericTolerance; graphMismatchedData = obj.validationParams.graphMismatchedData; compareStringFiel...
github
isetbio/UnitTestToolbox-master
parseScriptsList.m
.m
UnitTestToolbox-master/@UnitTest/parseScriptsList.m
1,871
utf_8
44aa3537e176db6941e19eea69428c11
% Method to parse the scripts list to ensure it is valid function vScriptsList = parseScriptsList(obj, vScriptsToRunList) scriptListEntry = vScriptsToRunList{1}; if (exist(scriptListEntry{1}, 'file')==2) % List of files, each with an optional runtime option vScriptsList = vScriptsToRunList; ...
github
isetbio/UnitTestToolbox-master
checkDirectories.m
.m
UnitTestToolbox-master/@UnitTest/checkDirectories.m
2,133
utf_8
7387a855d19de6123851b330a93d053b
% Method ensuring that directories exist, and generates them if they do not function cancelRun = checkDirectories(obj, projectSpecificPreferences) cancelRun = false; % do not automatically generate ground truth for all scripts with missing ground truth data set obj.forceGenerateFastGroundTruthForAllSc...
github
isetbio/UnitTestToolbox-master
resetValidationOptions.m
.m
UnitTestToolbox-master/@UnitTest/resetValidationOptions.m
192
utf_8
f7c1ec1693e494cf9bf53d0b2ceabe99
% Method to reset all validation options to default function resetValidationOptions(obj) % default params obj.validationParams = obj.defaultValidationParams; end
github
isetbio/UnitTestToolbox-master
runProjectTutorials.m
.m
UnitTestToolbox-master/@UnitTest/runProjectTutorials.m
3,007
utf_8
44af3949db58a9068651e7ed1f9ffb9e
function status = runProjectTutorials(p, scriptsToSkip, scriptCollection) % Method to run a project's tutorials % % Syntax: % status = runProjectTutorials(p, scriptsToSkip, scriptCollection) % % Outputs: % status - Returns true if all ran OK, false otherwise. % % Unload params struct % These are: ...
github
isetbio/UnitTestToolbox-master
roundCellArray.m
.m
UnitTestToolbox-master/@UnitTest/roundCellArray.m
1,334
utf_8
670048d0de2e0403d769240ad727481b
% Method to recursively round a cellArray function cellArray = roundCellArray(oldCellArray) cellArray = oldCellArray; for k = 1:numel(cellArray) fieldValue = cellArray{k}; % Char values if ischar(fieldValue) % Get current project name theProjectName ...
github
isetbio/UnitTestToolbox-master
validationData.m
.m
UnitTestToolbox-master/@UnitTest/validationData.m
4,313
utf_8
5427db8aaa96c8525c684a8f28eb27fd
% Method to add new data to the validation data struct function data = validationData(varargin) persistent validationData data = []; if ischar(varargin{1}) && ischar(varargin{2}) && (strcmp(varargin{1}, 'command')) && (strcmp(varargin{2}, 'init')) validationData = struct(); re...
github
isetbio/UnitTestToolbox-master
plotDataAndTheirDifference.m
.m
UnitTestToolbox-master/@UnitTest/plotDataAndTheirDifference.m
12,751
utf_8
219f06aff6c25c0565782427f1db4576
% Method to plot mistmatched validation data and their difference function figureName = plotDataAndTheirDifference(obj, field1, field2, field1Name, field2Name) obj.dataMismatchFigNumber = obj.dataMismatchFigNumber + 1; h = figure(obj.dataMismatchFigNumber); figureName = sprintf('''%s'' vs. ''%s''', field...
github
isetbio/UnitTestToolbox-master
validationRecord.m
.m
UnitTestToolbox-master/@UnitTest/validationRecord.m
3,157
utf_8
d2e05a5e612bbd698897378002ab0bf2
% Method to append messages to the validationReport function [report, validationFailedFlag, validationFundamentalFailureFlag] = validationRecord(varargin) report = {}; validationFailedFlag = false; persistent validationReport persistent validationFailedFlagVector persistent validationFunda...
github
isetbio/UnitTestToolbox-master
runValidationSession.m
.m
UnitTestToolbox-master/@UnitTest/runValidationSession.m
5,098
utf_8
e25d99f2c3ef79d81eced8f190bf5f38
function [UnitTestOBJ, abortValidationSession] = runValidationSession(vScriptsList, desiredMode) if (nargin == 1) fprintf('\nAvailable validation modes:'); fprintf('\n\t 1. FASTEST (runtime errors only)'); fprintf('\n\t 2. FAST (runtime errors + data hash comparison)'); fprintf('...
github
isetbio/UnitTestToolbox-master
listPrefs.m
.m
UnitTestToolbox-master/@UnitTest/listPrefs.m
1,147
utf_8
3d1a2a2ad756963ca4f589a8fb22b1b8
% Method to list all the preferences for the current project function listPrefs % Get current project name theProjectName = getpref('UnitTest', 'projectName'); validationPrefs = getpref(theProjectName); preferenceNames = fieldnames(validationPrefs); fprintf('\n%-34s : ''%s'', with the fol...
github
isetbio/UnitTestToolbox-master
generateSHA256Hash.m
.m
UnitTestToolbox-master/@UnitTest/generateSHA256Hash.m
18,460
utf_8
bb4cead54dd4d2836001a2b64c81d2b5
function hashSHA25 = generateSHA256Hash(obj,validationData) Opt.Method = 'SHA-256'; Opt.Input = 'array'; hashSHA25 = DataHash(validationData, Opt); end function Hash = DataHash(Data, Opt) % DATAHASH - Checksum for Matlab array of any type % This function creates a hash value for an input of any type. The...
github
isetbio/UnitTestToolbox-master
roundStructGivenTolerance.m
.m
UnitTestToolbox-master/@UnitTest/roundStructGivenTolerance.m
2,202
utf_8
2f5a293e9f11e0cdede018cb1b935ead
% Method to recursively round a struct, given custom tolerance function s = roundStructGivenTolerance(oldStruct, structName, globalTolerance, customTolerances) s = oldStruct; if (isempty(s)) return; end structFieldNames = fieldnames(s); for k = 1:numel(structFieldNames) ...
github
isetbio/UnitTestToolbox-master
selectToleranceToEmploy.m
.m
UnitTestToolbox-master/@UnitTest/selectToleranceToEmploy.m
8,097
utf_8
00d88f1708bd5392c3e94ceecd781546
% Method to select which tolerance to employ by checking if the fieldName exists in customTolerances function [toleranceEmployed, isCustom] = selectToleranceToEmploy(globalTolerance, customTolerances, fieldName) toleranceEmployed = globalTolerance; isCustom = false; %fieldName fieldName = strrep(fi...
github
isetbio/UnitTestToolbox-master
roundStruct.m
.m
UnitTestToolbox-master/@UnitTest/roundStruct.m
1,458
utf_8
ff45aabdcdd9b85cdc0bcc1ebd5e66f9
% Method to recursive round a struct function s = roundStruct(oldStruct) s = oldStruct; if (isempty(s)) return; end structFieldNames = fieldnames(s); for k = 1:numel(structFieldNames) % get field fieldValue = s.(structFieldNames{k}); if is...
github
isetbio/UnitTestToolbox-master
getPref.m
.m
UnitTestToolbox-master/@UnitTest/getPref.m
300
utf_8
c6cc41eb80cfca7f327a7b55cf69c0af
% Method to get a preference for the current project function preferenceValue = getPref(preferenceName) % Get current project name theProjectName = getpref('UnitTest', 'projectName'); % Return the preference value preferenceValue = getpref(theProjectName, preferenceName); end
github
isetbio/UnitTestToolbox-master
initializeValidationRun.m
.m
UnitTestToolbox-master/@UnitTest/initializeValidationRun.m
2,900
utf_8
09e8719d76aaf163d83aa61eda8f2e14
function runTimeParams = initializeValidationRun(varargin) % Initialize run params runTimeParams = initializeRunTimeParams(varargin); % Initialize validation record UnitTest.validationRecord('command', 'init'); % Initialize validationData UnitTest.validationData('command', 'init'); ...
github
isetbio/UnitTestToolbox-master
exportData.m
.m
UnitTestToolbox-master/@UnitTest/exportData.m
3,353
utf_8
14d54ecb4fd0a61ee0a411ea88809709
% Method to export a validation entry to a validation file % remotePath, artifactId, fastVsFull, data, version function exportData(obj, dataFileName, validationData, extraData) runData.validationData = validationData; runData.extraData = extraData; runData.validationTime = datestr(...
github
isetbio/UnitTestToolbox-master
RemoteDataCoordinatesForFilePath.m
.m
UnitTestToolbox-master/UnitTestTools/RemoteDataCoordinatesForFilePath.m
654
utf_8
f4defe4e420b0d1c0dda3b3106540c1b
% Parse data "coordinates" like artifactId from a local file path. function [remotePath, artifactId] = RemoteDataCoordinatesForFilePath(dataFileName) % parse remote data "coordinates" from the file path [dataFilePath, dataFileBase] = fileparts(dataFileName); [~, dataFileSubfolder] = fileparts(dataFileP...
github
isetbio/UnitTestToolbox-master
ConfigureUnitTestValidationForNewProject.m
.m
UnitTestToolbox-master/UnitTestTools/ConfigureUnitTestValidationForNewProject.m
15,835
utf_8
f3b72abb9d4bb24a296542d6e49e41d1
function ConfigureUnitTestValidationForNewProject % save current directory so we can return to it currentDir = pwd; % Get the auto config resource dir AutoConfigResourceDir = GetAutoConfigResourceDir(); projectName = input('\n<strong> STEP 1/6 </strong> Enter UnitTest project name (e.g.,...
github
isetbio/UnitTestToolbox-master
UnitTestPreferencesTemplate.m
.m
UnitTestToolbox-master/UnitTestTools/UnitTestPreferencesTemplate.m
3,095
utf_8
768057939367fd7fb2714c8191382d02
% Method to set project-specific preferences. Generally, this script should % be run once only. For different projects, copy this file to the projects' directory % and adapt the p-struct according to that project's specifics. % % You can just run the distributed (Template) version to accept the % defaults, or you can m...
github
isetbio/UnitTestToolbox-master
v_script1.m
.m
UnitTestToolbox-master/UnitTestTools/AutoConfigResources/v_script1.m
1,199
utf_8
8bad7b2db007c8c9d06e80b0278bdb60
function varargout = v_script1(varargin) % % Description of what the script does % varargout = UnitTest.runValidationRun(@ValidationFunction, nargout, varargin); end %% Function implementing the validation code function ValidationFunction(runTimeParams) % Code goes here % Add some useful message Un...
github
noureldien/PortfolioOptimization-master
cvx_version.m
.m
PortfolioOptimization-master/cvx_version.m
14,458
utf_8
2d6b5dc232fa3eae5c5f570d43ae7fb4
function varargout = cvx_version( varargin ) % CVX_VERSION Returns version and environment information for CVX. % % When called with no arguments, CVX_VERSION prints out version and % platform information that is needed when submitting CVX bug reports. % % This function is also used internally to return use...
github
noureldien/PortfolioOptimization-master
portfolioError.m
.m
PortfolioOptimization-master/portfolioError.m
448
utf_8
00aba10ac3cd43c2ec914b2fa7fbe783
% calcuate the root-mean-square error between the given % portfolio and the target function [ rmse ] = portfolioError( portfolio, target ) % given portfolio of n*m % n: opeservations % m: assets % required to calcuate the return per observation % then calcuate the sharpe ratio for these returns n = size(portfolio, 1)...
github
noureldien/PortfolioOptimization-master
cvx_grbgetkey.m
.m
PortfolioOptimization-master/cvx_grbgetkey.m
19,096
utf_8
080162e4fd27b14ea8387362148db7d1
function success = cvx_grbgetkey( kcode, overwrite ) % CVX_GRBGETKEY Retrieves and saves a Gurobi/CVX license. % % This function is used to install Gurobi license keys for use in CVX. It % is called with your Gurobi license code as a string argument; e.g. % % cvx_grbgetkey xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx % ...
github
noureldien/PortfolioOptimization-master
naiveMV_CVX.m
.m
PortfolioOptimization-master/naiveMV_CVX.m
2,242
utf_8
1952982de65cac3daa26a4163540f40d
% given ERet which is the expected return, ECov, which % is the expected risk function [PRisk, PRoR, PWts] = naiveMV_CVX(ERet, ECov, NPts) % makes sure it is a column vector ERet = ERet(:); % get number of assets NAssets = length(ERet); % vector of lower bounds on weights V0 = zeros(NAssets, 1); % row vector of one...
github
noureldien/PortfolioOptimization-master
portfolioAverageReturn.m
.m
PortfolioOptimization-master/portfolioAverageReturn.m
433
utf_8
b83a847b2df04104e14a1fa8249c02e8
% calcuate average of all the returns of the assets % in the given portfolio function [ averageReturn, returns ] = portfolioAverageReturn( portfolio ) % given portfolio of n*m % n: opeservations % m: assets % required to calcuate the return per observation % then calculate the average return n = size(portfolio, 1); r...
github
noureldien/PortfolioOptimization-master
portfolioSharpeRatio.m
.m
PortfolioOptimization-master/portfolioSharpeRatio.m
569
utf_8
ad634d8e2b3f1c6082861740871f2c6e
% calcuate the Sharpe ratio for all the returns of the assets % in the given portfolio function [ sharpeRatio ] = portfolioSharpeRatio( portfolio ) % given portfolio of n*m % n: opeservations % m: assets % required to calcuate the return per observation % then calcuate the sharpe ratio for these returns n = size(port...
github
noureldien/PortfolioOptimization-master
naiveMV.m
.m
PortfolioOptimization-master/naiveMV.m
1,491
utf_8
61c821c2006f938bc5ee73f49fd6e960
% given ERet which is the expected return, ECov, which % is the expected risk function [PRisk, PRoR, PWts] = naiveMV(ERet, ECov, NPts) % makes sure it is a column vector ERet = ERet(:); % get number of assets NAssets = length(ERet); % vector of lower bounds on weights V0 = zeros(NAssets, 1); % row vector of ones V1...
github
noureldien/PortfolioOptimization-master
sparseIndexTracking.m
.m
PortfolioOptimization-master/sparseIndexTracking.m
931
utf_8
ccdd314b064f1e69e48c262d7165680f
% select n assets from the given returns and tune their weights % to form an n-asset portfolio that best mimics the index function [ weights, assetIdx ] = sparseIndexTracking( returns, index, maxAssets ) % given % 1. assets of n*m % n: opeservations % m: assets % 2. index is n*1 % n: opservations % 3. maxAssets % how...
github
noureldien/PortfolioOptimization-master
gaStockSelect.m
.m
PortfolioOptimization-master/GATracker/mfiles/gaStockSelect.m
5,133
utf_8
1332cfc9351a9c0d75eca5fb98b7f7da
function [WTS1,X1] = gaStockSelect(cv,wts,NumStocks,NumPop,flag) if nargin < 5 flag = false; end NumAssets = size(cv,2); ipop = zeros(NumPop,NumAssets); Basic = [ones(1,NumStocks), zeros(1,NumAssets-NumStocks)]; for ii = 1:NumPop ipop(ii,:) = Basic(randperm(NumAssets)); end %% GA step fitnessFunction = @(W)...
github
noureldien/PortfolioOptimization-master
CreateIndex.m
.m
PortfolioOptimization-master/GATracker/mfiles/CreateIndex.m
2,447
utf_8
118c9cc308529f1d3ddbbafe6ec6f0f8
function Wts = CreateIndex(NumDays,NumStocks,TotalNumStocks,L,K,s,t) % Create a fake index for our tracker to track - use a stochastic process % drawn from Black Scholes to create a series of fake weightings for an % Index % % NumDays - number of days to simulate % NumStocks - Number of stocks to use in the Index ...
github
noureldien/PortfolioOptimization-master
HSDNTcorr.m
.m
PortfolioOptimization-master/sdpt3/HSDSolver/HSDNTcorr.m
1,001
utf_8
c42eba1c6bae660b88921b7c8747490e
%%************************************************************************ %% HSDNTcorr: corrector step for the NT direction. %% %% SDPT3: version 3.1 %% Copyright (c) 1997 by %% K.C. Toh, M.J. Todd, R.H. Tutuncu %% Last Modified: 16 Sep 2004 %%************************************************************************ f...
github
noureldien/PortfolioOptimization-master
HSDHKMdirfun.m
.m
PortfolioOptimization-master/sdpt3/HSDSolver/HSDHKMdirfun.m
1,551
utf_8
1034e25e48a42d2fa143f93f47961fe9
%%******************************************************************* %% HSDHKMdirfun: compute (dX,dZ), given dy, for the HKM direction. %% %% SDPT3: version 3.1 %% Copyright (c) 1997 by %% K.C. Toh, M.J. Todd, R.H. Tutuncu %% Last Modified: 16 Sep 2004 %%****************************************************************...
github
noureldien/PortfolioOptimization-master
HSDsqlp.m
.m
PortfolioOptimization-master/sdpt3/HSDSolver/HSDsqlp.m
11,860
utf_8
00b8311a8efbee36662ca9288870a1cd
%%***************************************************************************** %% HSDsqlp: solve an semidefinite-quadratic-linear program %% by infeasible path-following method on the homogeneous self-dual model. %% %% [obj,X,y,Z,info,runhist] = %% HSDsqlp(blk,At,C,b,OPTIONS,X0,y0,Z0); %% %% Input: blk: a cel...
github
noureldien/PortfolioOptimization-master
HSDsortA.m
.m
PortfolioOptimization-master/sdpt3/HSDSolver/HSDsortA.m
2,577
utf_8
0a74ddbb8a0c79bf22592d780d865e06
%%********************************************************************* %% sortA: sort columns of At{p} in ascending order according to the %% number of nonzero elements. %% %% [At,C,b,X0,Z0,permA,permZ] = sortA(blk,At,C,b,X0,Z0); %% %% SDPT3: version 3.1 %% Copyright (c) 1997 by %% K.C. Toh, M.J. Todd, R.H. Tut...
github
noureldien/PortfolioOptimization-master
HSDHKMrhsfun.m
.m
PortfolioOptimization-master/sdpt3/HSDSolver/HSDHKMrhsfun.m
2,666
utf_8
16409ae4672f80ef54a33c31ef30000f
%%******************************************************************* %% HSDHKMrhsfun: compute the right-hand side vector of the %% Schur complement equation for the HKM direction. %% %% SDPT3: version 3.1 %% Copyright (c) 1997 by %% K.C. Toh, M.J. Todd, R.H. Tutuncu %% Last Modified: 16 Sep 2004 %%*****...
github
noureldien/PortfolioOptimization-master
HSDsqlpcheckconvg.m
.m
PortfolioOptimization-master/sdpt3/HSDSolver/HSDsqlpcheckconvg.m
6,249
utf_8
a579e4972fd77d5cc3e11b72bf56d3a9
%%***************************************************************************** %% HSDsqlpcheckconvg: check convergence. %% %% ZpATynorm, AX, normX, normZ are with respect to the %% original variables, not the HSD variables. %% %% SDPT3: version 3.1 %% Copyright (c) 1997 by %% K.C. Toh, M.J. Todd, R.H. Tutuncu %% Last ...
github
noureldien/PortfolioOptimization-master
HSDNTdirfun.m
.m
PortfolioOptimization-master/sdpt3/HSDSolver/HSDNTdirfun.m
1,459
utf_8
a045827a3ca1adcf8806cfd8234ad5e4
%%******************************************************************* %% HSDNTdirfun: compute (dX,dZ), given dy, for the NT direction. %% %% SDPT3: version 3.1 %% Copyright (c) 1997 by %% K.C. Toh, M.J. Todd, R.H. Tutuncu %% Last Modified: 16 Sep 2004 %%******************************************************************...
github
noureldien/PortfolioOptimization-master
HSDNTrhsfun.m
.m
PortfolioOptimization-master/sdpt3/HSDSolver/HSDNTrhsfun.m
3,424
utf_8
02348c55d691a53b023639b8103757be
%%******************************************************************* %% HSDNTrhsfun: compute the right-hand side vector of the %% Schur complement equation for the NT direction. %% %% SDPT3: version 3.1 %% Copyright (c) 1997 by %% K.C. Toh, M.J. Todd, R.H. Tutuncu %% Last Modified: 16 Sep 2004 %%*********...
github
noureldien/PortfolioOptimization-master
HSDHKMpred.m
.m
PortfolioOptimization-master/sdpt3/HSDSolver/HSDHKMpred.m
2,644
utf_8
81b89c36e0d0bad30836c551264a6a05
%%******************************************************************* %% HSDHKMpred: Compute (dX,dy,dZ) for the H..K..M direction. %% %% SDPT3: version 3.1 %% Copyright (c) 1997 by %% K.C. Toh, M.J. Todd, R.H. Tutuncu %% Last Modified: 16 Sep 2004 %%******************************************************************* f...
github
noureldien/PortfolioOptimization-master
HSDsqlpmain.m
.m
PortfolioOptimization-master/sdpt3/HSDSolver/HSDsqlpmain.m
28,293
utf_8
e3f6670b9b1de0ad08e099276bc20c35
%%***************************************************************************** %% HSDsqlp: solve an semidefinite-quadratic-linear program %% by infeasible path-following method on the homogeneous self-dual model. %% %% [obj,X,y,Z,info,runhist] = %% HSDsqlp(blk,At,C,b,OPTIONS,X0,y0,Z0,kap0,tau0,theta0); %% %% ...
github
noureldien/PortfolioOptimization-master
HSDlinsysolve.m
.m
PortfolioOptimization-master/sdpt3/HSDSolver/HSDlinsysolve.m
6,495
utf_8
0644ae75443d221edcf585f5a5736fe5
%%*************************************************************** %% linsysolve: solve linear system to get dy, and direction %% corresponding to unrestricted variables. %% %% [xx,coeff,L,resnrm] = linsysolve(schur,UU,EE,Bmat,rhs); %% %% child functions: mybicgstable.m %% %% SDPT3: version 3.1 %% Copyright ...
github
noureldien/PortfolioOptimization-master
HSDsqlpmisc.m
.m
PortfolioOptimization-master/sdpt3/HSDSolver/HSDsqlpmisc.m
3,299
utf_8
f36316ddff8099a74241fa1590fc584a
%%***************************************************************************** %% HSDsqlpmisc: %% produce infeasibility certificates if appropriate %% %% Input: X,y,Z are the original variables, not the HSD variables. %% %% SDPT3: version 3.1 %% Copyright (c) 1997 by %% K.C. Toh, M.J. Todd, R.H. Tutuncu %% Last Modifi...
github
noureldien/PortfolioOptimization-master
HSDbicgstab.m
.m
PortfolioOptimization-master/sdpt3/HSDSolver/HSDbicgstab.m
3,084
utf_8
96ee9f939e0b2527113539aa0b633ffc
%%************************************************************************* %% HSDbicgstab %% %% [xx,resnrm,flag] = HSDbicgstab(A,b,M1,tol,maxit) %% %% iterate on bb - (M1)*AA*x %% %% r = b-A*xtrue; %% %%************************************************************************* function [xx,resnrm,flag] = HSDbicgstab(...
github
noureldien/PortfolioOptimization-master
HSDHKMcorr.m
.m
PortfolioOptimization-master/sdpt3/HSDSolver/HSDHKMcorr.m
985
utf_8
1e1983a66956f1d3e4e8e279b1dbe2d0
%%***************************************************************** %% HSDHKMcorr: corrector step for the HKM direction. %% %% SDPT3: version 3.1 %% Copyright (c) 1997 by %% K.C. Toh, M.J. Todd, R.H. Tutuncu %% Last Modified: 16 Sep 2004 %%***************************************************************** function [par...
github
noureldien/PortfolioOptimization-master
HSDNTpred.m
.m
PortfolioOptimization-master/sdpt3/HSDSolver/HSDNTpred.m
2,034
utf_8
e194daf53d375b24154b1caf94b7646d
%%********************************************************************** %% HSDNTpred: Compute (dX,dy,dZ) for NT direction. %% %% compute SVD of Xchol*Zchol via eigenvalue decompostion of %% Zchol * X * Zchol' = V * diag(sv2) * V'. %% compute W satisfying W*Z*W = X. %% W = G'*G, where G = diag(sqrt(sv)) * (inv...
github
noureldien/PortfolioOptimization-master
HSDsqlpCpert.m
.m
PortfolioOptimization-master/sdpt3/HSDSolver/HSDsqlpCpert.m
2,263
utf_8
326ec0065ebb155fab5ee8b4670ec0db
%%***************************************************************************** %% HSDsqlpCpert: perturb C. %% %%***************************************************************************** function [At,Cpert] = HSDsqlpCpert(blk,At,par,C,X,Cpert,runhist) iter = length(runhist.pinfeas); prim_infeas = runhist.pinfeas(...
github
noureldien/PortfolioOptimization-master
cheby0.m
.m
PortfolioOptimization-master/sdpt3/Examples/cheby0.m
2,576
utf_8
a31e95ee5e80694cd1c3f2ceb594d369
%%********************************************************** %% cheby0: %% %% minimize || p(d) ||_infty %% p = polynomial of degree <= m such that p(0) = 1. %% %% Here d = n-vector %%---------------------------------------------------------- %% [blk,Avec,C,b,X0,y0,Z0,objval,p] = cheby0(d,m,solve); %% %% d ...
github
noureldien/PortfolioOptimization-master
randmat.m
.m
PortfolioOptimization-master/sdpt3/Solver/randmat.m
782
utf_8
44e2c609bf458ffd5a37d9f816a0ea1b
%%****************************************************** %% randmat: generate an mxn matrix using matlab's %% rand or randn functions using state = k. %% %%****************************************************** function v = randmat(m,n,k,randtype) try s = rng; rng(k); if strcmp(randtype,'n') ...
github
noureldien/PortfolioOptimization-master
skron.m
.m
PortfolioOptimization-master/sdpt3/Solver/skron.m
1,389
utf_8
3aba6bed9dc50b45f766b4a8620c4ac3
%%*********************************************************************** %% skron: Find the matrix presentation of %% symmetric kronecker product skron(A,B), where %% A,B are symmetric. %% %% Important: A,B are assumed to be symmetric. %% %% K = skron(blk,A,B); %% %% blk: a cell array specifying the b...
github
noureldien/PortfolioOptimization-master
NTcorr.m
.m
PortfolioOptimization-master/sdpt3/Solver/NTcorr.m
1,315
utf_8
458c52ec6bf00d3507df137889a53c7e
%%************************************************************************ %% NTcorr: corrector step for the NT direction. %% %% SDPT3: version 3.1 %% Copyright (c) 1997 by %% K.C. Toh, M.J. Todd, R.H. Tutuncu %% Last Modified: 16 Sep 2004 %%************************************************************************ func...
github
noureldien/PortfolioOptimization-master
HKMcorr.m
.m
PortfolioOptimization-master/sdpt3/Solver/HKMcorr.m
1,313
utf_8
ff69a87fe927bf7f964fd55cbf7ec718
%%***************************************************************** %% HKMcorr: corrector step for the HKM direction. %% %% SDPT3: version 3.1 %% Copyright (c) 1997 by %% K.C. Toh, M.J. Todd, R.H. Tutuncu %% Last Modified: 16 Sep 2004 %%***************************************************************** function [dX,dy,...
github
noureldien/PortfolioOptimization-master
steplength.m
.m
PortfolioOptimization-master/sdpt3/Solver/steplength.m
5,590
utf_8
2b52f7d5b9712cf17885f9ca3eaeb666
%%*************************************************************************** %% steplength: compute xstep such that X + xstep*dX >= 0. %% %% [xstep] = steplength(blk,X,dX,Xchol,invXchol); %% %% SDPT3: version 3.1 %% Copyright (c) 1997 by %% K.C. Toh, M.J. Todd, R.H. Tutuncu %% Last Modified: 16 Sep 2004 %%***********...
github
noureldien/PortfolioOptimization-master
SDPT3data_SEDUMIdata.m
.m
PortfolioOptimization-master/sdpt3/Solver/SDPT3data_SEDUMIdata.m
3,843
utf_8
26106829dfa4c0fbb1ca8c4aa9839fa8
%%********************************************************** %% SDPT3data_SEDUMIdata: convert SQLP data in SDPT3 format to %% SeDuMi format %% %% [At,b,c,K] = SDPT3data_SEDUMIdata(blk,AAt,CC,bb); %% %% SDPT3: version 3.1 %% Copyright (c) 1997 by %% K.C. Toh, M.J. Todd, R.H. Tutuncu %% Last Modifie...
github
noureldien/PortfolioOptimization-master
schurmat_sblk.m
.m
PortfolioOptimization-master/sdpt3/Solver/schurmat_sblk.m
4,549
utf_8
f992891144a934ab4edffde2a692e435
%%******************************************************************* %% schurmat_sblk: compute Schur complement matrix corresponding to %% SDP blocks. %% %% symm = 0, HKM %% = 1, NT %% %% SDPT3: version 3.1 %% Copyright (c) 1997 by %% K.C. Toh, M.J. Todd, R.H. Tutuncu %% Last Modified: 16 Sep 2004 ...
github
noureldien/PortfolioOptimization-master
blktrace.m
.m
PortfolioOptimization-master/sdpt3/Solver/blktrace.m
2,084
utf_8
6a5c3d9ff74073a8e864c246727eaa86
%%********************************************************************** %% blktrace: compute <X1,Z1> + ... + <Xp,Zp> %% %% SDPT3: version 3.1 %% Copyright (c) 1997 by %% K.C. Toh, M.J. Todd, R.H. Tutuncu %% Last Modified: 16 Sep 2004 %%********************************************************************** function tr...
github
noureldien/PortfolioOptimization-master
sqlpu2lblk.m
.m
PortfolioOptimization-master/sdpt3/Solver/sqlpu2lblk.m
3,099
utf_8
1a67e45c349d19614e890521aed11db5
%%*************************************************************************** %% sqlpu2lblk: decide whether to convert ublk to lblk %% %% SDPT3: version 3.1 %% Copyright (c) 1997 by %% K.C. Toh, M.J. Todd, R.H. Tutuncu %% Last Modified: 10 Jul 2007 %%*********************************************************************...
github
noureldien/PortfolioOptimization-master
Prod3.m
.m
PortfolioOptimization-master/sdpt3/Solver/Prod3.m
1,677
utf_8
2ee9f0d732e5ea1f326bfcf275b0da3c
%%************************************************************ %% Prod3: compute the entries of Q = A*B*C specified in %% nzlistQ. %% %% Q = Prod3(blk,A,B,C,sym,nzlistQ) %% Important: (a) A is assumed to be symmetric if nzlistQ %% has 2 columns (since mexProd2nz computes A'*B). %% (b) T...
github
noureldien/PortfolioOptimization-master
sqlptermcode.m
.m
PortfolioOptimization-master/sdpt3/Solver/sqlptermcode.m
1,230
utf_8
40b494719c3c614b6196dd9846778c4c
%%************************************************************************* %% sqlptermcode.m: explains the termination code in sqlp.m %% %% %% SDPT3: version 3.1 %% Copyright (c) 1997 by %% K.C. Toh, M.J. Todd, R.H. Tutuncu %% Last Modified: 16 Sep 2004 %%***************************************************************...
github
noureldien/PortfolioOptimization-master
AXfun.m
.m
PortfolioOptimization-master/sdpt3/Solver/AXfun.m
1,869
utf_8
e816cba65d629a72167375f9a7697b2f
%%************************************************************************* %% AXfun: compute AX(k) = <Ak,X>, k = 1:m %% %% AX = AXfun(blk,At,permA,X); %% %% Note: permA may be set to [] if no permutation is neccessary. %% %% SDPT3: version 3.1 %% Copyright (c) 1997 by %% K.C. Toh, M.J. Todd, R.H. Tutuncu %% Last Mod...
github
noureldien/PortfolioOptimization-master
NTpred.m
.m
PortfolioOptimization-master/sdpt3/Solver/NTpred.m
1,963
utf_8
3a2374e8ffa4806b637e50e551b9c17c
%%********************************************************************** %% NTpred: Compute (dX,dy,dZ) for NT direction. %% %% compute SVD of Xchol*Zchol via eigenvalue decompostion of %% Zchol * X * Zchol' = V * diag(sv2) * V'. %% compute W satisfying W*Z*W = X. %% W = G'*G, where G = diag(sqrt(sv)) * (invZch...
github
noureldien/PortfolioOptimization-master
sqlp.m
.m
PortfolioOptimization-master/sdpt3/Solver/sqlp.m
11,506
utf_8
d4acdbc7a5a1c0fd270f5d3de302c545
%%***************************************************************************** %% sqlp: solve an semidefinite-quadratic-linear program %% by infeasible path-following method. %% %% [obj,X,y,Z,info,runhist] = sqlp(blk,At,C,b,OPTIONS,X0,y0,Z0); %% %% Input: blk: a cell array describing the block diagonal structu...
github
noureldien/PortfolioOptimization-master
infeaspt.m
.m
PortfolioOptimization-master/sdpt3/Solver/infeaspt.m
5,422
utf_8
ed7ce61d1094307a576ad8ddfd42bd30
%%******************************************************************** %% infeaspt: generate an initial point for sdp.m %% %% [X0,y0,Z0] = infeaspt(blk,At,C,b,options,scalefac); %% %% options = 1 if want X0,Z0 to be scaled identity matrices %% = 2 if want X0,Z0 to be scalefac*(identity matrices). %% %% SDP...
github
noureldien/PortfolioOptimization-master
Arrow.m
.m
PortfolioOptimization-master/sdpt3/Solver/Arrow.m
933
utf_8
4a1803a8a960eba5462879d0ae4cbb78
%%******************************************************** %% Arrow: %% %% Fx = Arrow(pblk,f,x,options); %% %% if options == 0; %% Fx = Arr(F)*x %% if options == 1; %% Fx = Arr(F)^{-1}*x %% %% SDPT3: version 3.1 %% Copyright (c) 1997 by %% K.C. Toh, M.J. Todd, R.H. Tutuncu %% Last Modified: 16 Sep 2004 %%********...
github
noureldien/PortfolioOptimization-master
mybicgstab.m
.m
PortfolioOptimization-master/sdpt3/Solver/mybicgstab.m
3,536
utf_8
7ae20f5d14c6533fd9a50b23a1e5c8b3
%%************************************************************************* %% mybicgstab %% %% [xx,resnrm,flag] = mybicgstab(A,b,M1,tol,maxit) %% %% iterate on bb - (M1)*AA*x %% %% r = b-A*xtrue; %% %%************************************************************************* function [xx,resnrm,flag] = mybicgstab(A,b...
github
noureldien/PortfolioOptimization-master
degeneracy.m
.m
PortfolioOptimization-master/sdpt3/Solver/degeneracy.m
5,175
utf_8
52287ec83b17f60c33554d7a25764672
%%*************************************************************** %% degeneracy: determine if an SDP problem is non-degenerate. %% %% [ddx,ddz,B1,B2,sig1,sig12] = degeneracy(blk,At,X,y,Z); %% %% Assume that strict complementarity holds: %% for primal non-degeneracy, we need rank([B1 B2]) = m %% for dual non-degeneracy,...
github
noureldien/PortfolioOptimization-master
mytime.m
.m
PortfolioOptimization-master/sdpt3/Solver/mytime.m
557
utf_8
2d076b8ed1091521bbe986194c6e2b84
%%********************************************* %% mytime: %% %% SDPT3: version 3.1 %% Copyright (c) 1997 by %% K.C. Toh, M.J. Todd, R.H. Tutuncu %% Last Modified: 16 Sep 2004 %%********************************************* function [hh,mm,ss] = mytime(t) t = round(t); h = floor(t/3600); m = floor(rem(t,3600)/60); s ...
github
noureldien/PortfolioOptimization-master
validate.m
.m
PortfolioOptimization-master/sdpt3/Solver/validate.m
7,427
utf_8
60774ce6b3bd16bde97e4078d89db39b
%%*********************************************************************** %% validate: validate data %% %% %% SDPT3: version 3.1 %% Copyright (c) 1997 by %% K.C. Toh, M.J. Todd, R.H. Tutuncu %% Last Modified: 16 Sep 2004 %%*********************************************************************** function [blk,At,C,b,di...
github
noureldien/PortfolioOptimization-master
svec.m
.m
PortfolioOptimization-master/sdpt3/Solver/svec.m
2,027
utf_8
43bbe7c274d2d1bfb1014fc2000f47e3
%********************************************************* %% svec: compute the vector svec(M), %% %% x = svec(blk,M,isspx); %% %% SDPT3: version 3.1 %% Copyright (c) 1997 by %% K.C. Toh, M.J. Todd, R.H. Tutuncu %% Last Modified: 16 Sep 2004 %%********************************************************** function x = s...
github
noureldien/PortfolioOptimization-master
read_sedumi.m
.m
PortfolioOptimization-master/sdpt3/Solver/read_sedumi.m
7,265
utf_8
2035885c053fc9de89cf19fa667603d2
%%******************************************************************* %% Read in a problem in SeDuMi format. %% %% [blk,A,C,b,perm] = read_sedumi(fname,b,c,K) %% %% Input: fname.mat = name of the file containing SDP data in %% SeDuMi format. %% %% Important note: Sedumi's notation for free variab...
github
noureldien/PortfolioOptimization-master
qprod.m
.m
PortfolioOptimization-master/sdpt3/Solver/qprod.m
655
utf_8
2d6550b139b2dfcf3d134f61deec3686
%%*************************************************** %% qprod: %% %% Input: A = [A1 A2 ... An] %% x = [x1; x2; ...; xn] %% Output: [A1*x1 A2*x2 ... An*xn] %% %% SDPT3: version 3.1 %% Copyright (c) 1997 by %% K.C. Toh, M.J. Todd, R.H. Tutuncu %% Last Modified: 16 Sep 2004 %%**************************************...