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 | virati/SGView-master | boundedline.m | .m | SGView-master/lib/boundedline/kakearney-boundedline-pkg-2112a2b/boundedline/boundedline.m | 10,932 | utf_8 | cda0c1e3f0cd78568120d513ca9571f3 | function varargout = boundedline(varargin)
%BOUNDEDLINE Plot a line with shaded error/confidence bounds
%
% [hl, hp] = boundedline(x, y, b)
% [hl, hp] = boundedline(x, y, b, linespec)
% [hl, hp] = boundedline(x1, y1, b1, linespec1, x2, y2, b2, linespec2)
% [hl, hp] = boundedline(..., 'alpha')
% [hl, hp] = boundedline(... |
github | virati/SGView-master | inpaint_nans.m | .m | SGView-master/lib/boundedline/old/inpaint_nans.m | 12,719 | utf_8 | 7407e1e4d4a09317af91014238711e07 | function B=inpaint_nans(A,method)
% inpaint_nans: in-paints over nans in an array
% usage: B=inpaint_nans(A)
%
% solves approximation to one of several pdes to
% interpolate and extrapolate holes
%
% arguments (input):
% A - nxm array with some NaNs to be filled in
%
% method - (OPTIONAL) scalar numeric f... |
github | virati/SGView-master | boundedline.m | .m | SGView-master/lib/boundedline/old/boundedline.m | 10,524 | utf_8 | 16b1d04028aded72eaf869f149fcddd7 | function varargout = boundedline(varargin)
%BOUNDEDLINE Plot a line with shaded error/confidence bounds
%
% [hl, hp] = boundedline(x, y, b)
% [hl, hp] = boundedline(x, y, b, linespec)
% [hl, hp] = boundedline(x1, y1, b1, linespec1, x2, y2, b2, linespec2)
% [hl, hp] = boundedline(..., 'alpha')
% [hl, hp] = boundedline(... |
github | icemansina/LSTM-CF-master | prepare_batch.m | .m | LSTM-CF-master/matlab/caffe/prepare_batch.m | 1,298 | utf_8 | 68088231982895c248aef25b4886eab0 | % ------------------------------------------------------------------------
function images = prepare_batch(image_files,IMAGE_MEAN,batch_size)
% ------------------------------------------------------------------------
if nargin < 2
d = load('ilsvrc_2012_mean');
IMAGE_MEAN = d.image_mean;
end
num_images = length... |
github | icemansina/LSTM-CF-master | matcaffe_demo_vgg.m | .m | LSTM-CF-master/matlab/caffe/matcaffe_demo_vgg.m | 3,036 | utf_8 | f836eefad26027ac1be6e24421b59543 | function scores = matcaffe_demo_vgg(im, use_gpu, model_def_file, model_file, mean_file)
% scores = matcaffe_demo_vgg(im, use_gpu, model_def_file, model_file, mean_file)
%
% Demo of the matlab wrapper using the networks described in the BMVC-2014 paper "Return of the Devil in the Details: Delving Deep into Convolutional... |
github | icemansina/LSTM-CF-master | matcaffe_demo.m | .m | LSTM-CF-master/matlab/caffe/matcaffe_demo.m | 3,344 | utf_8 | 669622769508a684210d164ac749a614 | function [scores, maxlabel] = matcaffe_demo(im, use_gpu)
% scores = matcaffe_demo(im, use_gpu)
%
% Demo of the matlab wrapper using the ILSVRC network.
%
% input
% im color image as uint8 HxWx3
% use_gpu 1 to use the GPU, 0 to use the CPU
%
% output
% scores 1000-dimensional ILSVRC score vector
%
% You m... |
github | icemansina/LSTM-CF-master | matcaffe_demo_vgg_mean_pix.m | .m | LSTM-CF-master/matlab/caffe/matcaffe_demo_vgg_mean_pix.m | 3,069 | utf_8 | 04b831d0f205ef0932c4f3cfa930d6f9 | function scores = matcaffe_demo_vgg_mean_pix(im, use_gpu, model_def_file, model_file)
% scores = matcaffe_demo_vgg(im, use_gpu, model_def_file, model_file)
%
% Demo of the matlab wrapper based on the networks used for the "VGG" entry
% in the ILSVRC-2014 competition and described in the tech. report
% "Very Deep Convo... |
github | jinw1004/DeepList-master | slmetric_pw.m | .m | DeepList-master/code/patchmatch/slmetric_pw.m | 5,784 | utf_8 | db4423a1315c3056bca4cabf694d42f4 | function M = slmetric_pw(X1, X2, mtype, varargin)
%SLMETRIC_PW Compute the metric between column vectors pairwisely
%
% $ Syntax $
% - M = slmetric_pw(X1, X2, mtype);
% - M = slmetric_pw(X1, X2, mtype, ...);
%
% $ Description $
% - M = slmetric_pw(X1, X2, mtype) Computes the metrics between
% column vectors o... |
github | jinw1004/DeepList-master | vl_simplenn_display.m | .m | DeepList-master/code/matConvNet/vl_simplenn_display.m | 2,913 | utf_8 | a7b610d48d096a3b7dbd70fa131290f0 | function vl_simplenn_display(net)
% VL_SIMPLENN_DISPLAY Simple CNN statistics
% VL_SIMPLENN_DISPLAY(NET) prints statistics about the network NET.
% Copyright (C) 2014 Andrea Vedaldi.
% All rights reserved.
%
% This file is part of the VLFeat library and is made available under
% the terms of the BSD license (see t... |
github | jrterven/MultiKinCalib-master | knnsearch.m | .m | MultiKinCalib-master/knnsearch.m | 3,976 | utf_8 | 0f62ce2cf9bcdf736e723a616915f539 | function [idx,D]=knnsearch(varargin)
% KNNSEARCH Linear k-nearest neighbor (KNN) search
% IDX = knnsearch(Q,R,K) searches the reference data set R (n x d array
% representing n points in a d-dimensional space) to find the k-nearest
% neighbors of each query point represented by eahc row of Q (m x d array).
% The resu... |
github | jrterven/MultiKinCalib-master | FinalCalibration.m | .m | MultiKinCalib-master/FinalCalibration.m | 7,024 | utf_8 | 388a97a812a8b549efad527ee6f77ffc | % Script:
% proj05_FinalCalibration
%
% Description:
% Perform calibration of a Kinect camera (depth or color) given pairs of
% 3D points and 2D projections.
%
% Dependencies:
% function proj05_costFunVec: this function is the one we wish to minimize
% function tr2eul: converts from rotation matriz to Eul... |
github | jrterven/MultiKinCalib-master | Step03_Matching.m | .m | MultiKinCalib-master/Step03_Matching.m | 2,265 | utf_8 | 84fad680aa977b0e7cf22fbed9cf3048 | % function:
% Step03_Matching(camCount,dataAcqFile,preCalibResultsFile,minDist3D,matchingResultsFile)
%
% Description:
% Perform the point cloud matching step between all pairs of cameras.
%
% Dependencies:
% - function Find3DMatches: peform the actual matching between a pair of
% pointclouds.
%
% Inputs:
%... |
github | jrterven/MultiKinCalib-master | serverGetData.m | .m | MultiKinCalib-master/serverGetData.m | 5,485 | utf_8 | 2bdb052ce46ef892036d2609ccbc24c9 | % Function:
% serverGetData
%
% Description:
% Communicates with remote clients via TCP/IP to obtain the calibration
% points, pointcloud of the scene, and depth and color projections of the
% 3D calibration points of the current frame
%
% Dependencies:
% TCPIPCommands.mat: mat file with custom d... |
github | jrterven/MultiKinCalib-master | PreCalib.m | .m | MultiKinCalib-master/PreCalib.m | 2,907 | utf_8 | 910358ae66170af3240c5f499dc9fd3d | % function:
% [Rs, ts, T] = PreCalib(camNum,dataAcqFile)
%
% Description:
% Perform a pre-calibration of the extrinsic parameters between a pair of
% Kinect cameras.
%
% Dependencies:
% - function CostFunPreCalib: this function is the one we wish to
% minimize.
% - file 'calibParameters.mat' created wit... |
github | jrterven/MultiKinCalib-master | Step05_FinalCalibration.m | .m | MultiKinCalib-master/Step05_FinalCalibration.m | 3,117 | utf_8 | 5fc8cf44653153f6b7d0f3261fcfe232 | % function:
% Step05_FinalCalibration(camCount,preCalibResultsFile,initIntrinsicsFile,finalCalibResults)
%
% Description:
% Perform the final calibration of all the cameras using a non-linear
% optimization.
%
% Dependencies:
% - function FinalCalibration: performs the calibration of a single
% camera.
% ... |
github | jrterven/MultiKinCalib-master | S05_costFunVec.m | .m | MultiKinCalib-master/S05_costFunVec.m | 5,888 | utf_8 | 210560ea349880160a178c88cb754faf | % Function:
% proj05_costFunVec
%
% Description:
% Function that we wish to minimize.
%
% Dependencies:
% - calibParameters.mat: file with variables defined in proj0_Multi_Kinect_Calibration.m
% such as: dataDir, distortRad, distortTan, withSkew
% - matchingResults.mat: file containing the 3D matchin... |
github | jrterven/MultiKinCalib-master | CostFunPreCalib.m | .m | MultiKinCalib-master/CostFunPreCalib.m | 1,477 | utf_8 | 9c3ffd29db0967fdf9a090a3c1e168a1 | % Function:
% CostFunPreCalib
%
% Description:
% Function that we wish to minimize using proj02_PreCalib
%
% Dependencies:
% File: calibParameters.mat where we load the variables load dataDir and pointsToConsider
% File: variablesForCostFunPreCalib.mat with the variables camNum, Xw1, Xw2
%
% Inputs:
% 1) ... |
github | jrterven/MultiKinCalib-master | dataAcq.m | .m | MultiKinCalib-master/dataAcq.m | 27,025 | utf_8 | 077af366b281510066728625af90d1dd | function varargout = dataAcq(varargin)
% DATAACQ MATLAB code for dataAcq.fig
% DATAACQ, by itself, creates a new DATAACQ or raises the existing
% singleton*.
%
% H = DATAACQ returns the handle to a new DATAACQ or the handle to
% the existing singleton*.
%
% DATAACQ('CALLBACK',hObject,eventData,... |
github | jrterven/MultiKinCalib-master | Step02_PreCalibration.m | .m | MultiKinCalib-master/Step02_PreCalibration.m | 2,122 | utf_8 | 431aa2945f529d4c0f09faf5a8c64a1b | % function:
% Step02_PreCalibration(camCount,dataAcqFile,preCalibResultsFile)
%
% Description:
% Perform a pre-calibration of the extrinsic parameters of all the
% Kinect cameras.
%
% Dependencies:
% - function proj02_CostFunPreCalib: this function is the one we wish to
% minimize.
% - file 'calibParame... |
github | jrterven/MultiKinCalib-master | Step03_Find3DMatches.m | .m | MultiKinCalib-master/Step03_Find3DMatches.m | 1,484 | utf_8 | f9d34967041fa2644eb59f1ed0f5cad9 | % function:
% Find3DMatches
%
% Description:
% Find 3D matches
%
% Dependencies:
%
% Inputs:
%
% Usage:
%
% Return:
%
% Authors:
% Diana M. Cordova
% Juan R. Terven
% Date: 16-Jan-2016
%
function [cam2_1Matches,cam2_1depthProj,cam2_1colorProj] = Find3DMatches(pc1, pc2, T2_1, ...
cam2DepthProj, cam2Col... |
github | jrterven/MultiKinCalib-master | main.m | .m | MultiKinCalib-master/main.m | 10,290 | utf_8 | f65a240ff77f3aa27e9b30e186ff884d | function varargout = main(varargin)
% MAIN MATLAB code for main.fig
% MAIN, by itself, creates a new MAIN or raises the existing
% singleton*.
%
% H = MAIN returns the handle to a new MAIN or the handle to
% the existing singleton*.
%
% MAIN('CALLBACK',hObject,eventData,handles,...) calls the l... |
github | jrterven/MultiKinCalib-master | initialization.m | .m | MultiKinCalib-master/initialization.m | 24,418 | utf_8 | 1bdaecd20777d065710faeed395badd0 | function varargout = initialization(varargin)
% INITIALIZATION MATLAB code for initialization.fig
% INITIALIZATION, by itself, creates a new INITIALIZATION or raises the existing
% singleton*.
%
% H = INITIALIZATION returns the handle to a new INITIALIZATION or the handle to
% the existing singleton... |
github | jrterven/MultiKinCalib-master | Step04_IntrinsicParametersEstimation.m | .m | MultiKinCalib-master/Step04_IntrinsicParametersEstimation.m | 2,917 | utf_8 | 1ba76157c5d145557316901747069e5b | % function:
% Step04_IntrinsicParametersEstimation(camCount,dataAcqFile,preCalibResultsFile,matchingResultsFile,initIntrinsicsFile)
%
% Description:
% Estimates intrinsics parameters for all the cameras (depth and color
% for each Kinect).
%
% Dependencies:
% - function EstimateIntrins: estimates the camera... |
github | jrterven/MultiKinCalib-master | matching3DNN.m | .m | MultiKinCalib-master/matching3DNN.m | 3,446 | utf_8 | 65dcfbeedd901cb8df56256989086f61 | % Function:
% matching3DNN
%
% Description:
% Given two input pointclouds (cam1PC, cam2PC), finds the matching points.
% Matching points are searched using 1-Nearest Neighbor with a threshold
% value of epsilon millimeters.
%
% Usage:
%
%
% Params:
% cam1PC : Pointcloud from camera 1 in n x 3
% cam2PC : Po... |
github | jrterven/MultiKinCalib-master | trackCalibPoints.m | .m | MultiKinCalib-master/trackCalibPoints.m | 6,387 | utf_8 | 14c24c13dab8f66c2f04b7b0b186dfad | % Function:
% trackCalibPoints
%
% Description:
% Search for three or six red points in a stick of SIZE_AF. It uses color space
% and camera space to detect the points in the color image and its 3D
% coordinates as well in order to verify that the points lie in a stick
% and that the dimensions of the... |
github | jrterven/MultiKinCalib-master | findPointAfromInfrared.m | .m | MultiKinCalib-master/findPointAfromInfrared.m | 2,640 | utf_8 | 2dbc61d7a6cb99b8a8580f0df3fab990 | % Function:
% findPointAfromInfrared
%
% Description:
% Finds the nearest 3D world point to the marker.
% The point A is the fixed point, we use a reflective tape on the
% ground near this point. So when detecting the red points, the nearest
% point to this (refAw) will be point A.
%
% Dependenci... |
github | jrterven/MultiKinCalib-master | calibCostFun.m | .m | MultiKinCalib-master/Kin2/Mex/calibCostFun.m | 2,431 | utf_8 | 971b01fffa44b09203d158efc55dc03e |
function fun = calibCostFun(x0)
persistent X3d x2d quatRot
height = 1080;
width = 1920;
% The first iteration loads the data
if isempty(X3d)
X3d = [];
x2d = [];
% Get the 3D points from the matching results
% 3D point... |
github | bearsroom/mxnet-augmented-master | parse_json.m | .m | mxnet-augmented-master/matlab/+mxnet/private/parse_json.m | 19,095 | utf_8 | 2d934e0eae2779e69f5c3883b8f89963 | function data = parse_json(fname,varargin)
%PARSE_JSON parse a JSON (JavaScript Object Notation) file or string
%
% Based on jsonlab (https://github.com/fangq/jsonlab) created by Qianqian Fang. Jsonlab is lisonced under BSD or GPL v3.
global pos inStr len esc index_esc len_esc isoct arraytoken
if(regexp(fname,'^\s*(... |
github | SholtoForbes/3D-master | SPARTANAero.m | .m | 3D-master/SPARTANAero.m | 2,085 | utf_8 | 4c8472352b93571e9675cc32a6992ac9 | % Defines the aerodynamics of the SPARTAN over a range of Mach no.s
% Created by Sholto Forbes-Spyratos
% Uses equations defined in the Aerodynamics section of Aircraft Design: A Conceptual Approach by
% Raymer
% M = 2
% alpha = 0
% v = 2*300
% rho = 0.412707
% mu = 0.0000146884
function CL = SPARTANAero(M,alpha,v,r... |
github | lanl-ansi/PowerModels.jl-master | case5_uc.m | .m | PowerModels.jl-master/test/data/matpower/case5_uc.m | 2,149 | utf_8 | 1e2590e75d2981d64bbabd3d8738a9e1 | % used in tests of,
% - unit commitment, generator 4 should be de-commited due to high cost
function mpc = case5_uc
mpc.version = '2';
mpc.baseMVA = 100.0;
%% bus data
% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin
mpc.bus = [
1 2 0.0 0.0 0.0 0.0 1 1.00000 2.80377 230.0 1 1.10000 0... |
github | lanl-ansi/PowerModels.jl-master | case5.m | .m | PowerModels.jl-master/test/data/matpower/case5.m | 2,695 | utf_8 | 8055caaf1bbf7650f27dffaf2c09e662 | % used in tests of,
% - non-contiguous bus ids
% - tranformer orentation swapping
% - dual values
% - clipping cost functions using ncost
% - linear objective function
% - bus type correction
function mpc = case5
mpc.version = '2';
mpc.baseMVA = 100.0;
%% bus data
% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax ... |
github | lanl-ansi/PowerModels.jl-master | case7_tplgy.m | .m | PowerModels.jl-master/test/data/matpower/case7_tplgy.m | 2,764 | utf_8 | ac81a346a20940f9e41c1ea739b3cd8e | %
% Test for component status pre-processing
%
function mpc = case7_tplgy
mpc.version = '2';
mpc.baseMVA = 100.0;
%% bus data
% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin
mpc.bus = [
1 3 0.0 0.0 0.0 0.0 1 1.00000 0.00000 240.0 1 1.10000 0.90000;
2 2 100.0 50.0 1.0 5.0 1 ... |
github | lanl-ansi/PowerModels.jl-master | case5_db.m | .m | PowerModels.jl-master/test/data/matpower/case5_db.m | 1,886 | utf_8 | fbdf969ad340385a2f86ad61d100b724 | % tests network with dangeling buses, a feature that occurs in many large datasets
function mpc = case5_dc
mpc.version = '2';
mpc.baseMVA = 100.0;
%% bus data
% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin
mpc.bus = [
1 1 300.0 98.61 0.0 0.0 1 1.06355 2.87619 230.0 1 1.10000 0.900... |
github | lanl-ansi/PowerModels.jl-master | case14.m | .m | PowerModels.jl-master/test/data/matpower/case14.m | 4,769 | utf_8 | 83581c937c4e1a14e1886d8ecfe80176 | % Case to test no explicit branch limits
% from matpower - http://www.pserc.cornell.edu/matpower/
function mpc = case14
%CASE14 Power flow data for IEEE 14 bus test case.
% Please see CASEFORMAT for details on the case file format.
% This data was converted from IEEE Common Data Format
% (ieee14cdf.txt) on ... |
github | lanl-ansi/PowerModels.jl-master | case2.m | .m | PowerModels.jl-master/test/data/matpower/case2.m | 885 | utf_8 | a49e159cc74b520baf5f00877d81355e | % Case to test space based matlab matrix
% And other hard to parse cases
% also test data without a generator cost model
function mpc = case2
mpc.version = '2';
mpc.baseMVA = 100.00;
mpc.bus = [
1 3 0.00 0.00 0.00 0.00 1 1.0000 0.00000 20.00 1 1.100 0.900 0.00 0.00 0 0
... |
github | lanl-ansi/PowerModels.jl-master | case3.m | .m | PowerModels.jl-master/test/data/matpower/case3.m | 2,337 | utf_8 | 303f1329fa093405df83c5d50a0a0344 | % Case to test adding data to matpower file
% tests refrence bus detection
% tests basic ac and hvdc modeling
% tests when gencost is present but not dclinecost
% quadratic objective function
function mpc = case3
mpc.version = '2';
mpc.baseMVA = 100.0;
mpc.bus = [
1 2 110.0 40.0 0.0 0.0 1 1.10000 -0.0000... |
github | lanl-ansi/PowerModels.jl-master | case5_pwlc.m | .m | PowerModels.jl-master/test/data/matpower/case5_pwlc.m | 2,241 | utf_8 | ee8c39be5886057f9acd8ee9587d60a0 | % tests pwl cost functions
function mpc = case5_pwlc
mpc.version = '2';
mpc.baseMVA = 100.0;
%% bus data
% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin
mpc.bus = [
1 2 0.0 0.0 0.0 0.0 1 1.07762 2.80377 230.0 1 1.10000 0.90000;
2 1 300.0 98.61 0.0 0.0 1 1.08407 -0.7346... |
github | lanl-ansi/PowerModels.jl-master | case24.m | .m | PowerModels.jl-master/test/data/matpower/case24.m | 9,996 | utf_8 | b7712ffffdb538c13576fc14f1f3a516 | % from pglib-opf - https://github.com/power-grid-lib/pglib-opf
% tests missing angmin,angmax data correction
% tests branch orientation data correction
% tests mpc.areas
function mpc = case24
mpc.version = '2';
mpc.baseMVA = 100.0;
%% area data
% area refbus
mpc.areas = [
1 1;
2 3;
3 8;
4 6;
];
%% bus data
%... |
github | lanl-ansi/PowerModels.jl-master | case9.m | .m | PowerModels.jl-master/test/data/matpower/case9.m | 2,193 | utf_8 | 03b837e611021136e7dce6783fe4f738 | % used in tests of,
% - sparce SDP implementation, possible cholesky PosDefException
function mpc = case9
mpc.version = '2';
mpc.baseMVA = 100.0;
%% bus data
% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin
mpc.bus = [
1 3 0.0 0.0 0.0 0.0 1 1.00000 0.00000 350.0 1 1.10000 0.90000;
2... |
github | lanl-ansi/PowerModels.jl-master | case5_gap.m | .m | PowerModels.jl-master/test/data/matpower/case5_gap.m | 2,164 | utf_8 | 671d777e38c28224a04eda98a6ca828c | % uses negative generator costs to test convex relaxations
% voltage mag and voltage angle difference bounds are key
function mpc = case5_gap
mpc.version = '2';
mpc.baseMVA = 100.0;
%% bus data
% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin
mpc.bus = [
1 2 0.0 0.0 0.0 0.0 1 1.07762 2.80377 ... |
github | lanl-ansi/PowerModels.jl-master | case3_tnep.m | .m | PowerModels.jl-master/test/data/matpower/case3_tnep.m | 1,278 | utf_8 | ead5d883df41cc54bf004737b4210419 | % tests extra data needed for tnep problems
% test when not all ne_branch branch ids are bus ids
function mpc = case3_tnep
mpc.version = '2';
mpc.baseMVA = 100.0;
mpc.bus = [
2 3 110.0 40.0 0.0 0.0 1 1.10000 -0.00000 240.0 1 1.10000 0.90000;
3 2 110.0 40.0 0.0 0.0 1 0.92617 7.25... |
github | lanl-ansi/PowerModels.jl-master | case5_npg.m | .m | PowerModels.jl-master/test/data/matpower/case5_npg.m | 2,052 | utf_8 | 624549d328690dfa5c89a8092933627b | % used in tests of,
% - negative generator outputs
function mpc = case5
mpc.version = '2';
mpc.baseMVA = 100.0;
%% bus data
% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin
mpc.bus = [
1 2 0.0 0.0 0.0 0.0 1 1.00000 2.80377 230.0 1 1.10000 0.90000;
2 1 300.0 98.61 0.0 0.0 1 ... |
github | lanl-ansi/PowerModels.jl-master | case5_dc.m | .m | PowerModels.jl-master/test/data/matpower/case5_dc.m | 2,344 | utf_8 | 50a742579b5303513bdd62c528ad9199 | % tests dc line with costs
% tests generator and dc line voltage setpoint warnings
function mpc = case5_dc
mpc.version = '2';
mpc.baseMVA = 100.0;
%% bus data
% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin
mpc.bus = [
1 1 0.0 0.00 0.0 0.0 1 1.06355 2.87619 230.0 1 1.10000 0.900... |
github | lanl-ansi/PowerModels.jl-master | case5_uc_strg.m | .m | PowerModels.jl-master/test/data/matpower/case5_uc_strg.m | 2,580 | utf_8 | 3932c3885a84421f33e949f72fc22e31 | % used in tests of,
% - unit commitment, generator 4 should be de-commited due to high cost
function mpc = case5_uc
mpc.version = '2';
mpc.baseMVA = 100.0;
%% bus data
% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin
mpc.bus = [
1 2 0.0 0.0 0.0 0.0 1 1.00000 2.80377 230.0 1 1.10000 0... |
github | lanl-ansi/PowerModels.jl-master | case5_strg.m | .m | PowerModels.jl-master/test/data/matpower/case5_strg.m | 2,406 | utf_8 | 277e707bf78cc5ca09132809a8990e99 | % used in tests of,
% - storage modeling
function mpc = case5
mpc.version = '2';
mpc.baseMVA = 100.0;
%% bus data
% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin
mpc.bus = [
1 2 0.0 0.0 0.0 0.0 1 1.00000 2.80377 230.0 1 1.10000 0.90000;
2 1 300.0 98.61 0.0 0.0 1 1.08407 -0.73465 230.0... |
github | lanl-ansi/PowerModels.jl-master | case5_asym.m | .m | PowerModels.jl-master/test/data/matpower/case5_asym.m | 2,096 | utf_8 | 13b833127c1a25f144950df06313b47b | % tests asymetrical branch voltage angle differences
function mpc = case5_asym
mpc.version = '2';
mpc.baseMVA = 100.0;
%% bus data
% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin
mpc.bus = [
1 2 0.0 0.0 0.0 0.0 1 1.07762 2.80377 230.0 1 1.10000 0.90000;
2 1 300.0 98.61 0.0 0.0... |
github | lanl-ansi/PowerModels.jl-master | case5_sw_nb.m | .m | PowerModels.jl-master/test/data/matpower/case5_sw_nb.m | 3,737 | utf_8 | 536ee3631a6d31a6f65dd6d7e7ef3503 | % used in tests of,
% - switch modeling with a node-break representation
% - the encoding of bus ids with numbers over 100 is "branch_id0bus_id"
function mpc = case5
mpc.version = '2';
mpc.baseMVA = 100.0;
%% bus data
% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin
mpc.bus = [
1 2 0.0 0.0 0.0 0.0 ... |
github | lanl-ansi/PowerModels.jl-master | case5_clm.m | .m | PowerModels.jl-master/test/data/matpower/case5_clm.m | 2,229 | utf_8 | d9cbef19094b9edd9861e3cb3332a3ee | % used in tests of,
% - adding explict current constraints
% - current a ratings tranfered to thermal limits
function mpc = case5
mpc.version = '2';
mpc.baseMVA = 100.0;
%% bus data
% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin
mpc.bus = [
1 2 0.0 0.0 0.0 0.0 1 1.00000 2.80377 230.0 1 ... |
github | lanl-ansi/PowerModels.jl-master | case5_ext.m | .m | PowerModels.jl-master/test/data/matpower/case5_ext.m | 2,405 | utf_8 | 650212fa5dc2481b6b0dc83d789f7475 | % used in tests of,
% - inactive bus 11
% - negative branch susceptance
% - power flow slack bus with multiple generators
% - power flow slack bus with non-zero va value
function mpc = case5
mpc.version = '2';
mpc.baseMVA = 100.0;
%% bus data
% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin
mpc.bus = [
1 ... |
github | lanl-ansi/PowerModels.jl-master | case6.m | .m | PowerModels.jl-master/test/data/matpower/case6.m | 1,905 | utf_8 | f3047dc4e17d93d99f563bb737086e85 | % Case to test two connected components in the network data
% the case is two replicates of the case3 network
function mpc = case6
mpc.version = '2';
mpc.baseMVA = 100.0;
mpc.bus = [
1 3 110.0 40.0 0.0 0.0 1 1.10000 -0.00000 240.0 1 1.10000 0.90000;
2 2 110.0 40.0 0.0 0.0 1 0.92617 ... |
github | lanl-ansi/PowerModels.jl-master | case5_sw.m | .m | PowerModels.jl-master/test/data/matpower/case5_sw.m | 1,897 | utf_8 | 6a2e73349d3840c9d7e9938492a88bbf | % used in tests of,
% - switch modeling
function mpc = case5
mpc.version = '2';
mpc.baseMVA = 100.0;
%% bus data
% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin
mpc.bus = [
1 2 0.0 0.0 0.0 0.0 1 1.00000 2.80377 230.0 1 1.10000 0.90000;
2 1 300.0 98.61 5.0 10.0 1 1.00000 -0.73465 2... |
github | lanl-ansi/PowerModels.jl-master | case3_oltc_pst.m | .m | PowerModels.jl-master/test/data/matpower/case3_oltc_pst.m | 1,496 | utf_8 | 2850a95f709d111a9d59484fb3331536 | % Case to test adding data to matpower file
% tests refrence bus detection
% tests basic ac and hvdc modeling
% tests when gencost is present but not dclinecost
% quadratic objective function
function mpc = case3
mpc.version = '2';
mpc.baseMVA = 100.0;
mpc.bus = [
1 2 110.0 40.0 0.0 0.0 1 1.10000 -0.0000... |
github | lanl-ansi/PowerModels.jl-master | frankenstein_00.m | .m | PowerModels.jl-master/test/data/matpower/frankenstein_00.m | 2,010 | utf_8 | 2eb9f12948ad025400fd4fdb36c530fc | % Case saved by PowerWorld Simulator, version 19, build date January 17, 2017
% Case Information Header = 2 lines
% A Frankenstein network for testing all of the core features of v33 data files
% developed by Carleton Coffrin (cjc@lanl.gov) June 2017
function mpc = frankenstein_00
mpc.version = '2';
mpc.baseMVA =... |
github | lanl-ansi/PowerModels.jl-master | case30.m | .m | PowerModels.jl-master/test/data/matpower/case30.m | 6,660 | utf_8 | b2778ec0340deede2b1cd151d52c4b79 | % from pglib-opf - https://github.com/power-grid-lib/pglib-opf
function mpc = case30
mpc.version = '2';
mpc.baseMVA = 100.0;
%% bus data
% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin
mpc.bus = [
1 3 0.0 0.0 0.0 0.0 1 1.06000 -0.00000 132.0 1 1.06000 0.94000;
2 2 21.7 12.7 0.0 ... |
github | lanl-ansi/PowerModels.jl-master | case5_tnep.m | .m | PowerModels.jl-master/test/data/matpower/case5_tnep.m | 2,658 | utf_8 | 470d092090807211509fb7dba3d74915 | % tests extra data needed for tnep problems
function mpc = case5_tnep
mpc.version = '2';
mpc.baseMVA = 100.0;
%% bus data
% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin
mpc.bus = [
1 2 0.0 0.0 0.0 0.0 1 1.07762 2.80377 230.0 1 1.10000 0.90000;
2 1 300.0 98.61 0.0 0.0 1 1... |
github | ezachar/PeerJ-master | parseInputs.m | .m | PeerJ-master/Code/FeatureExtraction/parseInputs.m | 1,405 | utf_8 | 12f34715332fcd1e988e132221c88ae0 |
function [datapath,outpath,ext,kernel,bin, modelfname,list] = parseInputs(varargin)
% function [datapath,outpath,ext,kernel,bin, modelfname,list] = parseInputs(varargin)
%=== Check for the right number of inputs
if rem(nargin,2)== 1
error('IncorrectNumberOfArguments',...
'Incorrect number of a... |
github | ezachar/PeerJ-master | cnn_proteins_init_perChannel.m | .m | PeerJ-master/Code/cnn/cnn_proteins_init_perChannel.m | 3,880 | utf_8 | 80f57acab2e8cf5d93352d5088c57f76 | function net = cnn_proteins_init_perChannel(opts, varargin)
% CNN_MNIST_LENET Initialize a CNN similar for MNIST
% opts.useSPnorm = false ;
% opts.useDropout = false;
opts = vl_argparse(opts, varargin) ;
rng('default');
rng(0) ;
f=1/100 ;
net.layers = {} ;
numLastFilters = 500;
numFilters = 20; % number of filters
n... |
github | ezachar/PeerJ-master | cnn_proteins_init.m | .m | PeerJ-master/Code/cnn/cnn_proteins_init.m | 3,891 | utf_8 | 25cea2ab45fc779167b255f5eed4acaf | function net = cnn_proteins_init(opts, varargin)
% CNN_MNIST_LENET Initialize a CNN similar for MNIST
% opts.useSPnorm = false ;
% opts.useDropout = false;
opts = vl_argparse(opts, varargin) ;
rng('default');
rng(0) ;
f=1/100 ;
net.layers = {} ;
numLastFilters = 500;
numFilters = 20; % number of filters
numLabels = ... |
github | albertomontesg/computer-vision-exercises-master | MCL_Localization_lab.m | .m | computer-vision-exercises-master/exercise3/code/MCL_Localization_lab.m | 9,090 | utf_8 | da7b928668ef1fbbc50dcf8018575a68 | % 1DOF ROBOT LOCALIZATION IN A CIRCULAR HALLWAY USING A HISTOGRAM FILTER
function MCLLocalization1DOFRobotInTheHallway
clear all; %close all;
global frame figure_handle plot_handle firstTime;
fprintf('Loading the animation data...\n');
load animation;
fprintf('Animation data loaded\n');
% A... |
github | albertomontesg/computer-vision-exercises-master | normalizePoints2d.m | .m | computer-vision-exercises-master/exercise4/code/normalizePoints2d.m | 561 | utf_8 | abeca945dd1d8512f82c09403c848316 | % Normalization of 2d-pts
% Inputs:
% x1s = 2d points
% Outputs:
% nxs = normalized points
% T = normalization matrix
function [x_n, T] = normalizePoints2d(x)
centroid = mean(x,2);
dists = sqrt(sum((x - repmat(centroid,1,size(x,2))).^2,1));
mean_dist = mean(dists);
... |
github | albertomontesg/computer-vision-exercises-master | showFeatureMatches.m | .m | computer-vision-exercises-master/exercise4/code/showFeatureMatches.m | 752 | utf_8 | 6ec133c49f053049c95d2d9ac102bbe6 | % show feature matches between two images
%
% Input:
% img1 - n x m color image
% corner1 - 2 x k matrix, holding keypoint coordinates of first image
% img2 - n x m color image
% corner1 - 2 x k matrix, holding keypoint coordinates of second image
% fig - figure id
func... |
github | albertomontesg/computer-vision-exercises-master | fundamentalMatrix.m | .m | computer-vision-exercises-master/exercise4/code/fundamentalMatrix.m | 630 | utf_8 | 07af32b81188a8adeaaa944ed949be0e | % Compute the fundamental matrix using the eight point algorithm
% Input
% x1s, x2s Point correspondences
%
% Output
% Fh Fundamental matrix with the det F = 0 constraint
% F Initial fundamental matrix obtained from the eight point algorithm
%
function [Fh, F] = fundamentalMatrix(x1s, x2s)
[x1n... |
github | albertomontesg/computer-vision-exercises-master | showCameras.m | .m | computer-vision-exercises-master/exercise4/code/showCameras.m | 950 | utf_8 | a6edc052546f1d63e4218438661e1e84 | % showCameras(Ms, fig)
%
% Input
% Ms cell array of 4x4 transformation matrices ([R|t]) with last row
% equal to [0 0 0 1]
% fig figure id
function showCameras(Ms, fig)
[sx, sy] = size(Ms);
o = [0, 0, 0, 1]';
x = [1, 0, 0, 1]';
y = [0, 1, 0, 1]';
z = [0, 0, 1, 1... |
github | albertomontesg/computer-vision-exercises-master | essentialMatrix.m | .m | computer-vision-exercises-master/exercise4/code/essentialMatrix.m | 641 | utf_8 | c1e2b95eb7c69e621970c485af797883 | % Compute the essential matrix using the eight point algorithm
% Input
% x1s, x2s Point correspondences 3xn matrices
%
% Output
% Eh Essential matrix with the det E = 0 constraint and the constraint that the first two singular values are equal
% E Initial essential matrix obtained from the eight point a... |
github | albertomontesg/computer-vision-exercises-master | decomposeE.m | .m | computer-vision-exercises-master/exercise4/code/decomposeE.m | 759 | utf_8 | 1c828ef6f5a1b83b703952cc573c585d | % Decompose the essential matrix
% Return P = [R|t] which relates the two views
% Yu will need the point correspondences to find the correct solution for P
function P = decomposeE(E, x1s, x2s)
[U,~,V] = svd(E);
W = [0 -1 0; 1 0 0; 0 0 1];
R1 = -U*W*V'; % minus sign to enforce det(R)=1
R2 = -U*W'*... |
github | albertomontesg/computer-vision-exercises-master | makehomogeneous.m | .m | computer-vision-exercises-master/exercise6/code/makehomogeneous.m | 649 | utf_8 | 19d1cac5b6483d4dd545ef8b6bca5dcb | % MAKEHOMOGENEOUS - Appends a scale of 1 to array inhomogeneous coordinates
%
% Usage: hx = makehomogeneous(x)
%
% Argument:
% x - an N x npts array of inhomogeneous coordinates.
%
% Returns:
% hx - an (N+1) x npts array of homogeneous coordinates with the
% homogeneous scale set to 1
%
... |
github | albertomontesg/computer-vision-exercises-master | drawCameras.m | .m | computer-vision-exercises-master/exercise6/code/drawCameras.m | 934 | utf_8 | 393dbdab07b0a574bb10dd2f69b9ac62 | %Ms is a cell matrix of 1 to n projection matrices
%Ms{1} = P1;
%Ms{2} = P2;
%...
%fig is the figure number where to draw the cameras
function drawCameras(Ms, fig)
[sx, sy] = size(Ms);
o = [0, 0, 0, 1]';
x = [1, 0, 0, 1]';
y = [0, 1, 0, 1]';
z = [0, 0, 1, 1]';
po = zeros... |
github | albertomontesg/computer-vision-exercises-master | ransacfitprojmatrix.m | .m | computer-vision-exercises-master/exercise6/code/ransacfitprojmatrix.m | 4,030 | utf_8 | 48cf8ea5f6157729c26d62bf1612d89d | % RANSACFITPROJMATRIX - fits projection matrix using RANSAC
%
% Usage: [P, inliers] = ransacfitprojmatrix(x1, x2, t)
%
% Arguments:
% x1 - 2xN or 3xN set of homogeneous points. If the data is
% 2xN it is assumed the homogeneous scale factor is 1.
% x2 - 3xN or 4xN set of homogeneou... |
github | albertomontesg/computer-vision-exercises-master | showFeatureMatches.m | .m | computer-vision-exercises-master/exercise6/code/showFeatureMatches.m | 756 | utf_8 | 59cf88c95fbb9fb5157440341544b30e | % show feature matches between two images
%
% Input:
% img1 - n x m color image
% corner1 - 2 x k matrix, holding keypoint coordinates of first image
% img2 - n x m color image
% corner1 - 2 x k matrix, holding keypoint coordinates of second image
% fig - figure id
func... |
github | albertomontesg/computer-vision-exercises-master | ransacfitfundmatrix.m | .m | computer-vision-exercises-master/exercise6/code/ransacfitfundmatrix.m | 5,681 | utf_8 | d636255e269db2be2501f6bd39d651c1 | % RANSACFITFUNDMATRIX - fits fundamental matrix using RANSAC
%
% Usage: [F, inliers] = ransacfitfundmatrix(x1, x2, t)
%
% Arguments:
% x1 - 2xN or 3xN set of homogeneous points. If the data is
% 2xN it is assumed the homogeneous scale factor is 1.
% x2 - 2xN or 3xN set of homogeneo... |
github | albertomontesg/computer-vision-exercises-master | normalise3dpts.m | .m | computer-vision-exercises-master/exercise6/code/normalise3dpts.m | 2,182 | utf_8 | 54c8a965fb92edec39a1f93028771089 | % NORMALISE3DPTS - normalises 3D homogeneous points
%
% Function translates and normalises a set of 3D homogeneous points
% so that their centroid is at the origin and their mean distance from
% the origin is sqrt(3). This process typically improves the
% conditioning of any equations used to solve homographies, fun... |
github | albertomontesg/computer-vision-exercises-master | projmatrix.m | .m | computer-vision-exercises-master/exercise6/code/projmatrix.m | 2,113 | utf_8 | 790273b38d11e84890a2ae16ec749317 | % PROJMATRIX - computes projection matrix from 6 or more 3D-2D points
%
% Function computes the projection matrix from 6 or more 3D-2D matching points in
% a stereo pair of images. The normalised 6 point algorithm given by
% Hartley and Zisserman is used. To achieve accurate results it is
% recommended that 12 or mor... |
github | albertomontesg/computer-vision-exercises-master | hnormalise.m | .m | computer-vision-exercises-master/exercise6/code/hnormalise.m | 1,012 | utf_8 | ac17ab683e70a6324bb66b10d5e547d0 | % HNORMALISE - Normalises array of homogeneous coordinates to a scale of 1
%
% Usage: nx = hnormalise(x)
%
% Argument:
% x - an Nxnpts array of homogeneous coordinates.
%
% Returns:
% nx - an Nxnpts array of homogeneous coordinates rescaled so
% that the scale values nx(N,:) are all 1.
%
... |
github | albertomontesg/computer-vision-exercises-master | makeinhomogeneous.m | .m | computer-vision-exercises-master/exercise6/code/makeinhomogeneous.m | 791 | utf_8 | ce76d362845ed0c7eef257d1d0406795 | % MAKEINHOMOGENEOUS - Converts homogeneous coords to inhomogeneous coordinates
%
% Usage: x = makehomogeneous(hx)
%
% Argument:
% hx - an N x npts array of homogeneous coordinates.
%
% Returns:
% x - an (N-1) x npts array of inhomogeneous coordinates
%
% Warning: If there are any points at infinity ... |
github | albertomontesg/computer-vision-exercises-master | create3DModel.m | .m | computer-vision-exercises-master/exercise6/code/create3DModel.m | 1,038 | utf_8 | fb590ce1dd28521c85c6d4f32c2866d0 | %depth image in double
%img - rgb image in double
function create3DModel(depth, img, fig)
skip = 1;
img = img(1:skip:end, 1:skip:end, :);
depth = (depth(1:skip:end, 1:skip:end));
[sx, sy] = size(depth);
K = [1 0 sx/2;
0 1 sy/2;
0 0 1];
Kinv = inv(K);
... |
github | albertomontesg/computer-vision-exercises-master | showFeatureInliers.m | .m | computer-vision-exercises-master/exercise6/code/showFeatureInliers.m | 996 | utf_8 | d115855b8ec9edc71bf2c7a9954e0037 | % show feature matches between two images
%
% Input:
% img1 - n x m color image
% corner1 - 2 x k matrix, holding keypoint coordinates of first image
% img2 - n x m color image
% corner1 - 2 x k matrix, holding keypoint coordinates of second image
% fig - figure id
func... |
github | albertomontesg/computer-vision-exercises-master | fundmatrix.m | .m | computer-vision-exercises-master/exercise6/code/fundmatrix.m | 3,975 | utf_8 | 16d85192930d30a0b89c7e70077c9e5a | % FUNDMATRIX - computes fundamental matrix from 8 or more points
%
% Function computes the fundamental matrix from 8 or more matching points in
% a stereo pair of images. The normalised 8 point algorithm given by
% Hartley and Zisserman p265 is used. To achieve accurate results it is
% recommended that 12 or more poi... |
github | albertomontesg/computer-vision-exercises-master | ransac.m | .m | computer-vision-exercises-master/exercise6/code/ransac.m | 9,877 | utf_8 | 6161d8cc1a602a9c2796433f55d7b6dd | % RANSAC - Robustly fits a model to data with the RANSAC algorithm
%
% Usage:
%
% [M, inliers] = ransac(x, fittingfn, distfn, degenfn s, t, feedback, ...
% maxDataTrials, maxTrials)
%
% Arguments:
% x - Data sets to which we are seeking to fit a model M
% It is assumed ... |
github | albertomontesg/computer-vision-exercises-master | normalise2dpts.m | .m | computer-vision-exercises-master/exercise6/code/normalise2dpts.m | 2,361 | utf_8 | 2b9d94a3681186006a3fd47a45faf939 | % NORMALISE2DPTS - normalises 2D homogeneous points
%
% Function translates and normalises a set of 2D homogeneous points
% so that their centroid is at the origin and their mean distance from
% the origin is sqrt(2). This process typically improves the
% conditioning of any equations used to solve homographies, fun... |
github | albertomontesg/computer-vision-exercises-master | showImageWithSIFT.m | .m | computer-vision-exercises-master/exercise1/code/showImageWithSIFT.m | 333 | utf_8 | d22d381bd687e62736387ce7fe7483c3 | % show image with key points
%
% Input:
% img - n x m color image
% corner - 2 x k matrix, holding keypoint coordinates of first image
% fig - figure id
function showImageWithSIFT(img, sift_features, fig)
figure(fig);
imshow(img, []);
hold on
vl_plotframe(sift_fe... |
github | albertomontesg/computer-vision-exercises-master | showFeatureMatches.m | .m | computer-vision-exercises-master/exercise1/code/showFeatureMatches.m | 758 | utf_8 | 8b7d6b5462a35ff1c02e7f0a4db16712 | % show feature matches between two images
%
% Input:
% img1 - n x m color image
% corner1 - 2 x k matrix, holding keypoint coordinates of first image
% img2 - n x m color image
% corner1 - 2 x k matrix, holding keypoint coordinates of second image
% fig - figure id
func... |
github | albertomontesg/computer-vision-exercises-master | extractDescriptor.m | .m | computer-vision-exercises-master/exercise1/code/extractDescriptor.m | 1,023 | utf_8 | 8aad6d78974c3f7e5402318b87241581 | % extract descriptor
%
% Input:
% keyPoints - detected keypoints in a 2 x n matrix holding the key
% point coordinates
% img - the gray scale image
%
% Output:
% descr - w x n matrix, stores for each keypoint a
% descriptor. m is the size of th... |
github | albertomontesg/computer-vision-exercises-master | showImageWithCorners.m | .m | computer-vision-exercises-master/exercise1/code/showImageWithCorners.m | 339 | utf_8 | 0f689ab81e2bd82f3593f8609335dfb1 | % show image with key points
%
% Input:
% img - n x m color image
% corner - 2 x k matrix, holding keypoint coordinates of first image
% fig - figure id
function showImageWithCorners(img, corners, fig)
figure(fig);
imshow(img, []);
hold on, plot(corners(1,:), corners(... |
github | albertomontesg/computer-vision-exercises-master | extractHarrisCorner.m | .m | computer-vision-exercises-master/exercise1/code/extractHarrisCorner.m | 1,249 | utf_8 | 61d4a4604fc151953c9a3d9ac60beaa4 | % extract harris corner
%
% Input:
% img - n x m gray scale image
% thresh - scalar value to threshold corner strength
%
% Output:
% corners - 2 x k matrix storing the keypoint coordinates
% H - n x m gray scale image storing the corner strength
function [corners, ... |
github | albertomontesg/computer-vision-exercises-master | matchDescriptors.m | .m | computer-vision-exercises-master/exercise1/code/matchDescriptors.m | 847 | utf_8 | b4397cccdf4daae9de8506da30242d06 | % match descriptors
%
% Input:
% descr1 - k x n descriptor of first image
% descr2 - k x m descriptor of second image
% thresh - scalar value to threshold the matches
%
% Output:
% matches - 2 x w matrix storing the indices of the matching
% descriptors
... |
github | bradmonk/neuromorph-master | neuromorph.m | .m | neuromorph-master/neuromorph.m | 31,150 | utf_8 | 1ca551cd60a803c7cb9a3459cb0fcbf2 | function varargout = neuromorph(varargin)
%% neuromorph.m - NEURON MORPHOLOGY TOOLBOX
%{
%
% Syntax
% -----------------------------------------------------
% neuromorph()
%
%
% Description
% -----------------------------------------------------
%
% neuromorph() is run with no arguments passed in... |
github | shenweichen/Coursera-master | RunInference.m | .m | Coursera-master/Specialization_Probabilistic_Graphical_Models_Stanford_University/Course1_Probabilistic_Graphical_Models_1_Representation/HW3_Markov Networks for OCR/RunInference.m | 1,769 | utf_8 | 1ba1656e4edc7d51078478fedd09878a | function pred = RunInference (factors)
% This function performs inference for a Markov network specified as a list
% of factors.
%
% Input:
% factors: An array of struct factors, each containing 'var', 'card', and
% 'val' fields.
%
% Output:
% pred: An array of predictions for every variable. In particular,
% ... |
github | shenweichen/Coursera-master | IndexToAssignment.m | .m | Coursera-master/Specialization_Probabilistic_Graphical_Models_Stanford_University/Course1_Probabilistic_Graphical_Models_1_Representation/HW3_Markov Networks for OCR/IndexToAssignment.m | 568 | utf_8 | 506de63bacc99887816fc7288aaa4301 | % IndexToAssignment Convert index to variable assignment.
%
% A = IndexToAssignment(I, D) converts an index, I, into the .val vector
% into an assignment over variables with cardinality D. If I is a vector,
% then the function produces a matrix of assignments, one assignment
% per row.
%
% See also Assignme... |
github | shenweichen/Coursera-master | submit.m | .m | Coursera-master/Specialization_Probabilistic_Graphical_Models_Stanford_University/Course1_Probabilistic_Graphical_Models_1_Representation/HW3_Markov Networks for OCR/submit.m | 4,874 | utf_8 | b28bc742c0663bbf562786d44919f474 | function submit(part)
addpath('./lib');
conf.assignmentKey = '1RFc-gNfEeapUhL5oS3IIQ';
conf.itemName = 'Markov Networks for OCR';
conf.partArrays = { ...
{ ...
'Ga9CX', ...
{ 'ComputeSingletonFactors.m' }, ...
'', ...
}, ...
{ ...
'Y6ud3', ...
{ 'ComputeSingletonFacto... |
github | shenweichen/Coursera-master | GetValueOfAssignment.m | .m | Coursera-master/Specialization_Probabilistic_Graphical_Models_Stanford_University/Course1_Probabilistic_Graphical_Models_1_Representation/HW3_Markov Networks for OCR/GetValueOfAssignment.m | 809 | utf_8 | 272b9bca5fe98bd4c793e9b6d3bc0c2f | %GETVALUEOFASSIGNMENT Gets the value of a variable assignment in a factor.
%
% v = GETVALUEOFASSIGNMENT(F, A) returns the value of a variable assignment,
% A, in factor F. The order of the variables in A are assumed to be the
% same as the order in F.var.
%
% v = GETVALUEOFASSIGNMENT(F, A, VO) gets the value of... |
github | shenweichen/Coursera-master | AssignmentToIndex.m | .m | Coursera-master/Specialization_Probabilistic_Graphical_Models_Stanford_University/Course1_Probabilistic_Graphical_Models_1_Representation/HW3_Markov Networks for OCR/AssignmentToIndex.m | 631 | utf_8 | ee3dd64cb42f51f10372074314d48e76 | % AssignmentToIndex Convert assignment to index.
%
% I = AssignmentToIndex(A, D) converts an assignment, A, over variables
% with cardinality D to an index into the .val vector for a factor.
% If A is a matrix then the function converts each row of A to an index.
%
% See also IndexToAssignment.m and SampleFact... |
github | shenweichen/Coursera-master | SetValueOfAssignment.m | .m | Coursera-master/Specialization_Probabilistic_Graphical_Models_Stanford_University/Course1_Probabilistic_Graphical_Models_1_Representation/HW3_Markov Networks for OCR/SetValueOfAssignment.m | 829 | utf_8 | 1cdbc6dd85db30405ae79f168a884b23 | %SETVALUEOFASSIGNMENT Sets the value of a variable assignment in a factor.
%
% F = SETVALUEOFASSIGNMENT(F, A, v) sets the value of a variable assignment,
% A, in factor F to v. The order of the variables in A are assumed to be the
% same as the order in F.var.
%
% F = SETVALUEOFASSIGNMENT(F, A, v, VO) sets the ... |
github | shenweichen/Coursera-master | submitWithConfiguration.m | .m | Coursera-master/Specialization_Probabilistic_Graphical_Models_Stanford_University/Course1_Probabilistic_Graphical_Models_1_Representation/HW3_Markov Networks for OCR/lib/submitWithConfiguration.m | 3,010 | utf_8 | 81b617620421b9891908dc9e7fbf6cda | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | shenweichen/Coursera-master | savejson.m | .m | Coursera-master/Specialization_Probabilistic_Graphical_Models_Stanford_University/Course1_Probabilistic_Graphical_Models_1_Representation/HW3_Markov Networks for OCR/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | shenweichen/Coursera-master | loadjson.m | .m | Coursera-master/Specialization_Probabilistic_Graphical_Models_Stanford_University/Course1_Probabilistic_Graphical_Models_1_Representation/HW3_Markov Networks for OCR/lib/jsonlab/loadjson.m | 18,888 | ibm852 | f5b550952f123aa7ebbb4cc1e4e1a2ca | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | shenweichen/Coursera-master | loadubjson.m | .m | Coursera-master/Specialization_Probabilistic_Graphical_Models_Stanford_University/Course1_Probabilistic_Graphical_Models_1_Representation/HW3_Markov Networks for OCR/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | shenweichen/Coursera-master | saveubjson.m | .m | Coursera-master/Specialization_Probabilistic_Graphical_Models_Stanford_University/Course1_Probabilistic_Graphical_Models_1_Representation/HW3_Markov Networks for OCR/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | shenweichen/Coursera-master | IndexToAssignment.m | .m | Coursera-master/Specialization_Probabilistic_Graphical_Models_Stanford_University/Course1_Probabilistic_Graphical_Models_1_Representation/HW1_Simple BN Knowledge Engineering/IndexToAssignment.m | 583 | utf_8 | 344ed305e4ca7bcf86898725befe1413 | % IndexToAssignment Convert index to variable assignment.
%
% A = IndexToAssignment(I, D) converts an index, I, into the .val vector
% into an assignment over variables with cardinality D. If I is a vector,
% then the function produces a matrix of assignments, one assignment
% per row.
%
% See also Assignme... |
github | shenweichen/Coursera-master | FactorMarginalization.m | .m | Coursera-master/Specialization_Probabilistic_Graphical_Models_Stanford_University/Course1_Probabilistic_Graphical_Models_1_Representation/HW1_Simple BN Knowledge Engineering/FactorMarginalization.m | 1,605 | utf_8 | d4123eb1bd128d3be2ea9483ed159e1c | % FactorMarginalization Sums given variables out of a factor.
% B = FactorMarginalization(A,V) computes the factor with the variables
% in V summed out. The factor data structure has the following fields:
% .var Vector of variables in the factor, e.g. [1 2 3]
% .card Vector of cardinalities corresp... |
github | shenweichen/Coursera-master | FactorProduct.m | .m | Coursera-master/Specialization_Probabilistic_Graphical_Models_Stanford_University/Course1_Probabilistic_Graphical_Models_1_Representation/HW1_Simple BN Knowledge Engineering/FactorProduct.m | 2,298 | utf_8 | 1e54a5848d80539d565c6a008e64f656 | % FactorProduct Computes the product of two factors.
% C = FactorProduct(A,B) computes the product between two factors, A and B,
% where each factor is defined over a set of variables with given dimension.
% The factor data structure has the following fields:
% .var Vector of variables in the factor, e.g... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.