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 | jam-world/handleKITTI-master | getSatellitePair.m | .m | handleKITTI-master/connectGoogleMap/getSatellitePair.m | 2,573 | utf_8 | ba6e2deae287c8049448f82b9addf994 | % Outputs:
% 1. positionGT.txt: records positionGT in the satelliteAll image.
% 2. cropped image that corresponds to each ground image.
function getSatellitePair(foldername, saveDir, ll2yx, satelliteRaw, cropSize, forwardSize)
% Read oxts/data directory
gpsDirectory = dir(strcat(foldername, '/oxts/data'));
gpsDir... |
github | jam-world/handleKITTI-master | calPos.m | .m | handleKITTI-master/connectGoogleMap/calPos.m | 2,039 | utf_8 | 99bf79e64abf553d9b9324dd32314243 | function [mx, mz] = calPos(lat, lon, originLat, originLon)
scaleFactor = earthCircumference(originLat);
originZ = latToZ(originLat) * scaleFactor;
originX = lonToX(originLon) * scaleFactor;
mx = lonToX(lon) * scaleFactor - originX;
mz = latToZ(lat) * scaleFactor - originZ;
mx = round(mx * 1000)... |
github | hiro2233/ArdupilotMicro-master | RotToQuat.m | .m | ArdupilotMicro-master/libraries/AP_NavEKF/Models/Common/RotToQuat.m | 289 | utf_8 | 02e69cffea0cc4343f033fd99517be8b | % convert froma rotation vector in radians to a quaternion
function quaternion = RotToQuat(rotVec)
vecLength = sqrt(rotVec(1)^2 + rotVec(2)^2 + rotVec(3)^2);
if vecLength < 1e-6
quaternion = [1;0;0;0];
else
quaternion = [cos(0.5*vecLength); rotVec/vecLength*sin(0.5*vecLength)];
end
|
github | hiro2233/ArdupilotMicro-master | NormQuat.m | .m | ArdupilotMicro-master/libraries/AP_NavEKF/Models/Common/NormQuat.m | 198 | utf_8 | ed913e87efc9194a2c52b266fced8da7 | % normalise the quaternion
function quaternion = normQuat(quaternion)
quatMag = sqrt(quaternion(1)^2 + quaternion(2)^2 + quaternion(3)^2 + quaternion(4)^2);
quaternion(1:4) = quaternion / quatMag;
|
github | hiro2233/ArdupilotMicro-master | QuatToEul.m | .m | ArdupilotMicro-master/libraries/AP_NavEKF/Models/Common/QuatToEul.m | 437 | utf_8 | b629ab9b5b6c65910d0f0030f7cdb7f1 | % Convert from a quaternion to a 321 Euler rotation sequence in radians
function Euler = QuatToEul(quat)
Euler = zeros(3,1);
Euler(1) = atan2(2*(quat(3)*quat(4)+quat(1)*quat(2)), quat(1)*quat(1) - quat(2)*quat(2) - quat(3)*quat(3) + quat(4)*quat(4));
Euler(2) = -asin(2*(quat(2)*quat(4)-quat(1)*quat(3)));
Euler(3) =... |
github | zhongjinhong/Program_test_crossvalidation-master | test.m | .m | Program_test_crossvalidation-master/test.m | 7,754 | utf_8 | ae150f3baf45e33a4ebf61f34009aaff | estimate_label = zeros(900,1);
for i = 1:900
estimate_label(i,1) = weight(i+900)>weight(i);
end
estimate_label = 2*estimate_label - 1;
ground_truth = 2*(sum(X,2)>0)-1;
for t = 1:33
accuracy_label(1,t) = sum(Y(:,1)==Y(:,t))/sum(Y(:,t)~=-2);
end
sum(Y==1)
sum(Y==-1)
for t=1:(noisy_times+1)*expert_num
bal... |
github | zhongjinhong/Program_test_crossvalidation-master | fminlbfgs.m | .m | Program_test_crossvalidation-master/fminlbfgs.m | 31,197 | utf_8 | 89800efa732fda6d70f0744c2bb3f8c6 | function [x,fval,exitflag,output,grad]=fminlbfgs(funfcn,x_init,optim)
%FMINLBFGS finds a local minimum of a function of several variables.
% This optimizer is developed for image registration methods with large
% amounts of unknown variables.
%
% Optimization methods supported:
% - Quasi Newton Broyden?letcher?ol... |
github | multinormal/ddsm-master | get_ddsm_groundtruth.m | .m | ddsm-master/ddsm-software/get_ddsm_groundtruth.m | 10,265 | utf_8 | 9059742360972aa6ce064339b06d638d | function [groundtruth] = get_ddsm_groundtruth(overlay_filename)
%
% Get all groundtruth data about a mammogram from a .OVERLAY file.
%
% GT = GET_DDSM_GROUNDTRUTH(F) obtains the groundtruth about the mammogram
% described by the overlay file with filename F. Example usage is provided
% below.
%
% GET_DDSM_GROUNDTRUTH ... |
github | PhilD001/biomechZoo-help-master | sampleprop_example.m | .m | biomechZoo-help-master/examples/director props/sampleprop_example.m | 4,432 | utf_8 | ffffe9ef89520efab3186a96b7702dc8 | function sampleprop_example(r,h,c)
% SAMPLEPROP_EXAMPLE(r,h,c) demonstrates how to create a simple cylinder for use
% in director as a 'prop' object.
%
% ARGUMENTS
% r ... radius of cylinder
% h ... height of cylinder
% c ... color of cyclinder e.g. [1 0 0]
%
% NOTES
% - run function with or without arg... |
github | RInterested/OCTAVE-master | submit.m | .m | OCTAVE-master/ex7_K_means_and_PCA_image compression/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 | RInterested/OCTAVE-master | submitWithConfiguration.m | .m | OCTAVE-master/ex7_K_means_and_PCA_image compression/machine-learning-ex7/ex7/lib/submitWithConfiguration.m | 3,734 | utf_8 | 84d9a81848f6d00a7aff4f79bdbb6049 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | RInterested/OCTAVE-master | savejson.m | .m | OCTAVE-master/ex7_K_means_and_PCA_image compression/machine-learning-ex7/ex7/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | RInterested/OCTAVE-master | loadjson.m | .m | OCTAVE-master/ex7_K_means_and_PCA_image compression/machine-learning-ex7/ex7/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | 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 | RInterested/OCTAVE-master | loadubjson.m | .m | OCTAVE-master/ex7_K_means_and_PCA_image compression/machine-learning-ex7/ex7/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | RInterested/OCTAVE-master | saveubjson.m | .m | OCTAVE-master/ex7_K_means_and_PCA_image compression/machine-learning-ex7/ex7/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | RInterested/OCTAVE-master | submit.m | .m | OCTAVE-master/ex6_SVM_spam_classifiers/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 | RInterested/OCTAVE-master | porterStemmer.m | .m | OCTAVE-master/ex6_SVM_spam_classifiers/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 | RInterested/OCTAVE-master | svmTrain.m | .m | OCTAVE-master/ex6_SVM_spam_classifiers/machine-learning-ex6/ex6/svmTrain.m | 5,966 | utf_8 | 75c867071dc2f93fea7473feb0a2804b |
function [model] = svmTrain(X, Y, C, kernelFunction, ...
tol, max_passes)
%SVMTRAIN Trains an SVM classifier using a simplified version of the SMO
%algorithm.
% [model] = SVMTRAIN(X, Y, C, kernelFunction, tol, max_passes) trains an
% SVM classifier and returns trained model. X is the... |
github | RInterested/OCTAVE-master | submitWithConfiguration.m | .m | OCTAVE-master/ex6_SVM_spam_classifiers/machine-learning-ex6/ex6/lib/submitWithConfiguration.m | 3,734 | utf_8 | 84d9a81848f6d00a7aff4f79bdbb6049 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | RInterested/OCTAVE-master | savejson.m | .m | OCTAVE-master/ex6_SVM_spam_classifiers/machine-learning-ex6/ex6/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | RInterested/OCTAVE-master | loadjson.m | .m | OCTAVE-master/ex6_SVM_spam_classifiers/machine-learning-ex6/ex6/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | 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 | RInterested/OCTAVE-master | loadubjson.m | .m | OCTAVE-master/ex6_SVM_spam_classifiers/machine-learning-ex6/ex6/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | RInterested/OCTAVE-master | saveubjson.m | .m | OCTAVE-master/ex6_SVM_spam_classifiers/machine-learning-ex6/ex6/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | RInterested/OCTAVE-master | submit.m | .m | OCTAVE-master/ex8_anomaly_detection/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 | RInterested/OCTAVE-master | submitWithConfiguration.m | .m | OCTAVE-master/ex8_anomaly_detection/machine-learning-ex8/ex8/lib/submitWithConfiguration.m | 3,734 | utf_8 | 84d9a81848f6d00a7aff4f79bdbb6049 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | RInterested/OCTAVE-master | savejson.m | .m | OCTAVE-master/ex8_anomaly_detection/machine-learning-ex8/ex8/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | RInterested/OCTAVE-master | loadjson.m | .m | OCTAVE-master/ex8_anomaly_detection/machine-learning-ex8/ex8/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | 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 | RInterested/OCTAVE-master | loadubjson.m | .m | OCTAVE-master/ex8_anomaly_detection/machine-learning-ex8/ex8/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | RInterested/OCTAVE-master | saveubjson.m | .m | OCTAVE-master/ex8_anomaly_detection/machine-learning-ex8/ex8/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | RInterested/OCTAVE-master | submit.m | .m | OCTAVE-master/ex.4_NNets_backpropagation_digit_recognition/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 | RInterested/OCTAVE-master | submitWithConfiguration.m | .m | OCTAVE-master/ex.4_NNets_backpropagation_digit_recognition/machine-learning-ex4/ex4/lib/submitWithConfiguration.m | 3,734 | utf_8 | 84d9a81848f6d00a7aff4f79bdbb6049 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | RInterested/OCTAVE-master | savejson.m | .m | OCTAVE-master/ex.4_NNets_backpropagation_digit_recognition/machine-learning-ex4/ex4/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | RInterested/OCTAVE-master | loadjson.m | .m | OCTAVE-master/ex.4_NNets_backpropagation_digit_recognition/machine-learning-ex4/ex4/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | 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 | RInterested/OCTAVE-master | loadubjson.m | .m | OCTAVE-master/ex.4_NNets_backpropagation_digit_recognition/machine-learning-ex4/ex4/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | RInterested/OCTAVE-master | saveubjson.m | .m | OCTAVE-master/ex.4_NNets_backpropagation_digit_recognition/machine-learning-ex4/ex4/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | RInterested/OCTAVE-master | submit.m | .m | OCTAVE-master/ex.2_cost_grad_desc_in_log_reg/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 | RInterested/OCTAVE-master | submitWithConfiguration.m | .m | OCTAVE-master/ex.2_cost_grad_desc_in_log_reg/machine-learning-ex2/ex2/lib/submitWithConfiguration.m | 3,734 | utf_8 | 84d9a81848f6d00a7aff4f79bdbb6049 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | RInterested/OCTAVE-master | savejson.m | .m | OCTAVE-master/ex.2_cost_grad_desc_in_log_reg/machine-learning-ex2/ex2/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | RInterested/OCTAVE-master | loadjson.m | .m | OCTAVE-master/ex.2_cost_grad_desc_in_log_reg/machine-learning-ex2/ex2/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | 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 | RInterested/OCTAVE-master | loadubjson.m | .m | OCTAVE-master/ex.2_cost_grad_desc_in_log_reg/machine-learning-ex2/ex2/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | RInterested/OCTAVE-master | saveubjson.m | .m | OCTAVE-master/ex.2_cost_grad_desc_in_log_reg/machine-learning-ex2/ex2/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | RInterested/OCTAVE-master | submit.m | .m | OCTAVE-master/ex.5_regularized_LR_and_Bias_Variance/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 | RInterested/OCTAVE-master | submitWithConfiguration.m | .m | OCTAVE-master/ex.5_regularized_LR_and_Bias_Variance/machine-learning-ex5/ex5/lib/submitWithConfiguration.m | 3,734 | utf_8 | 84d9a81848f6d00a7aff4f79bdbb6049 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | RInterested/OCTAVE-master | savejson.m | .m | OCTAVE-master/ex.5_regularized_LR_and_Bias_Variance/machine-learning-ex5/ex5/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | RInterested/OCTAVE-master | loadjson.m | .m | OCTAVE-master/ex.5_regularized_LR_and_Bias_Variance/machine-learning-ex5/ex5/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | 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 | RInterested/OCTAVE-master | loadubjson.m | .m | OCTAVE-master/ex.5_regularized_LR_and_Bias_Variance/machine-learning-ex5/ex5/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | RInterested/OCTAVE-master | saveubjson.m | .m | OCTAVE-master/ex.5_regularized_LR_and_Bias_Variance/machine-learning-ex5/ex5/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | RInterested/OCTAVE-master | submit.m | .m | OCTAVE-master/ex.1_cost_grad_desc_in_OLS/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 | RInterested/OCTAVE-master | submitWithConfiguration.m | .m | OCTAVE-master/ex.1_cost_grad_desc_in_OLS/machine-learning-ex1/ex1/lib/submitWithConfiguration.m | 3,845 | utf_8 | 722c876ac0336870ee97a266b799ce94 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | RInterested/OCTAVE-master | savejson.m | .m | OCTAVE-master/ex.1_cost_grad_desc_in_OLS/machine-learning-ex1/ex1/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | RInterested/OCTAVE-master | loadjson.m | .m | OCTAVE-master/ex.1_cost_grad_desc_in_OLS/machine-learning-ex1/ex1/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | 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 | RInterested/OCTAVE-master | loadubjson.m | .m | OCTAVE-master/ex.1_cost_grad_desc_in_OLS/machine-learning-ex1/ex1/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | RInterested/OCTAVE-master | saveubjson.m | .m | OCTAVE-master/ex.1_cost_grad_desc_in_OLS/machine-learning-ex1/ex1/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | RInterested/OCTAVE-master | submit.m | .m | OCTAVE-master/ex.3_digits_logis_1vALL_and_NN/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 | RInterested/OCTAVE-master | submitWithConfiguration.m | .m | OCTAVE-master/ex.3_digits_logis_1vALL_and_NN/machine-learning-ex3/ex3/lib/submitWithConfiguration.m | 3,734 | utf_8 | 84d9a81848f6d00a7aff4f79bdbb6049 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | RInterested/OCTAVE-master | savejson.m | .m | OCTAVE-master/ex.3_digits_logis_1vALL_and_NN/machine-learning-ex3/ex3/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | RInterested/OCTAVE-master | loadjson.m | .m | OCTAVE-master/ex.3_digits_logis_1vALL_and_NN/machine-learning-ex3/ex3/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | 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 | RInterested/OCTAVE-master | loadubjson.m | .m | OCTAVE-master/ex.3_digits_logis_1vALL_and_NN/machine-learning-ex3/ex3/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | RInterested/OCTAVE-master | saveubjson.m | .m | OCTAVE-master/ex.3_digits_logis_1vALL_and_NN/machine-learning-ex3/ex3/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | danielriofrio/GeneticAlgorithm-master | dr_toIntegers.m | .m | GeneticAlgorithm-master/dr_toIntegers.m | 409 | utf_8 | 7cda4be16e3bbce699fa3bec8dc64235 | %% This code was developed by Daniel Riofrio.
function [x,y] = dr_toIntegers(individual)
% translation to integer numbers.
sign_x = individual(1);
sign_y = individual(6);
num_x_binary = individual(2:5);
num_y_binary = individual(7:10);
x = bi2de(num_x_binary);
y = bi2de(num_y_binary);
... |
github | danielriofrio/GeneticAlgorithm-master | dr_f3.m | .m | GeneticAlgorithm-master/dr_f3.m | 139 | utf_8 | 4e35a2eae6f635606132b9d43afa1536 | %% This code was developed by Daniel Riofrio.
function [ Y ] = dr_f3( x, y )
Y = 20 + x^2 + y^2 - 10*(cos(2*pi*x)+cos(2*pi*y));
end
|
github | danielriofrio/GeneticAlgorithm-master | dr_f1.m | .m | GeneticAlgorithm-master/dr_f1.m | 115 | utf_8 | dc0079e9e6b251ce83d3b6d3d018c975 | %% This code was developed by Daniel Riofrio.
function [ Y ] = dr_f1( x, y )
Y = (x-3)^2 + (y+4)^2 - 10;
end
|
github | danielriofrio/GeneticAlgorithm-master | dr_f2.m | .m | GeneticAlgorithm-master/dr_f2.m | 110 | utf_8 | 42da0a07532eddca320945aee8cd29f1 | %% This code was developed by Daniel Riofrio.
function [ Y ] = dr_f2( x, y )
Y = -x^2 - y^2 - 10;
end
|
github | danielriofrio/GeneticAlgorithm-master | dr_ga.m | .m | GeneticAlgorithm-master/dr_ga.m | 4,284 | utf_8 | c5a121178306494e4fa3b28ab9dc110e | %% This code was developed by Daniel Riofrio.
function [BestSolutionXG, BestFitnessXG, bestSolution, bestFitness, final_G] = dr_ga(function_handler, ...
population_size, ...
individual_size, ...
... |
github | danielriofrio/GeneticAlgorithm-master | dr_f4.m | .m | GeneticAlgorithm-master/dr_f4.m | 232 | utf_8 | 2a59e466c41a147e0dd6419d8d94783a | %% This code was developed by Daniel Riofrio.
function [ Y ] = dr_f4( x, y )
a = 20;
b = 0.2;
c = 2*pi;
s1 = x^2 + y^2;
s2 = cos(c*x) + cos(x*y);
Y = -a*exp(-b*sqrt(1/2*s1))-exp(1/2*s2)+a+exp(1);
end
|
github | wkentaro/openrave-master | orEnvLoadScene.m | .m | openrave-master/octave_matlab/orEnvLoadScene.m | 668 | utf_8 | bbc21982acc8176552c971d044ad2ef6 | % orEnvLoadScene(filename, [ClearScene])
%
% Loads a new environment.
% filename - The filename of the scene to load. If a relative file
% is specified, note that it is relative to the current direction
% of the OpenRAVE executable.
% ClearScene - If 1, then clears the scene before loading. ... |
github | wkentaro/openrave-master | orEnvCreateKinBody.m | .m | openrave-master/octave_matlab/orEnvCreateKinBody.m | 268 | utf_8 | edc7ce0e9075915fc0d71050e30bf167 | % bodyid = orEnvCreateKinBody(name, xmlfile)
function bodyid = orEnvCreateKinBody(name, xmlfile)
out = orCommunicator(['createbody ' name ' ' xmlfile], 1);
%if(strcmp('error',sscanf(out,'%s',1)))
% error('Error creating kinbody');
%end
bodyid = str2double(out); |
github | wkentaro/openrave-master | orEnvGetRobots.m | .m | openrave-master/octave_matlab/orEnvGetRobots.m | 1,028 | utf_8 | 293b2258720e1f8f98089832711730e1 | % robots = orEnvGetRobots()
%
% robots is a cell array of robots
% every cell contains a struct with the following parameters
% id - robotid
% filename - filename used to initialize the body with
% name - human robot name
% type - type of robot
function robots = orEnvGetRobots()
out = orCommunicator('env_g... |
github | wkentaro/openrave-master | orEnvGetBody.m | .m | openrave-master/octave_matlab/orEnvGetBody.m | 306 | utf_8 | ed314e964a17b813a8cf96d9902c3b9f | % id = orEnvGetBody(bodyname)
%
% returns the id of the body that corresponds to bodyname
function id = orEnvGetBody(bodyname)
out = orCommunicator(['env_getbody ' num2str(bodyname)], 1);
%if(strcmp('error',sscanf(out,'%s',1)))
% error('Error getting body');
%end
id = str2double(out); |
github | wkentaro/openrave-master | orEnvSetOptions.m | .m | openrave-master/octave_matlab/orEnvSetOptions.m | 1,773 | utf_8 | c40f4c75d0397155ac0965f3bcd2d41d | % orEnvSetOptions(options)
%
% A string of various environment options. Example usage:
% orEnvSetOptions('publishanytime 1');
%
% Current options:
% - simulation [start/stop] [time_step] - toggles the internal simulation loop, ie all the calls to SimulationStep. If time_step is specified, will set the simulation ... |
github | wkentaro/openrave-master | orBodyGetTransform.m | .m | openrave-master/octave_matlab/orBodyGetTransform.m | 278 | utf_8 | 36e5140e70f986c68bd27eaa8b87c5b7 | % values = orBodyGetTransform(bodyid)
%
% Returns the transformations of all the body's first link as a 12 x 1 matrix.
% (use T=reshape(., [3 4]) to recover).
% T * [X;1] = Xnew
function values = orBodyGetTransform(bodyid)
links = orBodyGetLinks(bodyid);
values = links(:,1); |
github | wkentaro/openrave-master | orRobotControllerSend.m | .m | openrave-master/octave_matlab/orRobotControllerSend.m | 634 | utf_8 | 962ed861b38f7524dac0bfc8e33c11b2 | % success = orRobotControllerSend(robotid, controllercmd)
%
% sends a command to the current controller the robot is connected to.
% OpenRAVE sends directly to ControllerBase::SendCmd,
% ControllerBase::SupportsCmd is also used to check for support.
%
% success - 1 if command was accepted, 0 if not
function success = ... |
github | wkentaro/openrave-master | orRobotSensorGetData.m | .m | openrave-master/octave_matlab/orRobotSensorGetData.m | 2,637 | utf_8 | 43803b28d9a8db42db9fd0a59dea7de6 | % data = orRobotSensorGetData(robotid, sensorindex)
%
% Gets the sensor data. The format returned is dependent on the type
% of sensor. Look at the different data SensorData implementations in rave.h.
% Although the data returned is not necessarily one of them.
% options [optional] - options that specify what type of d... |
github | wkentaro/openrave-master | orEnvRayCollision.m | .m | openrave-master/octave_matlab/orEnvRayCollision.m | 1,339 | utf_8 | a47ce2c53501004379eefa55948778c0 | % [collision, colinfo] = orEnvRayCollision(rays,[bodyid])
%
% performs ray collision checks and returns the position and normals
% where all the rays collide
% rays - a 6xN matrix where the first 3
% rows are the ray position and last 3 are the ray direction
% collision - N dim vector that is 1 for colliding rays... |
github | wkentaro/openrave-master | orEnvLoadPlugin.m | .m | openrave-master/octave_matlab/orEnvLoadPlugin.m | 384 | utf_8 | 38aace597193a89aad3e8f93941045b9 | % success = orEnvLoadPlugin(filename)
%
% Loads a plugin.
% filename - the relative path of the plugin to load. (*.so for linux, *.dll for windows)
function success = orEnvLoadPlugin(filename, ClearScene)
out = orCommunicator(['env_loadplugin ' filename], 1);
%if(strcmp('error',sscanf(out,'%s',1)))
% er... |
github | wkentaro/openrave-master | orBodyEnable.m | .m | openrave-master/octave_matlab/orBodyEnable.m | 375 | utf_8 | b4258b73900cba24403fde335b0857a1 | % success = orBodyEnable(bodyid, enable)
%
% Enables or disables the body. If a body is disabled, collision detection
% and physics will will be turned off for it.
function [] = orBodyEnable(bodyid,enable)
out = orCommunicator(['body_enable ' num2str(bodyid) ' ' num2str(enable)]);
%if(strcmp('error',sscanf(... |
github | wkentaro/openrave-master | orBodyGetJointValues.m | .m | openrave-master/octave_matlab/orBodyGetJointValues.m | 673 | utf_8 | 86d91d26f45eb7b91c8dacc297757be3 | % values = orBodyGetJointValues(bodyid, indices)
%
% Gets the body's dof values in a Nx1 vector where N is the DOF
% bodyid - unique id of the robot
% indices [optional]- The indices of the joints whose values should be returned.
% If not specified, all joints are returned
function values = or... |
github | wkentaro/openrave-master | orRobotGetManipulators.m | .m | openrave-master/octave_matlab/orRobotGetManipulators.m | 2,613 | utf_8 | 65acfc9a6252bfc0e2df091430ec4a37 | % manipulators = orRobotGetManipulators(robotid)
%
% manipulators is a cell array describes the manipulators of the robot
% Each cell is a struct with fields
% baselink - zero-based index of base link manipulator is attached to
% eelink - zero-based index of link defining the end-effector
% Tgrasp - 3x4 matrix of... |
github | wkentaro/openrave-master | orBodyGetAABB.m | .m | openrave-master/octave_matlab/orBodyGetAABB.m | 470 | utf_8 | b02865fd6cf85f374711179352aeb41c | % aabb = orBodyGetAABB(bodyid)
%
% returns an axis-aligned boudning box of the body in world coordinates
% aabb is a 3x2 vector where the first column is the position of the box
% and the second is the extents
function aabb = orBodyGetAABB(bodyid)
command_str = ['body_getaabb ' num2str(bodyid)];
out = orCo... |
github | wkentaro/openrave-master | orProblemSendCommand.m | .m | openrave-master/octave_matlab/orProblemSendCommand.m | 1,179 | utf_8 | 2faaf3da1f051b70e09092dfd1872a90 | % output = orProblemSendCommand(cmd, problemid, envlock,dosync)
%
% Sends a command to the problem. The function doesn't return until
% ProblemInstance::SendCommand returns.
% cmd - the string command to send the problem
% problemid - returned id of the problem, if not specified, then
% com... |
github | wkentaro/openrave-master | orRobotGetDOFValues.m | .m | openrave-master/octave_matlab/orRobotGetDOFValues.m | 750 | utf_8 | 4b2ad61b53e175e6226c0a1b1b90d545 | % values = orRobotGetDOFValues(robotid, indices)
%
% Gets the robot's dof values in a Nx1 vector where N is the DOF
% robotid - unique id of the robot
% indices [optional]- The indices of the joints whose values should be returned.
% If not specified, the active degreees of freedeom set by
% ... |
github | wkentaro/openrave-master | orRobotSetActiveManipulator.m | .m | openrave-master/octave_matlab/orRobotSetActiveManipulator.m | 381 | utf_8 | 7e4fb958b202e2bfbb4dced90a616ac3 | % orRobotSetActiveManipulator(robotid, manipname)
%
% robotid - unique id of the robot
% manipname - manipulator name
function [] = orRobotSetActiveManipulator(robotid, manipname)
command_str = ['robot_setactivemanipulator ' num2str(robotid) ' ' manipname];
out = orCommunicator(command_str);
%if(strcmp('error',sscanf... |
github | wkentaro/openrave-master | orEnvGetBodies.m | .m | openrave-master/octave_matlab/orEnvGetBodies.m | 1,001 | utf_8 | eff1420aa38897ed03427536319af0f0 | % bodies = orEnvGetBodies()
%
% bodies is a cell array of all body objects in the scene
% every cell contains a struct with the following parameters
% id - bodyid
% filename - filename used to initialize the body with
% name - human robot name
% type - xml type of body
function bodies = orEnvGetBodies()
ou... |
github | wkentaro/openrave-master | orEnvCreateRobot.m | .m | openrave-master/octave_matlab/orEnvCreateRobot.m | 469 | utf_8 | 0a2f4f7efc5150daab3b3f0888134cad | % robotid = orEnvCreateRobot(robotname, xmlfile, type)
%
% Creates a robot of the given type. If type is not specified, creates a generic robot
function robotid = orEnvCreateRobot(robotname, xmlfile, type)
if( ~exist('type', 'var') )
type = 'GenericRobot';
end
out = orCommunicator(['createrobot ' robot... |
github | wkentaro/openrave-master | orEnvDestroyProblem.m | .m | openrave-master/octave_matlab/orEnvDestroyProblem.m | 195 | utf_8 | 800e9c1a8c4ffe01ff34f45273b45894 | % orEnvDestroyProblem(problemid)
%
% Destroys problem instance whose id is problemid.
function orEnvDestroyProblem(problemid)
out = orCommunicator(['env_dstrprob ' num2str(problemid)]);
|
github | wkentaro/openrave-master | orEnvCreateModule.m | .m | openrave-master/octave_matlab/orEnvCreateModule.m | 882 | utf_8 | e34876948bc3c7e2f976e9fa2c1b8b45 | % moduleid = orEnvCreateModule(modulename, args, destroyduplicates)
%
% Creates an instance of a module and returns its id for future communicate with it
% modulename - the module name
% args - a string of arguments to send to the module's main function
% destroyduplicates [optional] - if 1, will destroy any previous ... |
github | wkentaro/openrave-master | orEnvStepSimulation.m | .m | openrave-master/octave_matlab/orEnvStepSimulation.m | 458 | utf_8 | 3eda376d060685baea9b4d7458e269d1 | %% success = orEnvStepSimulation(timestep,sync)
%%
%% advances the physics simulation by timestep seconds
%% timestep - seconds to run the simulation for (internal physics engine call)
%% sync - if 0 function will return immediately, if 1 function will wait until step simulation ends
function orEnvStepSimulation(timest... |
github | wkentaro/openrave-master | orRobotSetActiveDOFs.m | .m | openrave-master/octave_matlab/orRobotSetActiveDOFs.m | 1,386 | utf_8 | 7ef98efc4836627ea64f06933a984065 | % orRobotSetActiveDOfs(robotid, indices, affinedofs, rotationaxis)
%
% robotid - unique id of the robot
% indices - zero based indices of the robot joints to activate
% affinedofs [optional] - is a mask of affine transformations to enable
% 1 - X, adds 1 DOF
% 2 - Y, adds 1 DOF
% 4 - Z, adds 1 DOF
% 8 - Rotatio... |
github | wkentaro/openrave-master | orRobotGetActiveDOF.m | .m | openrave-master/octave_matlab/orRobotGetActiveDOF.m | 391 | utf_8 | 33ce16a5932dc4ba13add5d86e62b8e0 | % dof = orRobotGetActiveDOF(robotid)
%
% returns the robot's active degrees of freedom used for planning (not necessary corresponding to joints)
function dof = orRobotGetActiveDOF(robotid)
out = orCommunicator(['robot_getactivedof ' num2str(robotid)], 1);
if(strcmp('error',sscanf(out,'%s',1)))
error(['Unkno... |
github | wkentaro/openrave-master | orRobotStartActiveTrajectory.m | .m | openrave-master/octave_matlab/orRobotStartActiveTrajectory.m | 2,352 | utf_8 | fad1fbd4c139238cf7afe9022fc0a8ec | % orRobotStartActiveTrajectory(robotid, jointvalues, timestamps, transformations)
%
% Starts/Queues a robot trajectory of the robot where the size of
% each trajectory point is the current active degrees of freedom
% of the robot (others are held constants)
% D is the number of active degrees of freedom.
% N is t... |
github | wkentaro/openrave-master | orRobotSensorConfigure.m | .m | openrave-master/octave_matlab/orRobotSensorConfigure.m | 602 | utf_8 | 457b66b7ce2c595dcd795cf29579a132 | % out = orRobotSensorConfigure(robotid, sensorindex, sensorcmd)
%
% sends a command to a sensor attached to the robot
% OpenRAVE sends directly to SensorBase::Configure,
%
% robotid - unique id of the robot
% sensorindex - zero-based index of sensor into robot's attached sensor array
% sensorcmd - One of the SensorBase... |
github | wkentaro/openrave-master | orBodyGetLinks.m | .m | openrave-master/octave_matlab/orBodyGetLinks.m | 539 | utf_8 | 9d8cd37c27b50388bb7850c397dab4bb | % values = orBodyGetLinks(bodyid)
%
% Returns the transformations of all the body's links in a 12 x L matrix. Where L
% is the number of links and each column is a 3x4 transformation
% (use T=reshape(., [3 4]) to recover).
% T * [X;1] = Xnew
function values = orBodyGetLinks(bodyid)
command_str = ['body_getli... |
github | wkentaro/openrave-master | orBodySetTransform.m | .m | openrave-master/octave_matlab/orBodySetTransform.m | 941 | utf_8 | 428c0a208741ebf777ee70e45757a9b4 | % orBodySetTransform(bodyid, translation, quaternion)
% orBodySetTransform(bodyid, [quaternion translation])
% orBodySetTransform(bodyid, transform matrix) (12x1, 1x12, or 3x4)
%
% Set the affine transformation of the body. The transformation actually describes the first
% link of the body. The rest of the links a... |
github | wkentaro/openrave-master | orEnvWait.m | .m | openrave-master/octave_matlab/orEnvWait.m | 987 | utf_8 | 6aaa764102c3f98eb17a3f542647b864 | % success = orEnvWait(robotid, robot_timeout)
%
% wait until all previously sent commands to matlab are finished.
% Since problems are meant to last for a long time orEnvWait waits
% until the problem's main function finishes.
%
% robotid - optional argument. If a robot id is specified, will wait until
% the rob... |
github | wkentaro/openrave-master | orRobotGetDOFLimits.m | .m | openrave-master/octave_matlab/orRobotGetDOFLimits.m | 480 | utf_8 | 3b4093081b7965d6060d9d9ea62d62ac | % values = orRobotGetDOFLimits(robotid)
%
% Gets the robot's dof limits in a Nx2 vector where N is the DOF, the first column
% is the low limit and the second column is the upper limit
function values = orRobotGetDOFLimits(robotid)
out = orCommunicator(['robot_getlimits ' num2str(robotid)], 1);
if(strcmp('err... |
github | wkentaro/openrave-master | orRobotSensorSend.m | .m | openrave-master/octave_matlab/orRobotSensorSend.m | 613 | utf_8 | 66e8230b105487e02e2fe13df670e856 | % out = orRobotSensorSend(robotid, sensorindex, controllercmd,args)
%
% sends a command to a sensor attached to the robot
% OpenRAVE sends directly to SensorBase::SendCmd,
% SensorBase::SupportsCmd is used to check for command support.
%
% robotid - unique id of the robot
% sensorindex - zero-based index of sensor int... |
github | wkentaro/openrave-master | orBodyGetAABBs.m | .m | openrave-master/octave_matlab/orBodyGetAABBs.m | 647 | utf_8 | b6b89f892077363126795010155d1c07 | % aabbs = orBodyGetAABBs(bodyid)
%
% returns the axis-aligned boudning boxes of all the links of the body in world coordinates
% aabbs is a 6xn vector where each column describes the box for all n links.
% The first 3 values in each column describe the position of the aabb, and the next
% 3 values describe the extents ... |
github | wkentaro/openrave-master | orRobotGetAttachedSensors.m | .m | openrave-master/octave_matlab/orRobotGetAttachedSensors.m | 1,576 | utf_8 | a0b784e9cfeed172c6a8be2e99e186ee | % sensors = orRobotGetAttachedSensors(robotid)
%
% sensors is a cell array describing the attached sensors of the robot
% Each cell is a struct with fields:
% name - name of the attached sensor
% link - zero-based index of link sensor is attached to
% Trelative - 3x4 matrix of the relative transform of the camera... |
github | wkentaro/openrave-master | orCommunicator.m | .m | openrave-master/octave_matlab/orCommunicator.m | 2,997 | utf_8 | 10ea891de01c1e7f951a01694c3cfa1c | % communicates with openrave
% orCommunicator uses the current setting in orConnectionParams
% to read the correct ip and port headers
% readline [optional] - if set, will read the output of the command.
% Some commands do not send an output, so the
% function can freeze inde... |
github | wkentaro/openrave-master | orEnvPlot.m | .m | openrave-master/octave_matlab/orEnvPlot.m | 1,933 | utf_8 | 0cbde30d18d1d99e62c22343045bd770 | % figureid = orEnvPlot(points,...)
%
% plots points or lines in the openrave viewer
% points - Nx3 vector of xyz positions
% optional arguments include 'size', 'color', and 'line'
% color - Nx3 vector of RGB values between 0 and 1
% size - Nx1 vector of the sizes in pixels of each point/line
% line (or linestrip)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.