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 | 3drobotics/PX4Firmware-master | ellipsoid_fit.m | .m | PX4Firmware-master/Tools/Matlab/ellipsoid_fit.m | 6,102 | utf_8 | b8fff7152313707a347ab528f7fbce9b | % Copyright (c) 2009, Yury Petrov
% All rights reserved.
%
% Redistribution and use in source and binary forms, with or without
% modification, are permitted provided that the following conditions are
% met:
%
% * Redistributions of source code must retain the above copyright
% notice, this list of conditions... |
github | ginestrab/Functional-Multiplex-PageRank-master | fPRm.m | .m | Functional-Multiplex-PageRank-master/fPRm.m | 2,345 | utf_8 | 4852e594256a9b11cde5100e52fe7ec7 | %++++++++ Functional Multiplex PageRank ++++++++++++++++++++++++++++++++++++++++++++
%
% This code can be redistributed and/or modified
% under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or (at
% your option) any later version.
%
% Thi... |
github | ginestrab/Functional-Multiplex-PageRank-master | functionalPageRank_multiplicity.m | .m | Functional-Multiplex-PageRank-master/functionalPageRank_multiplicity.m | 2,723 | utf_8 | f33353b09a979f5e46a9e75ea2b7e902 | %++++++++ Functional Multiplex PageRank ++++++++++++++++++++++++++++++++++++++++++++
%
% This code can be redistributed and/or modified
% under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or (at
% your option) any later version.
% ... |
github | ginestrab/Functional-Multiplex-PageRank-master | functionalPageRank_duplex.m | .m | Functional-Multiplex-PageRank-master/functionalPageRank_duplex.m | 2,484 | utf_8 | 4bf1d68998e627f674fa17af035e4229 | %++++++++ Functional Multiplex PageRank ++++++++++++++++++++++++++++++++++++++++++++
%
% This code can be redistributed and/or modified
% under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or (at
% your option) any later version.
% ... |
github | ginestrab/Functional-Multiplex-PageRank-master | fPR.m | .m | Functional-Multiplex-PageRank-master/fPR.m | 2,602 | utf_8 | 2637a3e4b5396b9ccb7c522d5d8b19ad | %++++++++ Functional Multiplex PageRank ++++++++++++++++++++++++++++++++++++++++++++
%
% This code can be redistributed and/or modified
% under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or (at
% your option) any later version.
%
% Thi... |
github | STZhang/cs231a_project-master | in3d_pots.m | .m | cs231a_project-master/codes/in3d_pots.m | 5,000 | utf_8 | 9aa7e82c15fb6d7b2c65ff730be9ed5e | function pots = in3d_pots(cfg, feas, scenes, samples)
%IN3D_POTS Create a potential set over input scenes
%
% pots = IN3D_POTS(cfg, feas, scenes, samples);
%
% Creates a potential set on the input scenes, based on the given
% feature setting.
%
% Inputs:
% - cfg: The model configuration (... |
github | STZhang/cs231a_project-master | in3d_syn01.m | .m | cs231a_project-master/codes/in3d_syn01.m | 4,217 | utf_8 | f393c5f805d4d920bb45c390c190c4c0 | function pots = in3d_syn01()
%IN3D_SYN01 Tests the Indoor 3D framework using a synthetic set
%
% IN3D_SYN01();
%
%% configuration
rng(0);
cfg.scene_classes = {'A', 'B'};
cfg.object_classes = {'bed', 'chest', 'chair', 'table'};
cfg.use_scene_score = 1;
cfg.use_detect_score = 1;
cfg.use_segment_score = 0;
cfg.use_s... |
github | STZhang/cs231a_project-master | toy02c.m | .m | cs231a_project-master/codes/toy02c.m | 1,922 | utf_8 | b03e1f3a4565bb6fa080eb42b2cb0ffb | function F = toy02c()
%TOY02C Reimplements toy02 using classes
%
%% feature specification
rng(0);
K = 2;
feas = gcrf_feaset();
feas.add_feature('obs', K);
feas.add_feature('inter', [K, K]);
%% samples
n = 100;
s = gcrf_sample();
s.add_locals('x', 2, K);
samples = cell(n, 1);
for i = 1 : n
samples{i} = s;
end... |
github | STZhang/cs231a_project-master | in3d_main.m | .m | cs231a_project-master/codes/in3d_main.m | 7,714 | utf_8 | cd266d6a06ed1ea218ab521d87471957 | function in3d_main(objty, cfg, C, varargin)
%IN3D_MAIN The main program to run Training and Testing on Indoor3d mdoel
%
% IN3D_MAIN(objty, cfg, C)
%
% Runs the trainig and testing of an indoor 3D model based on
% the input config.
%
% Here, cfg can be either a config struct (loaded by in3d_config)
... |
github | STZhang/cs231a_project-master | in3d_gtobjects.m | .m | cs231a_project-master/codes/in3d_gtobjects.m | 1,361 | utf_8 | 6f1a1fe2505095db273ecb3b580c84aa | function in3d_gtobjects(idx, op)
%IN3D_GTOBJECTS Generates ground-truth objects by min-bound cubes
%
% IN3D_GTOBJECTS(idx, op);
%
% object labels use the latest 31-class label
to_plot = nargin >= 2 && strcmpi(op, 'plot');
datadir = '~/data/NYUv2';
srcdir = fullfile(datadir, 'rot_scenes');
outdir = fullfile(dat... |
github | STZhang/cs231a_project-master | toy02.m | .m | cs231a_project-master/codes/toy02.m | 3,255 | utf_8 | 49f0ce95695acf9790f284cf19c89804 | function F = toy02()
%TOY02 a toy example to test learning of libHCRF
%
% The dataset is generated at such a way that node1 and node2 tend
% to be the same.
%
%% settings
rng(0);
n = 100; % number of samples
K = 2; % number of classes
%% construct training features
mu = [0; 0];
cov = [1 0.8; 0.8 1];
%... |
github | STZhang/cs231a_project-master | in3d_config.m | .m | cs231a_project-master/codes/in3d_config.m | 3,876 | utf_8 | 55a5136b9020a5c0f70bc253d56ebb2c | function cfg = in3d_config(objty, cfgname)
%IN3D_CONFIG Reads a config file
%
% cfg = IN3D_CONFIG(objty, cfgname)
%
% objty: the type of candidate objects to use
% cfgname: the config name, e.g. e01
%
%% main
% load config
datacfg = read_datacfg();
cfgdir = fullfile(fileparts(mfilename('fullpath')), 'configs... |
github | STZhang/cs231a_project-master | in3d_geosvm.m | .m | cs231a_project-master/codes/svm/in3d_geosvm.m | 1,415 | utf_8 | 9981e0f2dc087f0f7935a03e2c3f928e | function [best, Pall] = in3d_geosvm(F, cs, gs)
%IN3D_GEOSVM Trains geometric SVM and generated potentials
%
% IN3D_GEOSVM(F);
%
tr = F.train_objs;
vl = F.val_objs;
tv = F.trainval_objs;
%tr = tv;
%vl = tv;
te = F.test_objs;
Xtr = F.feas(:,tr);
Ltr = F.olabels(tr);
Xvl = F.feas(:,vl);
Lvl = F.olabels(vl);
Xtv = F.fe... |
github | STZhang/cs231a_project-master | p3d_geoex_i.m | .m | cs231a_project-master/codes/p3d/p3d_geoex_i.m | 667 | utf_8 | 6de8a280c4c1c6727cab17f2f7fcd685 | function p3d_geoex_i(idx)
% lightweight wrapper pf p3d_geoextract
%
datadir = '~/data/NYUv2';
yfs = load(fullfile(datadir, 'yfloors.mat'));
yfs = yfs.yfloors;
gf_on(datadir, idx, yfs(idx));
function gf_on(datadir, idx, yf)
scenedir = fullfile(datadir, 'rot_scenes');
objdir = fullfile(datadir, 'gtobjects_a');
walld... |
github | STZhang/cs231a_project-master | p3d_overlapr.m | .m | cs231a_project-master/codes/p3d/p3d_overlapr.m | 757 | utf_8 | dc21f182d13f4afb2e5042aa4362dc0c | function r = p3d_overlapr(b1, b2)
%P3D_OVERLAPR Compute overlap ratio of two boxes
%
% r = P3D_OVERLAPR(b1, b2);
%
% b1 and b2 are boxes in the form of [xmin, xmax, ymin, ymax];
%
% r = intersection / union
%
%% main
% computer intersected area
ix = overlap_len(b1(1), b1(2), b2(1), b2(2));
iy = overlap... |
github | STZhang/cs231a_project-master | p3d_surfnorm.m | .m | cs231a_project-master/codes/p3d/p3d_surfnorm.m | 2,069 | utf_8 | 917a0c916e5e335afa486489770e237c | function nrmvecs = p3d_surfnorm(s, op)
to_plot = nargin >= 2 && strcmpi(op, 'plot');
h = size(s.image, 1);
w = size(s.image, 2);
wc = double(s.wcoords);
x = wc(:,1);
y = wc(:,2);
z = wc(:,3);
x = reshape(x, [h w]);
y = reshape(y, [h w]);
z = reshape(z, [h w]);
di = [-1 0 1 -1 1 -1 0 1];
dj = [-1 -1 -1 0 0 1 1 1];
... |
github | STZhang/cs231a_project-master | p3d_cali_scene.m | .m | cs231a_project-master/codes/p3d/p3d_cali_scene.m | 2,136 | utf_8 | b4b3d09de72a2b721214120105c3e8d8 | function sr = p3d_cali_scene(idx, op)
%P3D_CALI_SCENE Performs Scene calibration and generates new scene structs
%
% P3D_CALI_SCENE(idx);
% P3D_CALI_SCENE(idx, 'plot');
%
to_plot = nargin >= 2 && strcmpi(op, 'plot');
%% Load files
datadir = '~/data/NYUv2';
% scene data
s = load(fullfile(datadir, 'scenes', sprin... |
github | STZhang/cs231a_project-master | p3d_box2bb.m | .m | cs231a_project-master/codes/p3d/p3d_box2bb.m | 672 | utf_8 | 00340117e6f0468c722792ab12e0d2c3 | function bb = p3d_box2bb(cube)
% Return 2D bounding boxes (w.r.t. image plane)
%
% bb = p3d_box2bb(cube);
%
P = cube.proj;
bb = zeros(cube.n, 4);
for i = 1 : cube.n
bb(i, :) = proc(cube.bnds(i,:), cube.rot(:,:,i), P);
end
function rc = proc(bnds, rot, P)
x0 = bnds(1);
y0 = bnds(2);
z0 = bnds(3);
x1 = bnds(4);
... |
github | STZhang/cs231a_project-master | p3d_gnddist.m | .m | cs231a_project-master/codes/p3d/p3d_gnddist.m | 1,569 | utf_8 | 64a97e9de08d2a908a9bdeaa194f3ae9 | function d = p3d_gnddist(cb1, cb2)
%P3D_GNDDIST Computes ground-distance between two bounding boxes
%
% P3D_GNDDIST(cb1, cb2)
%
[x1, z1] = trans(cb1);
[x2, z2] = trans(cb2);
[x2a, z2a] = rev_trans(cb1, x2, z2);
[x1b, z1b] = rev_trans(cb2, x1, z1);
da = pt2rc(cb1, x2a, z2a);
db = pt2rc(cb2, x1b, z1b);
d = m... |
github | STZhang/cs231a_project-master | p3d_drawcube.m | .m | cs231a_project-master/codes/p3d/p3d_drawcube.m | 1,454 | utf_8 | 69474c769a282e99856b78b8ed364188 | function p3d_drawcube(cube, color)
%P3D_DRAWBOX Draws a 3D cube
%
% P3D_DRAWCUBE(cube, color);
%
% It draws a 3D cube using specified color on the current axis.
%
%% main
if isscalar(cube)
draw_one_cube(cube, color);
else
for i = 1 : length(cube)
draw_one_cube(cube(i), color);
end
e... |
github | STZhang/cs231a_project-master | p3d_minbndcube.m | .m | cs231a_project-master/codes/p3d/p3d_minbndcube.m | 964 | utf_8 | 7576d338dbaf78773a5d3a5e8304e855 | function cube = p3d_minbndcube(x, y, z, p)
%P3D_MINBNDCUBE Finds minimum bounding box for a set of points
%
% cube = P3D_MINBNDBOX(x, y, z, p);
%
% x, y, z: 3D coordinates
% p: the ratio of points that is allowed to be outside
%
if nargin < 4
p = 0.1;
end
fun = @(t) objv_func(t, x, z, p);
opts ... |
github | STZhang/cs231a_project-master | p3d_view.m | .m | cs231a_project-master/codes/p3d/p3d_view.m | 3,362 | utf_8 | aeb5d2d9a8c0c9ac3bb917eb6c039539 | function p3d_view(s, op)
%P3D_VIEW Creates a window to show a 3D scene
%
% P3D_VIEW(s, 'depth')
% Shows the depth map using default color map.
%
% s is a struct encapsulating a scene.
%
% P3D_VIEW(s, 'rgbd')
% Shows the depth map with RGBD texture
%
% P3D_VIEW(s, 'labels')
% Shows the dep... |
github | STZhang/cs231a_project-master | p3d_supports.m | .m | cs231a_project-master/codes/p3d/p3d_supports.m | 1,048 | utf_8 | 91e00a256ca6a7d741b876be7fa2e6fb | function tf = p3d_supports(o1, o2)
cb1 = o1.cube;
cb2 = o2.cube;
[x2, z2] = trans(cb2);
[x2a, z2a] = rev_trans(cb1, x2, z2);
cx2a = mean(x2a);
cz2a = mean(z2a);
tf = pt_in_rc(cb1, cx2a, cz2a) && cb1.centers(2) < cb2.centers(2);
function [x, z] = trans(cb)
% transform the coordinates or corners to floor plan coord... |
github | STZhang/cs231a_project-master | p3d_geofea.m | .m | cs231a_project-master/codes/p3d/p3d_geofea.m | 1,769 | utf_8 | 0b5bf93a8fef84e041f9700828c62c09 | function F = p3d_geofea(Gs, train, val, test)
%P3D_GEOFEA Compute geometric features
%
% F = P3D_GEOFEA(Gs, train, test);
%
% Gs is a cell array, each cell is a struct generated from
% p3d_geoextract.
%
% train & test are scene indices in both sets.
%
% F is a struct with following fields:
% - feas: ... |
github | STZhang/cs231a_project-master | hj_plot.m | .m | cs231a_project-master/codes/p3d/hj_plot.m | 1,246 | utf_8 | d395da48c255c97756fbd953100707ea | function hj_plot(im, hj)
%HJ_PLOT Plots the HJ boxes in 2D
%
% HJ_PLOT(im, hj);
%
% im: scene image [480 x 640]
% hj: HJ cubes
%
imshow(im);
for i = 1 : size(hj.bnds, 1)
hold on;
plot_box(hj.bnds(i,:), hj.rot(:,:,i), hj.proj);
end
function plot_box(b, TR, P)
minx = b(1);
miny = b(2);
minz... |
github | STZhang/cs231a_project-master | p3d_geoextract.m | .m | cs231a_project-master/codes/p3d/p3d_geoextract.m | 3,584 | utf_8 | 2fd129f372903657b0ecb5061e3c5da0 | function G = p3d_geoextract(scene, objs, walls, yf, op)
%P3D_GEOEXTRACT Extracts geometric information of objects
%
% G = P3D_GEOEXTRACT(scene, objs, walls, yf);
%
% G is a struct array with n elements, (n is the number of objects
% in the scene).
%
% Each element of G has the following fields:
% - label: ... |
github | STZhang/cs231a_project-master | p3d_wallrel.m | .m | cs231a_project-master/codes/p3d/p3d_wallrel.m | 2,464 | utf_8 | d593737a4e6289db4273084f889dbd30 | function [d, t] = p3d_wallrel(cube, wall, wnrm, op)
%P3D_WALLREL Computes the geometric relation between a cube and a wall
%
% [d, t] = P3D_WALLREL(cube, wall, wnrm);
% [d, t] = P3D_WALLREL(cube, wall, wnrm, 'plot');
%
% Inputs:
% - cube: The cube structure
% - wall: The wall
% - wnrm: The norma... |
github | STZhang/cs231a_project-master | p3d_floorplan.m | .m | cs231a_project-master/codes/p3d/p3d_floorplan.m | 3,169 | utf_8 | 5b398d465e7144ac58271ae2b59da568 | function R = p3d_floorplan(scene, objs, walls, op)
%P3D_FLOORPLAN Analyzes the floor plan of a scene
%
% R = P3D_FLOORPLAN(scene, objs);
% R = P3D_FLOORPLAN(scene, objs, walls);
%
% (R.mass_cx, R.mass_cz) is the object mass center of the room
% R.wall_nrms: The towards-interior normal direction of walls
%
% ... |
github | STZhang/cs231a_project-master | p3d_cali_view.m | .m | cs231a_project-master/codes/p3d/p3d_cali_view.m | 512 | utf_8 | c4674eb7a8090d5495366d636f552e38 | function p3d_cali_view(sr)
%P3D_CALI_VIEW Views a 3D calibrated scene
%
% P3D_CALI_VIEW(sr);
%
% sr is the calibrated scene struct
%
p3d_view(sr, 'rgb-world');
view(-15, -45);
y = sr.wcoords(:, 2);
y0 = min(y);
y1 = max(y);
for i = 1 : length(sr.walls)
draw_wall(sr.walls{i}, y0, y1, 'r');
end
function draw_... |
github | STZhang/cs231a_project-master | p3d_floorplan_i.m | .m | cs231a_project-master/codes/p3d/p3d_floorplan_i.m | 804 | utf_8 | f7f26d094101e028359d263c6ef5c642 | function p3d_floorplan_i(idx)
% a lightweight wrapper of p3d_floorplan
if isscalar(idx)
fp_on(idx);
else
for i = 1 : length(idx)
fprintf('On scene %04d\n', idx(i));
fp_on(idx(i));
hg = gcf;
set(hg, 'Name', sprintf('%04d', idx(i)));
pause;
close(hg);
end
end
... |
github | STZhang/cs231a_project-master | in3d_costats.m | .m | cs231a_project-master/codes/exp/in3d_costats.m | 2,910 | utf_8 | 65fbe38a27deb424d69c32ddaed85b23 | function R = in3d_costats(objty)
%IN3D_COSTATS Evaluates co-occurrence statistics
%
% R = IN3D_COSTATS(inds)
%
datadir = in3d_datadir();
objdir = in3d_getobjdir(datadir, objty);
if strcmp(objty, 'gt')
fcls = load(fullfile(datadir, 'classes_final.mat'));
dstfp = fullfile(datadir, 'co_stats.mat');
else
f... |
github | STZhang/cs231a_project-master | in3d_segpots.m | .m | cs231a_project-master/codes/exp/in3d_segpots.m | 1,410 | utf_8 | a7c0915b5eb10ab7118978b08a784a54 | function pots = in3d_segpots(objty)
%IN3D_SEGPOT Generates segmentation potentials for objects
%
% pots = IN3D_SEGPOTS(objs, seg)
%
% objs is an array of object structs.
%
% seg is the segmentation prediction.
%
%
%% main
datadir = in3d_datadir();
objdir = in3d_getobjdir(datadir, objty);
srcdir = full... |
github | STZhang/cs231a_project-master | in3d_is_next.m | .m | cs231a_project-master/codes/exp/in3d_is_next.m | 9,025 | utf_8 | c3e12d3e361517ae8066e286429704b0 | function tf = in3d_is_next(o1, o2)
% test whether two objects are next to each other
cb1 = o1.cube;
cb2 = o2.cube;
[x2, z2] = trans(cb2);
[x2a, x2z] = rev_trans(cb1, x2, z2);
cx2a = mean(x2a);
cz2a = mean(x2z);
[x1, z1] = trans(cb1);
[x1a, x1z] = rev_trans(cb2, x1, z1);
cx1a = mean(x1a);
height_dis = abs(cb1.cente... |
github | STZhang/cs231a_project-master | in3d_baserecall.m | .m | cs231a_project-master/codes/exp/in3d_baserecall.m | 1,869 | utf_8 | b01b3290a807c6fd756d0423dc505f1c | function info = in3d_baserecall(objty)
datadir = in3d_datadir();
GTs = load(fullfile(datadir, 'ground_truths.mat'));
GTs = GTs.GTs;
objdir = in3d_getobjdir(datadir, objty);
spl = load(fullfile(datadir, 'split.mat'));
tv = [spl.train; spl.val]; te = spl.test;
K = 21;
c_tr_t = zeros(1, K);
c_tr_r = zeros(1, K);
c_te_... |
github | STZhang/cs231a_project-master | in3d_gen_geos.m | .m | cs231a_project-master/codes/exp/in3d_gen_geos.m | 1,220 | utf_8 | 4e3fe500e10456ed920b37f5105ef6b1 | function Gs = in3d_gen_geos(objty)
%Generat all geometric analysis
%
datadir = in3d_datadir();
yfs = load(fullfile(datadir, 'yfloors.mat'));
yfs = yfs.yfloors;
fcls = load(fullfile(datadir, 'classes_final.mat'));
dstfp = fullfile(datadir, objty, 'geoinfo.mat');
n = 1449;
Gs = cell(1, n);
is_final = 1;
if strcmpi(o... |
github | STZhang/cs231a_project-master | in3d_seg_majorvote.m | .m | cs231a_project-master/codes/exp/in3d_seg_majorvote.m | 1,321 | utf_8 | adc73810be97f5bfa59b772dcff6beb2 | function [C, ap] = in3d_seg_majorvote(objty, inds)
%IN3D_SEG_MAJORVOTE Performs a baseline classification (based on
%segmentation based voting)
%
% IN3D_SEG_MAJORVOTE
%
%% Load files
datadir = in3d_datadir();
objdir = in3d_getobjdir(objty);
segdir = fullfile(datadir, 'segPredictions');
potdir = fullfile(datadir, ... |
github | MiaoLi/GPIS-master | fAll_mod.m | .m | GPIS-master/ampl/fAll_mod.m | 709 | utf_8 | 8a99505328b59b7f6d3c590695f128b2 |
function fAll_mod (rootname)
%filename = ['All_mod_',rootname,'.txt'];
fid = fopen('All_mod.txt', 'w+');
%fid = fopen(filename, 'w+');
% %%%% O2
% rootname = 'O2_p';
% orient = '_o';
% extension = '.mod';
%
%
% for i=1:42
% for j=1:3
% filename = [rootname, num2str(j), orient, num2str(i), extens... |
github | MiaoLi/GPIS-master | TutorialMatlab.m | .m | GPIS-master/ampl/Ipopt/Ipopt-3.11.8/Ipopt/tutorial/CodingExercise/Matlab/3-solution/TutorialMatlab.m | 3,609 | utf_8 | 2bc5eccfdcf5dc22144b8503230f6b44 | % Copyright (C) 2009 International Business Machines
% All Rights Reserved.
% This code is published under the Eclipse Public License.
%
% $Id: hs071_c.c 699 2006-04-05 21:05:18Z andreasw $
%
% Author: Andreas Waechter IBM 2009-04-02
%
% This file is part of the Ipopt tutorial. It is a correct versi... |
github | MiaoLi/GPIS-master | TutorialMatlab.m | .m | GPIS-master/ampl/Ipopt/Ipopt-3.11.8/Ipopt/tutorial/CodingExercise/Matlab/2-mistake/TutorialMatlab.m | 3,643 | utf_8 | 578035e52af32a4c1043bdda03276f3c | % Copyright (C) 2009 International Business Machines
% All Rights Reserved.
% This code is published under the Eclipse Public License.
%
% $Id: hs071_c.c 699 2006-04-05 21:05:18Z andreasw $
%
% Author: Andreas Waechter IBM 2009-04-02
%
% This file is part of the Ipopt tutorial. It is a version with
... |
github | MiaoLi/GPIS-master | TutorialMatlab.m | .m | GPIS-master/ampl/Ipopt/Ipopt-3.11.8/Ipopt/tutorial/CodingExercise/Matlab/1-skeleton/TutorialMatlab.m | 2,732 | utf_8 | f5e68321a1a25030feef4f51479a5f11 | % Copyright (C) 2009 International Business Machines
% All Rights Reserved.
% This code is published under the Eclipse Public License.
%
% $Id: hs071_c.c 699 2006-04-05 21:05:18Z andreasw $
%
% Author: Andreas Waechter IBM 2009-04-02
%
% This file is part of the Ipopt tutorial. It is the skeleton fo... |
github | MiaoLi/GPIS-master | examplehs038.m | .m | GPIS-master/ampl/Ipopt/Ipopt-3.11.8/Ipopt/contrib/MatlabInterface/examples/examplehs038.m | 2,544 | utf_8 | f3bb807d1f00d1e9805debf9f63341e3 | % Test the "ipopt" Matlab interface on the Hock & Schittkowski test problem
% #38. See: Willi Hock and Klaus Schittkowski. (1981) Test Examples for
% Nonlinear Programming Codes. Lecture Notes in Economics and Mathematical
% Systems Vol. 187, Springer-Verlag.
%
% Copyright (C) 2008 Peter Carbonetto. All Rights Reserved... |
github | MiaoLi/GPIS-master | examplehs051.m | .m | GPIS-master/ampl/Ipopt/Ipopt-3.11.8/Ipopt/contrib/MatlabInterface/examples/examplehs051.m | 2,029 | utf_8 | 8d5dd0450d9974af1ab8d426b6e561fc | % Test the "ipopt" Matlab interface on the Hock & Schittkowski test problem
% #51. See: Willi Hock and Klaus Schittkowski. (1981) Test Examples for
% Nonlinear Programming Codes. Lecture Notes in Economics and Mathematical
% Systems Vol. 187, Springer-Verlag.
%
% Copyright (C) 2008 Peter Carbonetto. All Rights Reserved... |
github | MiaoLi/GPIS-master | examplehs071.m | .m | GPIS-master/ampl/Ipopt/Ipopt-3.11.8/Ipopt/contrib/MatlabInterface/examples/examplehs071.m | 2,355 | utf_8 | 43b7820bab7b701f36f625fa5a0401e2 | % Test the "ipopt" Matlab interface on the Hock & Schittkowski test problem
% #71. See: Willi Hock and Klaus Schittkowski. (1981) Test Examples for
% Nonlinear Programming Codes. Lecture Notes in Economics and Mathematical
% Systems Vol. 187, Springer-Verlag.
%
% Copyright (C) 2008 Peter Carbonetto. All Rights Reserved... |
github | MiaoLi/GPIS-master | lasso.m | .m | GPIS-master/ampl/Ipopt/Ipopt-3.11.8/Ipopt/contrib/MatlabInterface/examples/lasso.m | 3,110 | utf_8 | c7d23cb1f2f1c621ca899be600f724a0 | % This function executes IPOPT to find the maximum likelihood solution to
% least squares regression with L1 regularization or the "Lasso". The inputs
% are the data matrix A (in which each row is an example vector), the vector
% of regression outputs y, and the penalty parameter lambda, a number
% greater than zero. T... |
github | MiaoLi/GPIS-master | evalg.m | .m | GPIS-master/ampl/Ipopt/Ipopt-3.11.8/ThirdParty/ASL/solvers/examples/evalg.m | 1,505 | utf_8 | c1025386c38811f2e88b2fc38778647c | % /****************************************************************
% Copyright (C) 1997 Lucent Technologies
% All Rights Reserved
%
% Permission to use, copy, modify, and distribute this software and
% its documentation for any purpose and without fee is hereby
% granted, provided that the above copyright notice appea... |
github | MiaoLi/GPIS-master | evalw.m | .m | GPIS-master/ampl/Ipopt/Ipopt-3.11.8/ThirdParty/ASL/solvers/examples/evalw.m | 1,477 | utf_8 | 500a2b2d37662607b8358aa4428b7317 | % /****************************************************************
% Copyright (C) 1997 Lucent Technologies
% All Rights Reserved
%
% Permission to use, copy, modify, and distribute this software and
% its documentation for any purpose and without fee is hereby
% granted, provided that the above copyright notice appea... |
github | MiaoLi/GPIS-master | evalf.m | .m | GPIS-master/ampl/Ipopt/Ipopt-3.11.8/ThirdParty/ASL/solvers/examples/evalf.m | 1,697 | utf_8 | 1b16732ee82084cb57297b88b607538a | % /****************************************************************
% Copyright (C) 1997 Lucent Technologies
% All Rights Reserved
%
% Permission to use, copy, modify, and distribute this software and
% its documentation for any purpose and without fee is hereby
% granted, provided that the above copyright notice appea... |
github | MiaoLi/GPIS-master | TutorialMatlab.m | .m | GPIS-master/ampl/Ipopt/Ipopt-3.11.8/build/Ipopt/tutorial/CodingExercise/Matlab/3-solution/TutorialMatlab.m | 3,609 | utf_8 | 2bc5eccfdcf5dc22144b8503230f6b44 | % Copyright (C) 2009 International Business Machines
% All Rights Reserved.
% This code is published under the Eclipse Public License.
%
% $Id: hs071_c.c 699 2006-04-05 21:05:18Z andreasw $
%
% Author: Andreas Waechter IBM 2009-04-02
%
% This file is part of the Ipopt tutorial. It is a correct versi... |
github | MiaoLi/GPIS-master | TutorialMatlab.m | .m | GPIS-master/ampl/Ipopt/Ipopt-3.11.8/build/Ipopt/tutorial/CodingExercise/Matlab/2-mistake/TutorialMatlab.m | 3,643 | utf_8 | 578035e52af32a4c1043bdda03276f3c | % Copyright (C) 2009 International Business Machines
% All Rights Reserved.
% This code is published under the Eclipse Public License.
%
% $Id: hs071_c.c 699 2006-04-05 21:05:18Z andreasw $
%
% Author: Andreas Waechter IBM 2009-04-02
%
% This file is part of the Ipopt tutorial. It is a version with
... |
github | MiaoLi/GPIS-master | TutorialMatlab.m | .m | GPIS-master/ampl/Ipopt/Ipopt-3.11.8/build/Ipopt/tutorial/CodingExercise/Matlab/1-skeleton/TutorialMatlab.m | 2,732 | utf_8 | f5e68321a1a25030feef4f51479a5f11 | % Copyright (C) 2009 International Business Machines
% All Rights Reserved.
% This code is published under the Eclipse Public License.
%
% $Id: hs071_c.c 699 2006-04-05 21:05:18Z andreasw $
%
% Author: Andreas Waechter IBM 2009-04-02
%
% This file is part of the Ipopt tutorial. It is the skeleton fo... |
github | MiaoLi/GPIS-master | examplehs038.m | .m | GPIS-master/ampl/Ipopt/Ipopt-3.11.8/build/Ipopt/contrib/MatlabInterface/examples/examplehs038.m | 2,544 | utf_8 | f3bb807d1f00d1e9805debf9f63341e3 | % Test the "ipopt" Matlab interface on the Hock & Schittkowski test problem
% #38. See: Willi Hock and Klaus Schittkowski. (1981) Test Examples for
% Nonlinear Programming Codes. Lecture Notes in Economics and Mathematical
% Systems Vol. 187, Springer-Verlag.
%
% Copyright (C) 2008 Peter Carbonetto. All Rights Reserved... |
github | MiaoLi/GPIS-master | examplehs051.m | .m | GPIS-master/ampl/Ipopt/Ipopt-3.11.8/build/Ipopt/contrib/MatlabInterface/examples/examplehs051.m | 2,029 | utf_8 | 8d5dd0450d9974af1ab8d426b6e561fc | % Test the "ipopt" Matlab interface on the Hock & Schittkowski test problem
% #51. See: Willi Hock and Klaus Schittkowski. (1981) Test Examples for
% Nonlinear Programming Codes. Lecture Notes in Economics and Mathematical
% Systems Vol. 187, Springer-Verlag.
%
% Copyright (C) 2008 Peter Carbonetto. All Rights Reserved... |
github | MiaoLi/GPIS-master | examplehs071.m | .m | GPIS-master/ampl/Ipopt/Ipopt-3.11.8/build/Ipopt/contrib/MatlabInterface/examples/examplehs071.m | 2,355 | utf_8 | 43b7820bab7b701f36f625fa5a0401e2 | % Test the "ipopt" Matlab interface on the Hock & Schittkowski test problem
% #71. See: Willi Hock and Klaus Schittkowski. (1981) Test Examples for
% Nonlinear Programming Codes. Lecture Notes in Economics and Mathematical
% Systems Vol. 187, Springer-Verlag.
%
% Copyright (C) 2008 Peter Carbonetto. All Rights Reserved... |
github | MiaoLi/GPIS-master | lasso.m | .m | GPIS-master/ampl/Ipopt/Ipopt-3.11.8/build/Ipopt/contrib/MatlabInterface/examples/lasso.m | 3,110 | utf_8 | c7d23cb1f2f1c621ca899be600f724a0 | % This function executes IPOPT to find the maximum likelihood solution to
% least squares regression with L1 regularization or the "Lasso". The inputs
% are the data matrix A (in which each row is an example vector), the vector
% of regression outputs y, and the penalty parameter lambda, a number
% greater than zero. T... |
github | MiaoLi/GPIS-master | KernelFun.m | .m | GPIS-master/matlab/KernelFun.m | 2,176 | utf_8 | b66fba5f63b9d2be577845da5a09ea7f | %%
%KernelMat = KernelFun(x,y,mu,lamda)
%x,y: each row is an observation point, 3 dimendion
%mu,lamda: kernel parameters.
function KernelMat = KernelFun(x,y,R,dev)
xdatasize=size(x,1);
ydatasize=size(y,1);
KernelCell =cell(xdatasize,ydatasize);
for i=1:xdatasize
for j=1:ydatasize
switch dev
... |
github | MiaoLi/GPIS-master | read_vertices_and_faces_from_obj_file.m | .m | GPIS-master/matlab/read_vertices_and_faces_from_obj_file.m | 1,853 | utf_8 | 6b9f24100f7820080075c6339da939ca |
function [V,F] = read_vertices_and_faces_from_obj_file(filename)
% Reads a .obj mesh file and outputs the vertex and face list
% assumes a 3D triangle mesh and ignores everything but:
% v x y z and f i j k lines
% Input:
% filename string of obj file's path
%
% Output:
% V number of vertic... |
github | ChrisYang/deep_hand_pose-master | classification_demo.m | .m | deep_hand_pose-master/matlab/demo/classification_demo.m | 5,412 | utf_8 | 8f46deabe6cde287c4759f3bc8b7f819 | function [scores, maxlabel] = classification_demo(im, use_gpu)
% [scores, maxlabel] = classification_demo(im, use_gpu)
%
% Image classification demo using BVLC CaffeNet.
%
% IMPORTANT: before you run this demo, you should download BVLC CaffeNet
% from Model Zoo (http://caffe.berkeleyvision.org/model_zoo.html)
%
% *****... |
github | derinsevenler/micro-manager-master | StartMMStudio.m | .m | micro-manager-master/bindist/any-Windows/StartMMStudio.m | 12,562 | utf_8 | 9e4e688807c6943e4b30764b6f3ed111 | function S = StartMMStudio(varargin)
% STARTMMSTUDIO Start MMStudio, setting up MATLAB's Java classpath as necessary
%
% STUDIO = STARTMMSTUDIO() Start MMStudio from the
% Micro-Manager installation where
% StartMMStudio.... |
github | ybdesire/training-master | ComputeMarginal.m | .m | training-master/coursera_probabilistic_graphical_models/week_1/Simple-BN-Knowledge-Engineering-Release/ComputeMarginal.m | 1,239 | utf_8 | 5047558e4a544b146468d3e46eba0c9c | %ComputeMarginal Computes the marginal over a set of given variables
% M = ComputeMarginal(V, F, E) computes the marginal over variables V
% in the distribution induced by the set of factors F, given evidence E
%
% M is a factor containing the marginal over variables V
% V is a vector containing the variab... |
github | ybdesire/training-master | AssignmentToIndex.m | .m | training-master/coursera_probabilistic_graphical_models/week_1/Simple-BN-Knowledge-Engineering-Release/AssignmentToIndex.m | 601 | utf_8 | 2c6715c575574bb93ebc1dd4a52002ac | % 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 Fact... |
github | ybdesire/training-master | ComputeJointDistribution.m | .m | training-master/coursera_probabilistic_graphical_models/week_1/Simple-BN-Knowledge-Engineering-Release/ComputeJointDistribution.m | 1,127 | utf_8 | 50d479986083329c87a6912102f20003 | %ComputeJointDistribution Computes the joint distribution defined by a set
% of given factors
%
% Joint = ComputeJointDistribution(F) computes the joint distribution
% defined by a set of given factors
%
% Joint is a factor that encapsulates the joint distribution given by F
% F is a vector of factors (s... |
github | ybdesire/training-master | submit.m | .m | training-master/coursera_machine_learning_andrewng/week_5/machine-learning-ex4/ex4/submit.m | 1,635 | utf_8 | ae9c236c78f9b5b09db8fbc2052990fc | function submit()
addpath('./lib');
conf.assignmentSlug = 'neural-network-learning';
conf.itemName = 'Neural Networks Learning';
conf.partArrays = { ...
{ ...
'1', ...
{ 'nnCostFunction.m' }, ...
'Feedforward and Cost Function', ...
}, ...
{ ...
'2', ...
{ 'nnCostFunct... |
github | ybdesire/training-master | submit.m | .m | training-master/coursera_machine_learning_andrewng/week_4/machine-learning-ex3/ex3/submit.m | 1,567 | utf_8 | 1dba733a05282b2db9f2284548483b81 | function submit()
addpath('./lib');
conf.assignmentSlug = 'multi-class-classification-and-neural-networks';
conf.itemName = 'Multi-class Classification and Neural Networks';
conf.partArrays = { ...
{ ...
'1', ...
{ 'lrCostFunction.m' }, ...
'Regularized Logistic Regression', ...
}, ..... |
github | ybdesire/training-master | submit.m | .m | training-master/coursera_machine_learning_andrewng/week_9/machine-learning-ex8/ex8/submit.m | 2,064 | utf_8 | 7c4fcf60df3a7e09d05a74f7772fed3b | function submit()
addpath('./lib');
conf.assignmentSlug = 'anomaly-detection-and-recommender-systems';
conf.itemName = 'Anomaly Detection and Recommender Systems';
conf.partArrays = { ...
{ ...
'1', ...
{ 'estimateGaussian.m' }, ...
'Estimate Gaussian Parameters', ...
}, ...
{ ...... |
github | ybdesire/training-master | submit.m | .m | training-master/coursera_machine_learning_andrewng/week_8/machine-learning-ex7/ex7/submit.m | 1,438 | utf_8 | 665ea5906aad3ccfd94e33a40c58e2ce | function submit()
addpath('./lib');
conf.assignmentSlug = 'k-means-clustering-and-pca';
conf.itemName = 'K-Means Clustering and PCA';
conf.partArrays = { ...
{ ...
'1', ...
{ 'findClosestCentroids.m' }, ...
'Find Closest Centroids (k-Means)', ...
}, ...
{ ...
'2', ...
... |
github | ybdesire/training-master | submit.m | .m | training-master/coursera_machine_learning_andrewng/week_2/machine-learning-ex1/ex1/submit.m | 1,876 | utf_8 | 8d1c467b830a89c187c05b121cb8fbfd | function submit()
addpath('./lib');
conf.assignmentSlug = 'linear-regression';
conf.itemName = 'Linear Regression with Multiple Variables';
conf.partArrays = { ...
{ ...
'1', ...
{ 'warmUpExercise.m' }, ...
'Warm-up Exercise', ...
}, ...
{ ...
'2', ...
{ 'computeCost.m... |
github | ybdesire/training-master | submit.m | .m | training-master/coursera_machine_learning_andrewng/week_3/machine-learning-ex2/ex2/submit.m | 1,605 | utf_8 | 9b63d386e9bd7bcca66b1a3d2fa37579 | function submit()
addpath('./lib');
conf.assignmentSlug = 'logistic-regression';
conf.itemName = 'Logistic Regression';
conf.partArrays = { ...
{ ...
'1', ...
{ 'sigmoid.m' }, ...
'Sigmoid Function', ...
}, ...
{ ...
'2', ...
{ 'costFunction.m' }, ...
'Logistic R... |
github | ybdesire/training-master | submit.m | .m | training-master/coursera_machine_learning_andrewng/week_6/machine-learning-ex5/ex5/submit.m | 1,765 | utf_8 | b1804fe5854d9744dca981d250eda251 | function submit()
addpath('./lib');
conf.assignmentSlug = 'regularized-linear-regression-and-bias-variance';
conf.itemName = 'Regularized Linear Regression and Bias/Variance';
conf.partArrays = { ...
{ ...
'1', ...
{ 'linearRegCostFunction.m' }, ...
'Regularized Linear Regression Cost Fun... |
github | ybdesire/training-master | submit.m | .m | training-master/coursera_machine_learning_andrewng/week_7/machine-learning-ex6/ex6/submit.m | 1,318 | utf_8 | bfa0b4ffb8a7854d8e84276e91818107 | function submit()
addpath('./lib');
conf.assignmentSlug = 'support-vector-machines';
conf.itemName = 'Support Vector Machines';
conf.partArrays = { ...
{ ...
'1', ...
{ 'gaussianKernel.m' }, ...
'Gaussian Kernel', ...
}, ...
{ ...
'2', ...
{ 'dataset3Params.m' }, ...
... |
github | ybdesire/training-master | porterStemmer.m | .m | training-master/coursera_machine_learning_andrewng/week_7/machine-learning-ex6/ex6/porterStemmer.m | 9,902 | utf_8 | 7ed5acd925808fde342fc72bd62ebc4d | function stem = porterStemmer(inString)
% Applies the Porter Stemming algorithm as presented in the following
% paper:
% Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14,
% no. 3, pp 130-137
% Original code modeled after the C version provided at:
% http://www.tartarus.org/~martin/PorterStemmer/c.tx... |
github | syxu828/QuestionAnsweringOverFB-master | make.m | .m | QuestionAnsweringOverFB-master/resources/tool/liblinear-2.1/matlab/make.m | 1,198 | utf_8 | 72532ef957c850421c786167742d0912 | % This make.m is for MATLAB and OCTAVE under Windows, Mac, and Unix
function make()
try
% This part is for OCTAVE
if(exist('OCTAVE_VERSION', 'builtin'))
mex libsvmread.c
mex libsvmwrite.c
mex -I.. train.c linear_model_matlab.c ../linear.cpp ../tron.cpp ../blas/daxpy.c ../blas/ddot.c ../blas/dnrm2.c ../blas/dsca... |
github | GT-Vision-Lab/abstract_binary_VQA-master | log_no_nan.m | .m | abstract_binary_VQA-master/attention_image_features_code/mutual_infomation/log_no_nan.m | 179 | utf_8 | 1cbb567a0d597e2c0569d63e2f661a50 |
%log but set nan values to 0
function y=log_no_nan(x)
y=log(x);
ind=isinf(y(:)) | ~isreal(y(:)) | isnan(y(:));
% ind = isinf(y(:));
y(ind)=0;
% y(ind) = log(eps^2); |
github | GT-Vision-Lab/abstract_binary_VQA-master | LoadRelationData.m | .m | abstract_binary_VQA-master/attention_image_features_code/feature_extraction/LoadRelationData.m | 934 | utf_8 | 401d5516ca10d7e066f154f8c5294857 | %<FUNCTIONNAME> <Function description.>
%
% [<outputs>] = <FunctionName>(<inputs>) is for <description>.
%
% INPUT
% -<input1>: <input1 description>
% -<input2>: <input2 description>
%
% OUTPUT
% -<output1>: <output2 description>
%
% Author: Stanislaw Antol (santol@vt.edu) Date: ... |
github | GT-Vision-Lab/abstract_binary_VQA-master | ExtractFeaturesForEachImage.m | .m | abstract_binary_VQA-master/attention_image_features_code/feature_extraction/ExtractFeaturesForEachImage.m | 8,436 | utf_8 | 0e3912accb1deb975d7ed77defa75684 | function feat = ExtractFeaturesForEachImage(scene,pri,sec, catlist, inslist, ...
insmat, humandata, GAbsPos, GRelPos)
avobj = scene.availableObject;
typemax = 10;
%get zfactor
sceneType = scene.sceneType;
zfact = ones(1,5);
if strcmp(sceneType(1:4),'Park')
zt = 0.9;
... |
github | GT-Vision-Lab/abstract_binary_VQA-master | ComputeGlobalPositionFeatures.m | .m | abstract_binary_VQA-master/attention_image_features_code/feature_extraction/ComputeGlobalPositionFeatures.m | 9,071 | utf_8 | 048f414dc269721f29ebe5ce59d56f23 | %<FUNCTIONNAME> <Function description.>
%
% [<outputs>] = <FunctionName>(<inputs>) is for <description>.
%
% INPUT
% -<input1>: <input1 description>
% -<input2>: <input2 description>
%
% OUTPUT
% -<output1>: <output2 description>
%
% Author: Stanislaw Antol (santol@vt.edu) Date: ... |
github | GT-Vision-Lab/abstract_binary_VQA-master | ComputeContactFeatures.m | .m | abstract_binary_VQA-master/attention_image_features_code/feature_extraction/ComputeContactFeatures.m | 7,065 | utf_8 | 2f6d56bf0940779009a5c305c1a1b913 | %<FUNCTIONNAME> <Function description.>
%
% [<outputs>] = <FunctionName>(<inputs>) is for <description>.
%
% INPUT
% -<input1>: <input1 description>
% -<input2>: <input2 description>
%
% OUTPUT
% -<output1>: <output2 description>
%
% Author: Stanislaw Antol (santol@vt.edu) Date: ... |
github | GT-Vision-Lab/abstract_binary_VQA-master | ComputeOrientationFeatures.m | .m | abstract_binary_VQA-master/attention_image_features_code/feature_extraction/ComputeOrientationFeatures.m | 4,627 | utf_8 | 1b2d6b76c7a7bb199a7ea846103227f9 | %<FUNCTIONNAME> <Function description.>
%
% [<outputs>] = <FunctionName>(<inputs>) is for <description>.
%
% INPUT
% -<input1>: <input1 description>
% -<input2>: <input2 description>
%
% OUTPUT
% -<output1>: <output2 description>
%
% Author: Stanislaw Antol (santol@vt.edu) Date: ... |
github | GT-Vision-Lab/abstract_binary_VQA-master | ComputeFeatures.m | .m | abstract_binary_VQA-master/attention_image_features_code/feature_extraction/ComputeFeatures.m | 5,429 | utf_8 | 76b64e050941038fdae5fd69cd582b96 | %<FUNCTIONNAME> <Function description.>
%
% [<outputs>] = <FunctionName>(<inputs>) is for <description>.
%
% INPUT
% -<input1>: <input1 description>
% -<input2>: <input2 description>
%
% OUTPUT
% -<output1>: <output2 description>
%
% Author: Stanislaw Antol (santol@vt.edu) Date: ... |
github | GT-Vision-Lab/abstract_binary_VQA-master | ExtractFeaturesForEachImage_im.m | .m | abstract_binary_VQA-master/attention_image_features_code/feature_extraction/ExtractFeaturesForEachImage_im.m | 8,224 | utf_8 | 2e5a87b5a7f31d048fdca6b2aa5dcd04 | function feat = ExtractFeaturesForEachImage_im(scene,pri,sec, catlist, inslist, ...
insmat, humandata, GAbsPos, GRelPos)
avobj = scene.availableObject;
typemax = 10;
%get zfactor
sceneType = scene.sceneType;
zfact = ones(1,5);
if strcmp(sceneType(1:4),'Park')
zt = 0.9;
else
... |
github | GT-Vision-Lab/abstract_binary_VQA-master | savejson.m | .m | abstract_binary_VQA-master/attention_image_features_code/feature_extraction/jsonlab/savejson.m | 17,487 | utf_8 | 96b2e7497e1ceeb65c7f7a9568e1d684 | 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 | GT-Vision-Lab/abstract_binary_VQA-master | loadjson.m | .m | abstract_binary_VQA-master/attention_image_features_code/feature_extraction/jsonlab/loadjson.m | 18,757 | ibm852 | b03cf3fe844b8688a78b9c0f91d527b0 | 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 | GT-Vision-Lab/abstract_binary_VQA-master | loadubjson.m | .m | abstract_binary_VQA-master/attention_image_features_code/feature_extraction/jsonlab/loadubjson.m | 15,599 | utf_8 | 14e8c91d41abedebe4a1589f197ecc7f | 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 | GT-Vision-Lab/abstract_binary_VQA-master | saveubjson.m | .m | abstract_binary_VQA-master/attention_image_features_code/feature_extraction/jsonlab/saveubjson.m | 16,148 | utf_8 | b95bbda963eeedd3a9f77266c084b02b | 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 | jacklxc/Virtual-Rat-master | mloads.m | .m | Virtual-Rat-master/matlab/mloads.m | 3,749 | utf_8 | 32ae5976aec50af54b358c92e8f64dd6 | function out = mloads(jstr, varargin)
% out = mdumps(obj, ['compress'])
% function that takes a matlab object (cell array, struct, vector) and converts it into json.
% It also creates a "sister" json object that describes the type and dimension of the "leaf" elements.
if isempty(jstr)
out = {};
... |
github | jacklxc/Virtual-Rat-master | sig4.m | .m | Virtual-Rat-master/matlab/sig4.m | 245 | utf_8 | 64f7dd48148c7d3eeb543b1ee4fdff57 | % Copied from https://gitlab.erlichlab.org/erlichlab/elutils.git/stats
% y=sig4(beta,x)
% y0=beta(1);
% a=beta(2);
% x0=beta(3);
% b=beta(4);
function y=sig4(beta,x)
y0=beta(1);
a=beta(2);
x0=beta(3);
b=beta(4);
y=y0+a./(1+ exp(-(x-x0)./b)); |
github | jacklxc/Virtual-Rat-master | nanstderr.m | .m | Virtual-Rat-master/matlab/nanstderr.m | 213 | utf_8 | b80b718dc8922b324290b59a41beb196 | % Copied from https://gitlab.erlichlab.org/erlichlab/elutils.git/stats
function y = nanstderr(x,dim)
if nargin==1
dim=1;
end
gd=sum(~isnan(x),dim);
y=nanstd(x,0,dim)./sqrt(gd-1);
y(y==Inf)=nan;
y(gd==0)=nan;
|
github | michaelheiniger/sdr-epfl-master | my_mapper.m | .m | sdr-epfl-master/midterms/midterm_2014/p3/my_mapper.m | 1,216 | utf_8 | 1b92de699cdb1b27d8e5603f447ac2be | % function [symbols, constellation] = my_mapper(bits, M).
% It maps a sequence of bits into a sequence of symbols taking values in a M -QAM constellation.
% It returns the symbol sequence and the constellation.
% Specifically, it shall carry out the following tasks:
%
% (i) Check if the input M is the square of an i... |
github | michaelheiniger/sdr-epfl-master | my_demapper.m | .m | sdr-epfl-master/midterms/midterm_2014/p3/my_demapper.m | 529 | utf_8 | 7cc5c210527e11332dbf08298f7d3957 | % function [estim_tx_bits] = my_demapper(r,constellation).
% It finds the maximum likelihood symbol sequence that corresponds to the received (noisy) sequence
% r and it outputs the corresponding bit sequence
function [estim_tx_bits] = my_demapper(r,constellation)
r = r(:);
repr = repmat(r, 1, length(constellation)... |
github | michaelheiniger/sdr-epfl-master | my_img2bit.m | .m | sdr-epfl-master/midterms/midterm_2014/p3/my_img2bit.m | 288 | utf_8 | 40952a734b28137cf0609bc367b11688 | % function [bits] = my_img2bit(img_name).
% It converts an image to a sequence of bits.
function [bits] = my_img2bit(img_name)
img = imread(img_name);
% bits per pixel
BPP = max(ceil(log2(double(1+max(max(img))))));
img2bits = transpose(de2bi(img, BPP));
bits = img2bits(:);
end |
github | michaelheiniger/sdr-epfl-master | satCode.m | .m | sdr-epfl-master/midterms/midterm_2015/p3/code/satCode.m | 1,160 | utf_8 | c62637f4d0ef5c0fae5fc95423b96f53 | % SATCODE Returns C/A code sequence
% C = SATCODE(S) returns the C/A code sequence of satellite S as a row
% vector, sampled at chip rate. The elements of C are in the set {-1, 1}.
% C = SATCODE(S, 'fs') returns the C/A code sequence at the sampling rate
% rather than at the chip rate.
% $Id: satCode.... |
github | michaelheiniger/sdr-epfl-master | gpsConfig.m | .m | sdr-epfl-master/midterms/midterm_2015/p3/code/gpsConfig.m | 4,520 | utf_8 | f4f08d8661b704eea02d494690ae4696 | % GPS_CONFIG Initialize GPS configuration parameters
% GPS_CONFIG() defines all GPS configuration options (constants, etc)
% and sets them in the structure 'gpsc'.
% GPS_CONFIG must be called only once, before 'gpsc' is accessed for the
% first time. Any function that subsequently uses 'gpsc' must decla... |
github | michaelheiniger/sdr-epfl-master | getData.m | .m | sdr-epfl-master/midterms/midterm_2015/p3/code/getData.m | 6,496 | utf_8 | f31a5473dff9338fb36d4d58572dcfd2 | % GET_DATA Access stored GPS samples
% X = GET_DATA(A,B) returns a vector containing GPS samples, starting at
% index A and ending at index B. The length of the returned vector is
% thus B - A + 1.
% $Id: getData.m 1383 2011-12-19 15:04:40Z tarniceriu $
function x = getData(a, b)
global gpsc; ... |
github | michaelheiniger/sdr-epfl-master | satCode.m | .m | sdr-epfl-master/midterms/midterm_2015/p1/code/satCode.m | 1,160 | utf_8 | c62637f4d0ef5c0fae5fc95423b96f53 | % SATCODE Returns C/A code sequence
% C = SATCODE(S) returns the C/A code sequence of satellite S as a row
% vector, sampled at chip rate. The elements of C are in the set {-1, 1}.
% C = SATCODE(S, 'fs') returns the C/A code sequence at the sampling rate
% rather than at the chip rate.
% $Id: satCode.... |
github | michaelheiniger/sdr-epfl-master | n_tuple_output.m | .m | sdr-epfl-master/midterms/midterm_2015/p1/code/n_tuple_output.m | 804 | utf_8 | 746692b4c74d2069d64d92a2f3a25d95 | % complete the following code.
% nb: you find the needed routines in the same directory.
function y = n_tuple_output(sat,n_bits,doppler,tau_bit)
gpsConfig();
global gpsc;
% use getData to load exactly n_bits worth of samples, starting at tau_bit
r = getData(tau_bit,tau_bit+n_bits*gpsc.spb-1);
% set up a time vari... |
github | michaelheiniger/sdr-epfl-master | gpsConfig.m | .m | sdr-epfl-master/midterms/midterm_2015/p1/code/gpsConfig.m | 4,520 | utf_8 | f4f08d8661b704eea02d494690ae4696 | % GPS_CONFIG Initialize GPS configuration parameters
% GPS_CONFIG() defines all GPS configuration options (constants, etc)
% and sets them in the structure 'gpsc'.
% GPS_CONFIG must be called only once, before 'gpsc' is accessed for the
% first time. Any function that subsequently uses 'gpsc' must decla... |
github | michaelheiniger/sdr-epfl-master | getData.m | .m | sdr-epfl-master/midterms/midterm_2015/p1/code/getData.m | 6,496 | utf_8 | f31a5473dff9338fb36d4d58572dcfd2 | % GET_DATA Access stored GPS samples
% X = GET_DATA(A,B) returns a vector containing GPS samples, starting at
% index A and ending at index B. The length of the returned vector is
% thus B - A + 1.
% $Id: getData.m 1383 2011-12-19 15:04:40Z tarniceriu $
function x = getData(a, b)
global gpsc; ... |
github | michaelheiniger/sdr-epfl-master | my_pskmap.m | .m | sdr-epfl-master/midterms/old/midterm_prep/lab2/code/my_pskmap.m | 384 | utf_8 | ef8b76b39d4e1b5817719731bbe415ba | % MY_PSKMAP Creates constellation for Phase Shift Keying modulation
% C = MY_PSKMAP(M) outputs a 1xM vector with the complex symbols
% of the PSK constellation of alphabet size M, where M is an integer power of 2.
function [ c ] = my_pskmap( m )
if mod(log2(m),1) ~= 0
error('M must be in the form M = 2^K, where K i... |
github | michaelheiniger/sdr-epfl-master | my_qammap.m | .m | sdr-epfl-master/midterms/old/midterm_prep/lab2/code/my_qammap.m | 602 | utf_8 | 24a6de8e80a7daf7c7d9294ec9384303 | % MY_QAMMAP Creates constellation for square QAM modulations
% C = MY_QAMMAP(M) outputs a 1 x M vector with the
% constellation for the quadrature amplitude modulation of
% alphabet size M, where M is the square of an integer power
% of 2 (e.g. 4, 16, 64, ...).
% The signal constellation is a square constellation.
func... |
github | michaelheiniger/sdr-epfl-master | my_modulator.m | .m | sdr-epfl-master/midterms/old/midterm_prep/lab2/code/my_modulator.m | 746 | utf_8 | 687d5928683eb85d067f4ea010cd198a |
% MY_MODULATOR Maps a vector of M-ary integers to constellation points
% Y = MY_MODULATOR(X, MAP) outputs a vector of (possibly complex)
% symbols from the constellation specified as second parameter,
% corresponding to the integer valued symbols of X.
% Input X can be a row or column vector, and output Y has the same... |
github | michaelheiniger/sdr-epfl-master | my_demodulator.m | .m | sdr-epfl-master/midterms/old/midterm_prep/lab2/code/my_demodulator.m | 1,122 | utf_8 | 8a00593332d444c83a4d35f0ee15ef35 | % MY_DEMODULATOR Minimum distance slicer
% Z = MY_DEMODULATOR(Y, MAP) demodulates vector Y
% by finding the element of the specified constellation that is
% closest to each element of input Y. Y contains the outputs of
% the matched filter of the receiver, and it can be a row or
% column vector. MAP specifies the const... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.