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 | spm/spm99-master | spm_spm_ui.m | .m | spm99-master/spm_spm_ui.m | 81,891 | utf_8 | c503b830b054332ff85d6b937dd7824c | function varargout=spm_spm_ui(varargin)
% Setting up the general linear model for independent data
% FORMATs (given in Programmers Help)
%_______________________________________________________________________
%
% spm_spm_ui.m configures the design matrix (describing the general
% linear model), data specification, and... |
github | spm/spm99-master | spm_get_bf.m | .m | spm99-master/spm_get_bf.m | 9,229 | utf_8 | 285262f7bb588c9259c88705e53ec70b | function [BF,BFstr] = spm_get_bf(name,T,dt,Fstr,n_s,n_c)
% creates basis functions for each trial type {i} in struct BF{i}
% FORMAT [BF BFstr] = spm_get_bf(name,T,dt,Fstr,n_s [,n_c])
%
% name - name{1 x n} name of trials or conditions
% T - time bins per scan
% dt - time bin length {seconds}
% Fstr - Prompt st... |
github | spm/spm99-master | spm_vol_ecat7.m | .m | spm99-master/spm_vol_ecat7.m | 16,437 | utf_8 | c4c037ac464b1a0137bb406d5de6e901 | function V = spm_vol_ecat7(fname,required)
% Get header information etc. for ECAT 7 images.
% FORMAT V = spm_vol_ecat7(fname,required)
% P - an ECAT 7 filename.
% fname - a structure containing image volume information.
% required - an optional text argument specifying which volumes to
% u... |
github | spm/spm99-master | spm_affsub3.m | .m | spm99-master/spm_affsub3.m | 20,964 | utf_8 | 70bd83e871be13c89507257727f20700 | function params = spm_affsub3(mode, VG, VF, Hold, samp, params,VW,VW2)
% Highest level subroutine involved in affine transformations.
% FORMAT params = spm_affsub3(mode, VG, VF, Hold, samp, params,VW,VW2)
%
% mode - Mode of action.
% VG - Handles of template images (see spm_vol).
% VF - Handles of ob... |
github | braanan/lrauv.sim-master | SIMLRAUV.m | .m | lrauv.sim-master/SIMLRAUV.m | 2,629 | utf_8 | cf22144ed62e67b76e64b2a90ce3ab82 |
function [simlog, f] = SIMLRAUV(time_step, x, xstruct, controls, startPoint,timeEval, Xmass)
% STATE AND INPUT VECTORS:
% x = [u v w p q r xpos ypos zpos phi theta psi]'
% ui = [ delta_s delta_r Xprop Kprop ]'
% h = waitbar(0,'Initializing LRAUV Vehicle Simulator...');
global xg
n_steps = fix(timeEval/time_st... |
github | braanan/lrauv.sim-master | lrauv.m | .m | lrauv.sim-master/lrauv.m | 7,086 | utf_8 | e394c2aa867248951e85fe4aca625818 | % lrauv.m Vehicle Simulator Testground
% Returns the time derivative of the state vector
% Last modified July 17, 2014
function [ACCELERATIONS,FORCES] = lrauv(x,ui)
% TERMS
% ---------------------------------------------------------------------
% STATE VECTOR:
% x = [u v w p q r xpos ypos zpos phi theta psi]'
% Bo... |
github | amiltonwong/EnrichObjectDetection2-master | compute_recall_precision_accuracy_mod.m | .m | EnrichObjectDetection2-master/compute_recall_precision_accuracy_mod.m | 5,651 | utf_8 | d6df16447574b5989ee3c3e76e70a2b1 | % compute recall and viewpoint accuracy
function [recall, precision, accuracy, ap, aa] = compute_recall_precision_accuracy_mod(cls, file_name, vnum, VOCopts, param, azimuth_interval)
if nargin < 6
azimuth_interval = [0 (360/(vnum*2)):(360/vnum):360-(360/(vnum*2))];
end
% viewpoint annotation path
path_ann_view = ... |
github | amiltonwong/EnrichObjectDetection2-master | compute_recall_precision_accuracy.m | .m | EnrichObjectDetection2-master/compute_recall_precision_accuracy.m | 6,641 | utf_8 | cd743c90f939688fe2f640b5dd9c1fc1 | % compute recall and viewpoint accuracy
function [recall, precision, accuracy, ap, aa] = compute_recall_precision_accuracy(detection_result_txt, vnum, VOCopts, param, azimuth_interval)
if nargin < 5
azimuth_interval = [0 (360/(vnum*2)):(360/vnum):360-(360/(vnum*2))];
end
detection_params = dwot_detection_params_f... |
github | amiltonwong/EnrichObjectDetection2-master | test.m | .m | EnrichObjectDetection2-master/test.m | 1,697 | utf_8 | e69b3959ea616bafd614c46c7a4b8032 | % run detector on test images
function out = test(VOCopts,cls,detector)
% load test set ('val' for development kit)
[ids,gt]=textread(sprintf(VOCopts.imgsetpath,VOCopts.testset),'%s %d');
% create results file
fid=fopen(sprintf(VOCopts.detrespath,'comp3',cls),'w');
% apply detector to each image
tic;
for i=1:length(... |
github | amiltonwong/EnrichObjectDetection2-master | compute_recall_precision_accuracy_orig.m | .m | EnrichObjectDetection2-master/compute_recall_precision_accuracy_orig.m | 5,448 | utf_8 | 24f567e480268a1b5f3a1a3424b22dbc | % compute recall and viewpoint accuracy
function [recall, precision, accuracy, ap, aa] = compute_recall_precision_accuracy_orig(cls, file_name, vnum, VOCopts, param, azimuth_interval)
if nargin < 6
azimuth_interval = [0 (360/(vnum*2)):(360/vnum):360-(360/(vnum*2))];
end
% viewpoint annotation path
path_ann_view =... |
github | amiltonwong/EnrichObjectDetection2-master | esvm_initialize_goalsize_exemplar.m | .m | EnrichObjectDetection2-master/HoG/esvm_initialize_goalsize_exemplar.m | 5,322 | utf_8 | 68fa0b01149d313360e7ec9b0ab0c1ec | function model = esvm_initialize_goalsize_exemplar(I, bbox, init_params)
%% Initialize the exemplar (or scene) such that the representation
% which tries to choose a region which overlaps best with the given
% bbox and contains roughly init_params.goal_ncells cells, with a
% maximum dimension of init_params.MAXDIM
%
% ... |
github | amiltonwong/EnrichObjectDetection2-master | esvm_initialize_goalsize_exemplar_ncell.m | .m | EnrichObjectDetection2-master/HoG/esvm_initialize_goalsize_exemplar_ncell.m | 3,961 | utf_8 | f7534c30d8bb079f4e88df28a123d7eb | function curfeats = esvm_initialize_goalsize_exemplar_ncell(I, bbox, ncell)
%% Initialize the exemplar (or scene) such that the representation
% which tries to choose a region which overlaps best with the given
% bbox and contains roughly init_params.goal_ncells cells, with a
% maximum dimension of init_params.MAXDIM
%... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_detect_using_instant_detector.m | .m | EnrichObjectDetection2-master/Util/dwot_detect_using_instant_detector.m | 3,338 | utf_8 | 192001d354dcedf41bd7b2253bfa6adc | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% return maximum score that got from the
% instant detector
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [max_score, template, template_size, paddedIm, paddedDepth, image_bbox] = ...
dwot_detect_using_instant_detector(renderer, hog_pyramid, az, ... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_evaluate_prediction_bin_view.m | .m | EnrichObjectDetection2-master/Util/dwot_evaluate_prediction_bin_view.m | 6,719 | utf_8 | c19cf6cc18b1c7228c9e427f46b147c0 | function [true_positive, false_positive, prediction_iou, corresponding_ground_truth_idx] =...
dwot_evaluate_prediction_bin_view(...
prediction_bounding_box, ground_truth_bounding_box, min_iou,...
excluding_ground_truth,... % logical
prediction_azimuth, ground_truth_azimuth, ... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_get_color_range.m | .m | EnrichObjectDetection2-master/Util/dwot_get_color_range.m | 497 | utf_8 | faf0e590661d0266425856350d1148ec | function color_range = dwot_get_color_range(detectors)
demo_images
default_images = {'concordorthophoto.png'
function varargout=demo_images
pth = fileparts(which('cameraman.tif'));
D = dir(pth);
C = {'.tif';'.jp';'.png';'.bmp'};
idx = false(size(D));
for ii = 1:length(C)
idx = idx |... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_mcmc_proposal_region.m | .m | EnrichObjectDetection2-master/Util/dwot_mcmc_proposal_region.m | 4,379 | utf_8 | 309aeb892d86492cc3277e5854c9f4e5 | function [best_proposals]= dwot_mcmc_proposal_region(renderer, hog_region_pyramid, im_region, detectors, param, im, visualize)
if nargin <7
visualize = false;
end
n_proposal_region = numel(hog_region_pyramid);
n_batch = 1;
org_cell_limit = param.n_cell_limit;
% param.n_cell_limit = 200;
b_fixed_model = true;
b... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_extract_region.m | .m | EnrichObjectDetection2-master/Util/dwot_extract_region.m | 5,407 | utf_8 | cd3198a2eefdf46e193fb5daeae2ae77 | % Deprecated
% use dwot_extract_hog
function [hog_region_pyramid, im_region]= dwot_extract_region(im, hog, scales, bbs_nms, param)
% Clip bounding box to fit image.
% Create HOG pyramid for each of the proposal regions.
% hog_region :
% im_region :
% Padded Region
% -------------------
% | offset x, y
% |
% | ... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_rename_file.m | .m | EnrichObjectDetection2-master/Util/dwot_rename_file.m | 1,743 | utf_8 | 9eb16eba570528aa97d6c97c85450709 | function [ file_names, file_paths ]= dwot_rename_file(PATH, pattern, replace , extension )
% Directory path can be arbitrary deep for each sub classes.
% Get all possible sub-classes
[ file_names, file_paths ] = recursive_strrep(PATH, {}, {}, pattern, replace, extension);
% detector_model_name = ['each_... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_extract_region_conv.m | .m | EnrichObjectDetection2-master/Util/dwot_extract_region_conv.m | 5,017 | utf_8 | 3071d5422edf17a0e16a45420618913e | % Deprecated
% use dwot_extract_hog
function [hog_region_pyramid, im_region]= dwot_extract_region_conv(im, hog, scales, bbsNMS, param, visualize)
% Clip bounding box to fit image.
% Create HOG pyramid for each of the proposal regions.
% hog_region :
% im_region :
% Padded Region
% -------------------
% | offset x... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_get_cad_models_substr.m | .m | EnrichObjectDetection2-master/Util/dwot_get_cad_models_substr.m | 1,950 | utf_8 | 99628236ef5e6c903f331d9d3a8af841 | function [ model_names, file_paths ]= dwot_get_cad_models_substr(CAD_ROOT_DIR, CLASS, SUB_CLASSES, CAD_FORMATS)
% Directory path can be arbitrary deep for each sub classes.
% Get all possible sub-classes
subclass_defined = false;
if nargin > 2
subclass_defined = true;
end
SEARCH_PATH =... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_binary_search_priority_queue.m | .m | EnrichObjectDetection2-master/Util/dwot_binary_search_priority_queue.m | 11,744 | utf_8 | 39e87041bc53626864e64bdc4bc2f77b | function [best_proposals, detectors, detector_table]= dwot_binary_search_priority_queue(hog_region_pyramid, im_region, detectors, detector_table, renderer, param, im, visualize)
if nargin < 8
visualize = false;
end
n_proposal_region = numel(hog_region_pyramid);
% org_cell_limit = param.n_cell_limit;
% param.n_ce... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_save_load_delegate.m | .m | EnrichObjectDetection2-master/Util/dwot_save_load_delegate.m | 8,709 | utf_8 | 9c6b00254f73f9af421a50c0ccd0b3e0 | function [sprint_template, structure_data] = dwot_save_load_delegate(fid, save_format, image_name, structure_data)
% delegate file for saving and loading detection results. See dwot_save_detection and dwot_load_detection for more detail
% the save data structure must use thefollowing fields
% prediction_scores, pr... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_binary_search_proposal_region.m | .m | EnrichObjectDetection2-master/Util/dwot_binary_search_proposal_region.m | 8,221 | utf_8 | 3abb3a690c2b0ef5789f2cb67f6a1410 | function [best_proposals, detectors, detector_table]= dwot_binary_search_proposal_region(hog_region_pyramid, im_region, detectors, detector_table, renderer, param, im, visualize)
if nargin < 8
visualize = false;
end
n_proposal_region = numel(hog_region_pyramid);
n_batch = 1;
org_cell_limit = param.n_cell_limit;
... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_save_detection.m | .m | EnrichObjectDetection2-master/Util/dwot_save_detection.m | 1,683 | utf_8 | 5ef92f10f71f8df495c213eb924c200e | function [new_file_name, curr_temp_idx]= dwot_save_detection(save_path, file_name, b_new_file, save_format, structure_data, image_name)
if ~exist('b_new_file','var')
b_new_file = false;
end
if ~b_new_file && ~exist('save_format','var')
error('save format undefined');
end
% If we have to create new file, make... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_bfgs_proposal_region.m | .m | EnrichObjectDetection2-master/Util/dwot_bfgs_proposal_region.m | 6,297 | utf_8 | 5912e6d10b598be296ed75886dc70c5f | function [best_proposals]= dwot_bfgs_proposal_region(renderer, hog_region_pyramid, im_region, detectors, param, im, visualize)
if nargin <7
visualize = false;
end
if isfield(param,'bfgs_options')
options = param.options;
else
% options = optimoptions(@fminunc,'Algorithm','quasi-newton','MaxIter',5,'FinDi... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_extract_kmz.m | .m | EnrichObjectDetection2-master/Util/dwot_extract_kmz.m | 1,548 | utf_8 | 80cb830b401c5499d2a55463b11a220e | function [ model_names, file_paths ]= dwot_extract_kmz(CAD_ROOT_DIR, CAD_FORMATS)
% Directory path can be arbitrary deep for each sub classes.
% Get all possible sub-classes
[ model_names, file_paths ] = recurse_extract_models(CAD_ROOT_DIR, {}, {}, CAD_FORMATS);
% detector_model_name = ['each_' strjoin(... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_extract_hog.m | .m | EnrichObjectDetection2-master/Util/dwot_extract_hog.m | 9,053 | utf_8 | a62b8484e69226bed25ca4abdb338c49 | function [hog_region_pyramid, im_region] = dwot_extract_hog(hog, scales, detectors, bbs_nms, param, im, visualize)
% Clip bounding box to fit image.
% Create HOG pyramid for each of the proposal regions.
% hog_region :
% im_region :
% Padded Region
% -------------------
% | offset x, y
% |
% | ----- Actual i... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_extract_hog_region_from_image.m | .m | EnrichObjectDetection2-master/Util/dwot_extract_hog_region_from_image.m | 8,348 | utf_8 | 3fe9d7fb49da469d06f98bbd693d2ae6 | function [hog_region_pyramid, im_region] = dwot_extract_hog_region_from_image( bbs_nms, im, param, visualize)
% Clip bounding box to fit image.
% Create HOG pyramid for each of the proposal regions.
% hog_region :
% im_region :
% Padded Region
% -------------------
% | offset x, y
% |
% | ----- Actual image a... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_breadth_first_search_proposal_region.m | .m | EnrichObjectDetection2-master/Util/dwot_breadth_first_search_proposal_region.m | 7,661 | utf_8 | d6eeee7d87d0b37b20eb1f4e93c2fa42 | function [best_proposals]= dwot_breadth_first_search_proposal_region(hog_region_pyramid, im_region, detectors, detectors_kdtree, renderer, param, im, visualize)
% Search proposal regions with bread-first-search. Each proposal region will
% be examined using a collection of detectors and we track down the peak
if nargi... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_detector_kdtree_query.m | .m | EnrichObjectDetection2-master/Util/dwot_detector_kdtree_query.m | 1,925 | utf_8 | 414f57b4125c30fd3adcff9fd0a5d65f | function [detector_indexes] = dwot_detector_kdtree_query(detectors_kdtree, az_range, el_range, yaw_range, fov_range, model_indexes, model_class, param)
% Given query ranges, divide the ranges so that it is circular.
az_valid_ranges = make_range_valid_degree(az_range);
el_valid_ranges = make_range_valid_degree(el_range... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_gather_confusion_statistics.m | .m | EnrichObjectDetection2-master/Util/dwot_gather_confusion_statistics.m | 1,678 | utf_8 | 175f7d4ad4a764e46c417bd78448a4d5 | function [confusion_statistics] = dwot_gather_confusion_statistics(confusion_statistics, ground_truth_azimuth,...
prediction_azimuth, gt_idx_of_prediction, n_azimuth_view, prediction_direction, prediction_offset)
if nargin < 6
prediction_direction = 1;
prediction_offset = 0;
end
% Assume t... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_get_cad_models.m | .m | EnrichObjectDetection2-master/Util/dwot_get_cad_models.m | 1,625 | utf_8 | beb66b880736672337374281c6e3a8da | function [ model_names, file_paths ]= dwot_get_cad_models(CAD_ROOT_DIR, CLASS, SUB_CLASSES, CAD_FORMATS)
% Directory path can be arbitrary deep for each sub classes.
% Get all possible sub-classes
subclass_defined = false;
if nargin > 2
subclass_defined = true;
end
SEARCH_PATH = fullfi... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_detection_params_from_name.m | .m | EnrichObjectDetection2-master/Util/dwot_detection_params_from_name.m | 1,765 | utf_8 | 6c1088a0d5345d414f5f9644162f8ba1 | function detection_params = dwot_detection_params_from_name(name)
% First find dataset name and class
detection_params = regexp(name,...
['\/?(?<DATA_SET>[a-zA-Z0-9]+)_((half)?pad_detection_)?'...
'(?<LOWER_CASE_CLASS>[a-zA-Z]+)_(?<TYPE>[a-zA-Z]+)_(?<detector_model_name>[\w_-]+)_lim'],'names');
detection_params_t... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_extract_region_fft.m | .m | EnrichObjectDetection2-master/Util/dwot_extract_region_fft.m | 5,601 | utf_8 | 2758c89c266d046f54d3e16b845b73a1 | % Deprecated
% use dwot_extract_hog
function [hog_region_pyramid, im_region] = dwot_extract_region_fft(im, hog, scales, bbsNMS, param, visualize)
% Clip bounding box to fit image.
% Create HOG pyramid for each of the proposal regions.
% hog_region :
% im_region :
% Padded Region
% -------------------
% | offset ... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_visualize_models.m | .m | EnrichObjectDetection2-master/Visualization/dwot_visualize_models.m | 1,233 | utf_8 | d03d79e890ca3d2f8a1d29ae34b378b2 | % visualize and save model images
function dwot_visualize_models(renderer, model_paths, azimuth, elevation, yaw, fov, save_path)
n_models = numel(model_paths);
% Render the images and find optimal template size
im_model = cell(1,n_models);
for model_index = 1:n_models
% Assume that the model_indexes are base 1
... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_visualize_proposal_tuning.m | .m | EnrichObjectDetection2-master/Visualization/dwot_visualize_proposal_tuning.m | 3,243 | utf_8 | bd4f8ad589a9bf92237d24440bc87127 | function dwot_visualize_proposal_tuning(im,...
before_tuning_box, before_tuning_score, before_tuning_rendering, before_tuning_depth,...
after_tuning_box, after_tuning_score, after_tuning_rendering, after_tuning_depth,...
ground_truth_bounding_boxes, param)
% Given before and after parameters, visualize a tu... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_visualize_formatted_bounding_box.m | .m | EnrichObjectDetection2-master/Visualization/dwot_visualize_formatted_bounding_box.m | 2,750 | utf_8 | d7631e61295b571ce10745ef4ebf96ba | function [result_im, clipped_bounding_box, text_template, text_tuples] = dwot_visualize_formatted_bounding_box(im, detectors, formatted_bounding_box, color_range, text_mode, rendering_image_weight, color_map, draw_padding)
% DWOT_VISUALIZE_FORMATTED_BOUNDING_BOX visualize overlaid renderings.
% the formatted bounding... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_analyze_and_visualize_cnn_results.m | .m | EnrichObjectDetection2-master/Visualization/dwot_analyze_and_visualize_cnn_results.m | 31,091 | utf_8 | 846486a524b3be9e66f8fcd6431c1063 | function [ ap ] = dwot_analyze_and_visualize_cnn_results( detection_result_txt, ...
detectors, VOCopts, param, nms_threshold, visualize, save_path,...
n_views, prediction_azimuth_rotation_direction, prediction_azimuth_offset,...
clip_prediction_bou... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_analyze_and_visualize_pascal_results.m | .m | EnrichObjectDetection2-master/Visualization/dwot_analyze_and_visualize_pascal_results.m | 13,211 | utf_8 | f1701f47b216ba60814a58a9c4b465c8 | function [ ap ] = dwot_analyze_and_visualize_pascal_results( detection_result_txt, ...
detectors, save_path, VOCopts, param, skip_criteria, color_range, nms_threshold, visualize)
% It only evaluate the images that is in the prediction file. The user must
% ensure that all the test/validation images is in the predic... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_analyze_and_visualize_vocdpm_results.m | .m | EnrichObjectDetection2-master/Visualization/dwot_analyze_and_visualize_vocdpm_results.m | 32,823 | utf_8 | 21116675c5510171c91373dbf0ee1d68 | function [ ap ] = dwot_analyze_and_visualize_vocdpm_results( detection_result_txt, ...
detectors, VOCopts, param, nms_threshold, evaluation_mode, visualize, save_path,...
n_views, prediction_azimuth_rotation_direction, prediction_azimuth_offset,...
... |
github | amiltonwong/EnrichObjectDetection2-master | dwot_analyze_and_visualize_3D_object_results.m | .m | EnrichObjectDetection2-master/Visualization/dwot_analyze_and_visualize_3D_object_results.m | 18,408 | utf_8 | 686f66f04517b4ed4a0b1018a1ac683d | function [ ap, avp, mppe ] = dwot_analyze_and_visualize_3D_object_results( detection_result_txt, ...
detectors, save_path, param, DATA_PATH, CLASS, color_range, nms_threshold, visualize, prediction_azimuth_rotation_direction, prediction_azimuth_offset)
% It only evaluate the images that is i... |
github | amiltonwong/EnrichObjectDetection2-master | subplot.m | .m | EnrichObjectDetection2-master/3rdParty/SpacePlot/subplot.m | 24,696 | utf_8 | 903c0305664faa81ad1e67ab19ed5669 | function theAxis = subplot(nrows, ncols, thisPlot, varargin)
%SUBPLOT Create axes in tiled positions.
% H = SUBPLOT(m,n,p), or SUBPLOT(mnp), breaks the Figure window
% into an m-by-n matrix of small axes, selects the p-th axes for
% the current plot, and returns the axis handle. The axes are
% counted alo... |
github | amiltonwong/EnrichObjectDetection2-master | minmaxk.m | .m | EnrichObjectDetection2-master/3rdParty/MinMaxSelection/minmaxk.m | 4,647 | utf_8 | 91171dd699999a1a71233a8565ed9564 | function [res loc] = minmaxk(mexfun, list, k, dim, varargin)
% function [res loc] = minmaxk(mexfun, list, k, dim)
%
% Return in RES the K smallest/largest elements of LIST
% RES is sorted in ascending/descending order
% [res loc] = minmaxk(...)
% Location of the smallest/largest: RES=LIST(LOC)
% [res loc] =... |
github | clausqr/qrsim2-master | Gravity_Forces.m | .m | qrsim2-master/Gravity_Forces.m | 429 | utf_8 | 638b3ad012a0d2b4538e6e1d9fca6b5d | % Outputs gravity force expressed in Body fixed frame
% g acceleration due to gravity (kg.m/s^2)
function [Gravity_Force] = Gravity_Forces(Atmosphere, Quadrotor, xi);
g = Atmosphere.g;
phi = xi(7,1);
theta = xi(8,1);
psi = xi(9,1);
mass = Quadrotor.Mass_prop.Mass;
Gravity_Force = mass*g*[-sin(theta) sin(phi)*c... |
github | clausqr/qrsim2-master | slQuadrotorNavigation.m | .m | qrsim2-master/slQuadrotorNavigation.m | 16,047 | utf_8 | 3c58777ac589f40def716e40ee9b103a | function slQuadrotorNavigation(block)
%% sl_RigidBodyDynamics
% MSFUNTMPL A Template for a MATLAB S-Function
% The MATLAB S-function is written as a MATLAB function with the
% same name as the S-function. Replace 'msfuntmpl' with the name
% of your S-function.
%
% It should be noted that the MATLAB S-function... |
github | clausqr/qrsim2-master | slQuadrotorPlanta.m | .m | qrsim2-master/slQuadrotorPlanta.m | 16,730 | utf_8 | bbb76bf687aaa20ba1e94626d15fe747 | function slQUadrotorPlanta(block)
%% sl_RigidBodyDynamics
% MSFUNTMPL A Template for a MATLAB S-Function
% The MATLAB S-function is written as a MATLAB function with the
% same name as the S-function. Replace 'msfuntmpl' with the name
% of your S-function.
%
% It should be noted that the MATLAB S-function is ... |
github | clausqr/qrsim2-master | RigidBodyDynamics.m | .m | qrsim2-master/RigidBodyDynamics.m | 5,182 | utf_8 | 2ef56c49f2748d850692fec5a543b920 | %% RigidBodyDynamics - Differential equations of 3D motion of a rigid body
% Author: Roberto A. Bunge, Ph.D. Candidate
% Department of Aeronautics and Astronautics
% Stanford University
% email address: rbunge@stanford.edu
% June 2011; Last revision: 18-Sep-2011
% Given the mass properties and the net force... |
github | zutshi/S3CAMX-master | satellite_MEE.m | .m | S3CAMX-master/examples/satellite_MEE/satellite_MEE.m | 6,653 | utf_8 | 80d14447a3ed3bfc3047cc00b5d2b60f | function [t_arr,x_arr,D,P, prop_violated_flag] = satellite_MEE(t,T,XX,D,P,~,~,~)
format long
options = odeset('RelTol',1e-6,'AbsTol',1e-12);
prop_violated_flag = 0;
global mu J2 Re omega Cd
mu=398603.2;% earth gravitational constant (km**3/sec**2)
J2=0.00108263;
Re=6378.165;% earth equatorial radius (kilometers)... |
github | zutshi/S3CAMX-master | AbstractFuelControl.m | .m | S3CAMX-master/examples/abstractFuelControl/AbstractFuelControl.m | 7,036 | utf_8 | 7e29eb0a21b98938d3b562158b444b05 | function [tt,YY,D,P,prop_violated_flag] = AbstractFuelControl(t,T,XX,D,P,U,I,property_check)
display(XX)
fprintf('%f, %f\n', t, T);
%figure(1)
%hold on
%figure(2)
%hold on
%figure(3)
%hold on
% TODO: call only once!
init()
set_states(XX);
%warning('forcing control inputs!')
%U = [0.441 0 14.7];
% set control inputs
... |
github | zutshi/S3CAMX-master | AbstractFuelControl_BB.m | .m | S3CAMX-master/examples/abstractFuelControl/AbstractFuelControl_BB.m | 13,689 | utf_8 | f3dbdef260438cc28a9a1e25a0a6452e | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% AbstractFuelController with FR but as a BlackBox
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [tt,YY,D,P,prop_violated_flag] = AbstractFuelControl_BB(t,T,XX,D,P,U,I,property_chec... |
github | zutshi/S3CAMX-master | sample_plant.m | .m | S3CAMX-master/examples/sample_system/sample_plant.m | 257 | utf_8 | 353dd8e5596ea7a00e32a0d741f7f9f8 | function [tt,YY,D,P,prop_violated_flag] = sample_plant(t,T,XX,D,P,U,I,property_check)
[tt,YY] = ode45(@dyn, [t,T], XX);
prop_violated_flag = 0;
if YY(1) >= 10.0 && YY(1) <= 11.0
prop_violated_flag = 1;
end
end
function y = dyn(t, x)
y(1) = 1;
end
|
github | zutshi/S3CAMX-master | artificial_pancreas.m | .m | S3CAMX-master/examples/artificial_pancreas/artificial_pancreas.m | 9,165 | utf_8 | 1f3d62fad9c56d5f8d0b4445602fe3dc | function [tt,YY,D,P,prop_violated_flag] = artificial_pancreas(t_start,T_end,XX,D,P,~,I,~)
inps = [
29.4881
249.3545
295.7785
1.2403
-5.1326
0.0077
14.7322
0.003
0.9654
53.0687
155.6477
];
prop_violated_flag = 0;
totTime = D(1);
% t_start
% T_end
% Time Elapsed; cumulated
timeElapsed = D(2);
% Update time elaps... |
github | zutshi/S3CAMX-master | artificial_pancreas.m | .m | S3CAMX-master/examples/artificial_pancreas_cython/artificial_pancreas.m | 10,162 | utf_8 | a8113eb2c4111aff29971639d60e402e | %[t_arr,X_arr,D_arr,P_arr,prop_violated_flag] = sim_function(t0,t0+T,X0,D0,P0,U0,I0,property_check);
function [tt,YY,D_,P_,prop_violated_flag] = artificial_pancreas(t_start,T_end,XX,D,P,U,I,property_check)
inps = [
29.4881
249.3545
295.7785
1.2403
-5.1326
0.0077
14.7322
0.003
0.965... |
github | zutshi/S3CAMX-master | simulate_plant.m | .m | S3CAMX-master/matlab/simulate_plant.m | 3,742 | utf_8 | 206544e65188d300af9cbac9acd7db4f | %TAG:CLSS
%function [ret_t, ret_X, ret_D, ret_P, pvf] = simulate_system(sim_function, t, T, initial_continuous_states, initial_discrete_states, initial_pvt_states, control_inputs, inputs, property_check)
function ret_cell = simulate_plant(obj, t, T, initial_continuous_states, initial_discrete_states, initial_pvt_states... |
github | zutshi/S3CAMX-master | simulate_plant_fun.m | .m | S3CAMX-master/matlab/simulate_plant_fun.m | 3,725 | utf_8 | e03340780411d0b9d44ac2d9178b427d | %function [ret_t, ret_X, ret_D, ret_P, pvf] = simulate_system(sim_function, t, T, initial_continuous_states, initial_discrete_states, initial_pvt_states, control_inputs, inputs, property_check)
function ret_cell = simulate_plant_fun(sim_function, t, T, initial_continuous_states, initial_discrete_states, initial_pvt_sta... |
github | zutshi/S3CAMX-master | run_staliro.m | .m | S3CAMX-master/matlab/run_staliro.m | 8,221 | utf_8 | b89101c4bc166d879c36046497aa3997 | function run_staliro(num_runs)
% filename = 'heat.tst';
% path = '/examples/heat';
% filename = 'dci.tst';
% path = '/home/zutshi/work/RA/cpsVerification/HyCU/symbSplicing/splicing/examples/dc_motor_float';
% filename = 'fuzzy_invp.tst';
% path = '/home/zutshi/work/RA/cpsVerification/HyCU/symbSplicing/splicing/exampl... |
github | zutshi/S3CAMX-master | simulate_m_file.m | .m | S3CAMX-master/matlab/simulate_m_file.m | 10,450 | utf_8 | 55cd5d2df34c71418cd926fe887ecb6c | function funH = simulate_m_file(funID)
delete 'log_matlab'
diary log_matlab
if funID == 1
funH = @simulate_system;
elseif funID == 2
funH = @simulate_system_par;
elseif funID == 3
funH = @simulate_entire_trajectories;
elseif funID == 4
funH = @simulate_entire_trajectories_cont;
else
error('')
end
e... |
github | zutshi/S3CAMX-master | run_staliro_v4.m | .m | S3CAMX-master/matlab/run_staliro_v4.m | 8,497 | utf_8 | 92beeb1722a2d6a17a8b4edcdd912a87 | function run_staliro_v4(num_runs)
% filename = 'heat.tst';
% path = '/examples/heat';
% filename = 'dci.tst';
% path = '/home/zutshi/work/RA/cpsVerification/HyCU/symbSplicing/splicing/examples/dc_motor_float';
% filename = 'fuzzy_invp.tst';
% path = '/home/zutshi/work/RA/cpsVerification/HyCU/symbSplicing/splicing/exa... |
github | zutshi/S3CAMX-master | matpy.m | .m | S3CAMX-master/matlab/matpy.m | 4,274 | utf_8 | 6f7b17ce73dd213d5866d37cc6562263 | %% Helper Functions
function y = matpy()
y.serialize_array = @serialize_array;
y.deserialize_array = @deserialize_array;
%y.sim = @simulate_system_external;
y.load_system = @load_system;
y.deserialize_prop = @deserialize_prop;
%% arrays are de-serialized
%
%% scalars are forced to be double [this prevents crazy Matlab... |
github | nkinsky/ImageCamp-master | neuron_reg_qc.m | .m | ImageCamp-master/GCamp/neuron_reg_qc.m | 14,079 | utf_8 | dc2bcbb4f7b9110c274173be665718ba | function [ reg_stats ] = neuron_reg_qc( base_struct, reg_struct, varargin )
% reg_stats = neuron_reg_qc( base_struct, reg_struct, ... )
% Calculate statistics for neuron registration.
%
% INPUTS:
%
% base_struct: session structure to base session
%
% reg_struct: session strcture to registered session.
... |
github | nkinsky/ImageCamp-master | GCAMPpixelmetric_NK.m | .m | ImageCamp-master/GCamp/GCAMPpixelmetric_NK.m | 3,407 | utf_8 | 06754842b7a9537d9ad6c2a5bd6e3756 | %Kinsky Lab - Function to Convert Pixels to Centimeters
function [pixmetRATIO, varargout] = GCAMPpixelmetric(file, varargin)
%{
Function Format
GCAMPpixelmetric will take the Cineplex DVT file in sting format and give
a vector for the ratio of x cm/pixel and y cm/pixel.
You may use one additional input as the percent ... |
github | nkinsky/ImageCamp-master | reg_qc_plot_batch.m | .m | ImageCamp-master/GCamp/reg_qc_plot_batch.m | 12,350 | utf_8 | 07e737a1ff5e1807c0924d2fe0f916c5 | function [reg_stats, reg_stats_chance, hfig] = reg_qc_plot_batch(base, reg, varargin)
% [reg_stats, hfig] = reg_qc_plot_batch(base, reg, num_shuffles (opt), ...
% num_shifts(opt), shift_dist(opt), ...)
%
% Plots histograms and ecdfs for centroid distance and |orientation diff|
% for all neuron ROIs matched t... |
github | nkinsky/ImageCamp-master | reg_qc_plot.m | .m | ImageCamp-master/GCamp/reg_qc_plot.m | 5,575 | utf_8 | d66933e8d1efb08f622e60a1633ecfbb | function [he_cd, hhist_cd, he_od, hhist_od ] = reg_qc_plot(centroid_dist, ...
orient_diff, avg_corr, varargin )
% [he_cd, hhist_cd, he_od, hhist_od ] = reg_qc_plot(centroid_dist, ...
% orient_diff, avg_corr, h )
% Plot neuron registration metrics. Leave empty to omit plots. h is a
% handle to an existing... |
github | nkinsky/ImageCamp-master | GCAMPpixelmetric.m | .m | ImageCamp-master/GCamp/GCAMPpixelmetric.m | 2,589 | utf_8 | 76c3aa1e6c155d53b3cdb092447f9d58 | %Kinsky Lab - Function to Convert Pixels to Centimeters
function [pixmetRATIO, varargout] = GCAMPpixelmetric(file, varargin)
%{
Function Format
GCAMPpixelmetric will take the Cineplex DVT file in sting format and give
a vector for the ratio of x cm/pixel and y cm/pixel.
You may use one additional input as the percent ... |
github | nkinsky/ImageCamp-master | patchline.m | .m | ImageCamp-master/GCamp/helpers/patchline.m | 3,812 | utf_8 | eb106a55c884f31c460bacfead7472aa | function p = patchline(xs,ys,varargin)
% Plot lines as patches (efficiently)
%
% SYNTAX:
% patchline(xs,ys)
% patchline(xs,ys,zs,...)
% patchline(xs,ys,zs,'PropertyName',propertyvalue,...)
% p = patchline(...)
%
% PROPERTIES:
% Accepts all parameter-values accepted by PATCH.
%
% DESCRI... |
github | nkinsky/ImageCamp-master | resize.m | .m | ImageCamp-master/GCamp/helpers/resize.m | 6,561 | utf_8 | 8ed418ccc28dda52bce050a79e28ecd2 | function x = resize(x,newsiz)
%RESIZE Resize any arrays and images.
% Y = RESIZE(X,NEWSIZE) resizes input array X using a DCT (discrete
% cosine transform) method. X can be any array of any size. Output Y is
% of size NEWSIZE.
%
% Input and output formats: Y has the same class as X.
%
% Note:
% ... |
github | nkinsky/ImageCamp-master | NOparseGUI.m | .m | ImageCamp-master/GCamp/helpers/NOparseGUI.m | 25,365 | utf_8 | 6bf7eb588fe99949a9b9b9838ecfbecf | function NOparseGUI( ~,~ )
% Tool to facilitate parsing AVI for DNMP task into event time stamps (frame numbers),
% export those numbers in an excel sheet for using with Nat's DNMP
% functions. Select lap number, toggle between frames, click button to set
% that frame number as that type of event. Have to click away fr... |
github | nkinsky/ImageCamp-master | get_silent_traces.m | .m | ImageCamp-master/GCamp/helpers/get_silent_traces.m | 5,061 | utf_8 | af098da5f94f6d88b3f41ec5f9bcc37e | function [traces_reg, silent_bool, active_neighbor] = ...
get_silent_traces(sesh1, sesh2)
% [silent_traces, active_traces] = get_silent_traces(sesh1, sesh2)
% Takes all neurons in session 1 and gets low-pass filtered traces for those same ROIs in
% session2. Also spits out booleans for if a cell is putatively "... |
github | nkinsky/ImageCamp-master | uTest_FileRename.m | .m | ImageCamp-master/GCamp/helpers/uTest_FileRename.m | 14,802 | utf_8 | 782ed2e0a74092634579b9afdb7e4e3c | function uTest_FileRename(doSpeed)
% Automatic test: FileRename
% This is a routine for automatic testing. It is not needed for processing and
% can be deleted or moved to a folder, where it does not bother.
%
% uTest_FileRename(doSpeed)
% INPUT:
% doSpeed: Optional logical flag to trigger time consuming speed tests.... |
github | nkinsky/ImageCamp-master | batch_rot_arena.m | .m | ImageCamp-master/GCamp/helpers/batch_rot_arena.m | 4,888 | utf_8 | 5db35df18c24725d54209c7f1ea45b73 | function [ rot_final ] = batch_rot_arena( base_struct, reg_struct, rot_array, varargin )
% rot_final = batch_rot_arena( base_struct, reg_struct, rot_array, manual_limits, varargin )
% Applies batch_align_pos to each session but rotates the data all of the
% degrees in rot_array
p = inputParser;
p.addRequired('ba... |
github | nkinsky/ImageCamp-master | plot_PVcurve.m | .m | ImageCamp-master/GCamp/helpers/plot_PVcurve.m | 4,164 | utf_8 | d65a638aea06993ebca13e7533cce914 | function [hout, hmean_shuf, hmean_CI, unique_lags, mean_corr_cell, CI,...
hcurve, mean_corr_shuffle] = plot_PVcurve(PV_corrs, lag, varargin)
% [hout, hmean_shuf, hmean_CI, unique_lags, mean_corr_cell, CI,...
% hcurve] = plot_PVcurve(PV_corrs, lag,...)
% Plots data in PV_corrs vs lags. If PV_corrs_shuffle... |
github | nkinsky/ImageCamp-master | scroll_PF.m | .m | ImageCamp-master/GCamp/helpers/scroll_PF.m | 6,491 | utf_8 | 7509494d618718ddd702669c8a34cf12 | function [ ] = scroll_PF(MD,varargin)
% scroll_PF(MD, varargin)
%
% Allows one to scroll through all the place fields in a session with stats
% on nHits and nTrans and pval displayed
%% Parse Inputs
ip = inputParser;
ip.addRequired('MD',@isstruct);
ip.addParameter('name_append', '', @ischar); % Primary PF ro... |
github | nkinsky/ImageCamp-master | fix_align_lims.m | .m | ImageCamp-master/GCamp/helpers/fix_align_lims.m | 1,580 | utf_8 | e11f88774de03f778e068be44fa9e2eb | function [ ] = fix_align_lims( sessions, name_prefix, xlims, ylims )
% Fixes limits on batch_pos_align files that start with name prefix if screwed up.
% Saves each file with _archive first, then replaces it with xmin, xmax,
% ymin, ymax in xlims and ylims.
num_sessions = length(sessions);
for j = 1:num_sessions... |
github | nkinsky/ImageCamp-master | fix_align_scale.m | .m | ImageCamp-master/GCamp/helpers/fix_align_scale.m | 1,651 | utf_8 | 796b48e70f72d873cfee1fad234d5728 | function [ ] = fix_align_scale( sessions, name_prefix, scale )
% Fixes scale for data - adjusts x_adj_cm, y_adj_cm, xmin/xmax, and
% ymin/ymax for each session
num_sessions = length(sessions);
for j = 1:num_sessions
dirstr = ChangeDirectory(sessions(j).Animal, sessions(j).Date, sessions(j).Session);
fil... |
github | nkinsky/ImageCamp-master | get_PV_from_TMap.m | .m | ImageCamp-master/GCamp/helpers/get_PV_from_TMap.m | 1,961 | utf_8 | 2aec7176814f967f088b4ef1cf8fc519 | function [ PV, minspeed, xEdges, yEdges ] = get_PV_from_TMap( session, varargin )
% [PV = get_PV_from_tmap( sessions,... )
% Uses already calculated placefields to calculated population vectors
% with same bin size and speed threshold
%% Parse Inputs
ip = inputParser;
ip.addRequired('session',@isstruct);
i... |
github | nkinsky/ImageCamp-master | imread_big.m | .m | ImageCamp-master/GCamp/helpers/imread_big.m | 2,109 | utf_8 | ffa5f70d3b23ea65abd19be689fdc2a0 | %Tristan Ursell
%Read large image stack (TIFF)
%Feb 2017
%
% This function can load image stacks larger than 4GB which is the typical
% limitation image files. Designed to work with single-channel
% uncompressed TIFF stacks. Also works for files smaller than 4GB.
%
% [stack_out,Nframes]= imread_big(stack_nam... |
github | nkinsky/ImageCamp-master | neuron_map_simple.m | .m | ImageCamp-master/GCamp/helpers/neuron_map_simple.m | 4,859 | utf_8 | c2b04eb95aa278ab8a576e89d7e66060 | function [ neuron_map_out, becomes_silent, new_cells, quickr_bool ] = ...
neuron_map_simple(MDbase, MDreg, varargin)
% [ neuron_map_out, becomes_silent, new_cell ] = neuron_map_simple(MDbase, MDreg,...)
% Spits out an array where each entry is the neuron in the registered
% session that corresponds to the ... |
github | nkinsky/ImageCamp-master | dftregistration.m | .m | ImageCamp-master/GCamp/efficient_subpixel_registration/dftregistration.m | 8,234 | utf_8 | 7dc727aebf333c1a5cef2b2821265218 |
function [output Greg] = dftregistration(buf1ft,buf2ft,usfac)
% function [output Greg] = dftregistration(buf1ft,buf2ft,usfac);
% Efficient subpixel image registration by crosscorrelation. This code
% gives the same precision as the FFT upsampled cross correlation in a
% small fraction of the computation time an... |
github | nkinsky/ImageCamp-master | FC_plot_freezing.m | .m | ImageCamp-master/GCamp/Project specific code/FC/FC_plot_freezing.m | 1,658 | utf_8 | 7b8bff22cd12157bc4ab4c5979eaeb6a | function [ ] = FC_plot_freezing( MD_ctrl_env, MD_shock_env, speed_thresh, h)
% FC_plot_freezing( MD_ctrl_env, MD_shock_env, speed_thresh, h)
% Plots a bar graph for % time freezing with speed threshold specified
% for control and shock environment. If either env is omitted, it plots
% it only for the specifi... |
github | nkinsky/ImageCamp-master | alt_COM_bytrial.m | .m | ImageCamp-master/GCamp/Project specific code/alternation/alt_COM_bytrial.m | 2,155 | utf_8 | 1b50183241647ca4d07b1ecd6494095b | function [COML, COMR, speedL, speedR, sigID] = alt_COM_bytrial(session, binthresh)
% alt_COM_bytrial(session)
% Tracks COM of tuning curve along the stem within a session. COM =
% centroid of firing location.
%
% NRK Note: could add one more input argument to grab files related to
% return arms...
if nargin < ... |
github | nkinsky/ImageCamp-master | alt_split_v_recur_batch.m | .m | ImageCamp-master/GCamp/Project specific code/alternation/alt_split_v_recur_batch.m | 18,892 | utf_8 | ee0c3b58e5a6d79447bb316f13a86655 | function [h, rdnorm, pdnorm, rdintn, pdintn, rdmax, pdmax] = ...
alt_split_v_recur_batch(day_lag, comp_type, mice_sesh, varargin)
% [h, rdnorm, pdnorm, rdintn, pdintn] = alt_split_v_recur_batch(day_lag, comp_type, mice_sesh )
% Plot various metrics of cell stability vs various metrics of
% "splittiness" for all... |
github | nkinsky/ImageCamp-master | plot_perf_v_split_metrics.m | .m | ImageCamp-master/GCamp/Project specific code/alternation/plot_perf_v_split_metrics.m | 8,952 | utf_8 | 789f5ddd21dd32901e9264a063e4064d | function [split_metrics, hmain, rhos, pvals] = plot_perf_v_split_metrics(...
sessions, plot_flag, cnoise, trial_thresh, nstem_thresh, plot_peak_rely)
% [split_metrics, hmain] = plot_perf_v_split_metrics(sessions, plot_flag, ...
% cnoise, ntrial_thresh)
% Plots animal performance versus "splittiness" metrics.
i... |
github | nkinsky/ImageCamp-master | splitterplots_jon.m | .m | ImageCamp-master/GCamp/Project specific code/alternation/splitterplots_jon.m | 14,692 | utf_8 | df3c70293ebef52a4c7c2f2adb88853c | function [outstruct] = splitterplots(spk,xydata,pos1d,ctrstem,trialID,treadmillts,xbins,trialtype,badlaps,smsigma,iter,sigp,plotopt,savepath,cmap,unitnames,filetag,picformat)
%SPLITTERPLOTS -
%
%(filter out bad trials from trialtype and bad trial ts from trialID
%before)
%plotopt - Plot start of center stem, end ... |
github | nkinsky/ImageCamp-master | split_tuning_corr.m | .m | ImageCamp-master/GCamp/Project specific code/alternation/split_tuning_corr.m | 7,115 | utf_8 | 84e358f65cd22b99135454e19649a4ee | function [deltacurve_corr, PFcorr, deltacurve_corr_shuf, PFcorr_shuf, ...
sigsplit_ind, num_shuffles] = split_tuning_corr(session1, session2, varargin)
% [deltacurve_corr, PFcorr, deltacurve_corr_shuf, PFcorr_shuf, ...
% sigsplit_ind] = split_tuning_corr(session1, session2, varargin)
% Gets correlations betwe... |
github | nkinsky/ImageCamp-master | NO_PETH.m | .m | ImageCamp-master/GCamp/Project specific code/Novel object/NO_PETH.m | 7,978 | utf_8 | d7719d91491639d5c9fa87d42be06260 | function [PETH_out, trace_out, trace_shuffle, sig_sum, tuning_curve, sig_curve, PSA_mean_shuffle ] = NO_PETH(session, varargin)
% [PETH_out, trace_out, trace_shuffle, sig_sum, tunin_curve, sig_curve ] = NO_PETH(session, frame_buffer, scroll_flag)
% Plots a peri-event histogram for each neuron for each object. Fram... |
github | nkinsky/ImageCamp-master | plot_simplified_summary.m | .m | ImageCamp-master/GCamp/Project specific code/2env/plot_simplified_summary.m | 4,738 | utf_8 | 918be7ab907c20dd8f776460703768af | function [ ] = plot_simplified_summary(local_stat, distal_stat, varargin )
%UNTITLED5 Summary of this function goes here
% Detailed explanation goes here
% figure(110)
% set(gcf,'Position',[1988 286 1070 477])
%% Colors for bars
bar_colors = {'b','y','r'};
%%
error_on = 1; % default
plot_shuffle = 0; %... |
github | nkinsky/ImageCamp-master | twoenv_rot_analysis_full.m | .m | ImageCamp-master/GCamp/Project specific code/2env/twoenv_rot_analysis_full.m | 28,527 | utf_8 | 2c58865ebb686e7f15c77a1bc675bde1 | function [best_angle, best_angle_all, corr_at_best, sig_test, corr_means, CI, hh,...
best_angle_shuf_all] = twoenv_rot_analysis_full(sessions, rot_type, varargin)
% [best_angle, best_angle_all, corr_at_best, sig_test, corr_means, CI, hh, ...
% best_angle_shuf_all] = twoenv_rot_analysis_full(sessions, rot_type... |
github | nkinsky/ImageCamp-master | twoenv_get_ind_mean.m | .m | ImageCamp-master/GCamp/Project specific code/2env/twoenv_get_ind_mean.m | 9,483 | utf_8 | f3c2a710831bff0284149fd6095fbcac | function [ local_stat, distal_stat, both_stat] = twoenv_get_ind_mean(Mouse_struct, local_sub_use, distal_sub_use, varargin )
% [ local_stat, distal_stat, both_stat ] = twoenv_get_ind_mean(Mouse_struct, local_sub_use, distal_sub_use, varargin )
% Takes Mouse_struct and pulls out all the appropriate correlations whose
... |
github | nkinsky/ImageCamp-master | get_PV_and_corr.m | .m | ImageCamp-master/GCamp/Project specific code/2env/get_PV_and_corr.m | 18,854 | utf_8 | a28c3e8d17d31939a310e316ab432e4b | function [ PV, PV_corrs ] = get_PV_and_corr( session_struct, batch_session_map, varargin)
% [PV, PV_corrs ] = get_PV_and_corr( session_struct, batch_map, ... )
% Will load 'PlaceMaps.mat' unless rot_to_std or use_trans are specified in
% as 0 in varargins. NumXBins and NumYBins = 5 (default) unless specified in ... |
github | nkinsky/ImageCamp-master | calc_coherency.m | .m | ImageCamp-master/GCamp/Project specific code/2env/calc_coherency.m | 3,302 | utf_8 | e05e8dc25ba7c12311966315a05dc900 | function [ chi2stat_mat, p_mat, df ] = calc_coherency( best_angle_all, sesh_type, method )
% [ chi2stat, p, df ] = calc_coherency( best_angle_all, rot_bins, method )
% Calculates if a session is coherent by performing a chi-squared
% goodness-of-fit test for the distribution of rotation angles versus the
% nu... |
github | nkinsky/ImageCamp-master | nearestneighbour.m | .m | ImageCamp-master/tracking/nearestneighbour.m | 14,158 | utf_8 | 8733ae554d1b0be16af34656a10b5d02 | function [idx, tri] = nearestneighbour(varargin)
%NEARESTNEIGHBOUR find nearest neighbours
% IDX = NEARESTNEIGHBOUR(X) finds the nearest neighbour by Euclidean
% distance to each point (column) in X from X. X is a matrix with points
% as columns. IDX is a vector of indices into X, such that X(:, IDX) are
... |
github | nkinsky/ImageCamp-master | KalmanVel_sam.m | .m | ImageCamp-master/General/KalmanVel_sam.m | 7,312 | utf_8 | 094848626c68ccbcd3388141a133411a | function [t,x,y,vx,vy,ax,ay] = KalmanVel_sam(posx,posy,post,order,Q,R)
% root.KalmanVel(x, y, t, order);
%
% Code adapted from Sturla Molden (see below) to work within CMBHOME
% framework. Returns the velocity estimation using the Kalman Filter on
% recorded position.
%
% Kalman filter for obtaining an apprixima... |
github | nkinsky/ImageCamp-master | barwitherr.m | .m | ImageCamp-master/General/barwitherr.m | 6,062 | utf_8 | 894962c3205f5ba925dd59c84274e516 | %**************************************************************************
%
% This is a simple extension of the bar plot to include error bars. It
% is called in exactly the same way as bar but with an extra input
% parameter "errors" passed first.
%
% Parameters:
% errors - the errors to be plotted (extra... |
github | nkinsky/ImageCamp-master | KalmanVel.m | .m | ImageCamp-master/General/KalmanVel.m | 7,312 | utf_8 | 45dc1fce796aafc457d6fc028265ebc2 | chisfunction [t,x,y,vx,vy,ax,ay] = KalmanVel(posx,posy,post,order,Q,R)
% root.KalmanVel(x, y, t, order);
%
% Code adapted from Sturla Molden (see below) to work within CMBHOME
% framework. Returns the velocity estimation using the Kalman Filter on
% recorded position.
%
% Kalman filter for obtaining an apprixima... |
github | nkinsky/ImageCamp-master | KalmanVel (1).m | .m | ImageCamp-master/General/KalmanVel (1).m | 7,308 | utf_8 | caeb6659a71157fca3e9145d70c2090c | function [t,x,y,vx,vy,ax,ay] = KalmanVel(posx,posy,post,order,Q,R)
% root.KalmanVel(x, y, t, order);
%
% Code adapted from Sturla Molden (see below) to work within CMBHOME
% framework. Returns the velocity estimation using the Kalman Filter on
% recorded position.
%
% Kalman filter for obtaining an appriximate B... |
github | nkinsky/ImageCamp-master | distinguishable_colors.m | .m | ImageCamp-master/General/distinguishable_colors.m | 5,909 | utf_8 | 5855119e04bb27621818a00e7e2f852c | function colors = distinguishable_colors(n_colors,bg,func)
% DISTINGUISHABLE_COLORS: pick colors that are maximally perceptually distinct
%
% When plotting a set of lines, you may want to distinguish them by color.
% By default, Matlab chooses a small set of colors and cycles among them,
% and so if you have more ... |
github | nkinsky/ImageCamp-master | sigstar.m | .m | ImageCamp-master/General/sigstar.m | 8,495 | utf_8 | 35a9003cb0fbf390196ec9aa64750d88 | function varargout=sigstar(groups,stats,nosort)
% SIGSTAR Add significance stars to bar charts, boxplots, line charts, etc,
%
% H = SIGSTAR(GROUPS,STATS,NSORT)
%
% Purpose
% Add stars and lines highlighting significant differences between pairs of groups.
% The user specifies the groups and associated p-values. The f... |
github | nkinsky/ImageCamp-master | generateRisingFallingRegionsOfInterest.m | .m | ImageCamp-master/General/ImageProcessingHanLab/generateRisingFallingRegionsOfInterest.m | 7,157 | utf_8 | eb8d0616701ac6082a2baa2a3cd59b2b | function bwvid = generateRisingFallingRegionsOfInterest(vid)
% (expects vid.cdata holds uint8 cdata)
% SUBTRACT BACKGROUND/BASELINE IF NOT DONE ALREADY
if ~isfield(vid(1), 'backgroundMean')
vid = normalizeVidStruct2Region(vid);
end
% APPLY SMOOTHING FILTER IN TIME DOMAIN TO STABILIZE SIGNAL
if ~isfield(vid, '... |
github | nkinsky/ImageCamp-master | slowHomomorphicFilter.m | .m | ImageCamp-master/General/ImageProcessingHanLab/slowHomomorphicFilter.m | 2,720 | utf_8 | e3f31a953aa894cff99a42e90788d43d | function vid = slowHomomorphicFilter(vid,varargin)
% Implemented by Mark Bucklin 6/12/2014
%
% FROM WIKIPEDIA ENTRY ON HOMOMORPHIC FILTERING
% Homomorphic filtering is a generalized technique for signal and image
% processing, involving a nonlinear mapping to a different domain in which
% linear filter technique... |
github | eunnieverse/AcousticEigen-master | Wavenumber2_air.m | .m | AcousticEigen-master/sample/matlab_Anshuman/final_working_2D_version_of_3D_air_Anshuman/Wavenumber2_air.m | 3,055 | utf_8 | e780f703fbd573b3ece0803bbeca902a | % Find the macroscopic wave number - Helmholtz resonator
% Using Zwikker-Konten model for slits
% Taking into account Zwikker-Konten waves in the cavity-- Vertically
function [q]=Wavenumber2_air(omega, nbptklpi)
%constantes
cstphys3_air
%cstphys3
st=sqrt( omega.*rho0.*((ht./2).^2)./eta ); % define... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.