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 | VlagaPalych/Stable-master | QuatToEul.m | .m | Stable-master/Libs/ardupilot-master/libraries/AP_NavEKF/Models/Common/QuatToEul.m | 436 | utf_8 | c19c9235052d99b8b943a7157e83fc94 | % 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 | VlagaPalych/Stable-master | read_log.m | .m | Stable-master/Matlab/Identification/read_log.m | 552 | utf_8 | b33fa398ef88acb623bf67449868d82b | % TIME_StartTime,
% OUT0_Out0,
% OUT0_Out1,
% OUT0_Out2,
% OUT0_Out3,
% OUT0_Out4,
% OUT0_Out5,
% OUT0_Out6,
% OUT0_Out7,
% ATT_qw,
% ATT_qx,
% ATT_qy,
% ATT_qz,
% ATT_Roll,
% ATT_Pitch,
% ATT_Yaw,
% ATT_RollRate,
% ATT_PitchRate,
% ATT_YawRate,
% ATT_GX,
% ATT_GY,
% ATT_GZ
function [ time, pwm1, pwm2, roll, roll_rate... |
github | agusorte/Camera_Calibration_GUI-master | MainGui.m | .m | Camera_Calibration_GUI-master/MainGui.m | 69,068 | UNKNOWN | 4c786193817db340f54951aa1fdfccea |
function varargout = MainGui(varargin)
% MAINGUI M-file for MainGui.fig
% MAINGUI, by itself, creates a new MAINGUI or raises the existing
% singleton*.
%
% H = MAINGUI returns the handle to a new MAINGUI or the handle to
% the existing singleton*.
%
% MAINGUI('CALLBACK',hObject,eventData,han... |
github | agusorte/Camera_Calibration_GUI-master | segment_angle_zx.m | .m | Camera_Calibration_GUI-master/segment_angle_zx.m | 405 | utf_8 | 0e0df4bd4b074c749d8b9ee7de96377d | %segment angle xy
function A_aux=segment_angle_zx(scan,th1,th2,th3,th4)
theta = atan2(scan(:,3),scan(:,1))*180/pi;
indx_ang=find(scan(:,3)<0 );
%angle segmentation
theta(indx_ang)=360+(atan2(scan(indx_ang,3),scan(indx_ang,1))*180/pi);
indx=find((th1<theta & theta<th2) | (... |
github | agusorte/Camera_Calibration_GUI-master | select3d.m | .m | Camera_Calibration_GUI-master/select3d.m | 11,213 | utf_8 | cd4d8b603caaf04385d0d7836cc9dd33 | function [pout, vout, viout, facevout, faceiout] = select3d(obj)
%SELECT3D(H) Determines the selected point in 3-D data space.
% P = SELECT3D determines the point, P, in data space corresponding
% to the current selection position. P is a point on the first
% patch or surface face intersected along the select... |
github | agusorte/Camera_Calibration_GUI-master | segment_angle_xy.m | .m | Camera_Calibration_GUI-master/segment_angle_xy.m | 404 | utf_8 | 23e4710aedde8b194b03f114b80e0291 | %segment angle xy
function A_aux=segment_angle_xy(scan,th1,th2,th3,th4)
theta = atan2(scan(:,2),scan(:,1))*180/pi;
indx_ang=find(scan(:,2)<0 );
%angle segmentation
theta(indx_ang)=360+(atan2(scan(indx_ang,2),scan(indx_ang,1))*180/pi);
indx=find((th1<theta & theta<th2) | (... |
github | agusorte/Camera_Calibration_GUI-master | calibration_laser.m | .m | Camera_Calibration_GUI-master/calibration_laser.m | 740 | utf_8 | 582cd3b7d77c088f8b1f635bd3bb44d3 |
%calibration laser by points
function [x,fval,exitflag,output]=calibration_laser(cam0,options,optim_search)
%only optimize extric parameters
%cam0 =[omc T]
global CALIB_;
switch optim_search
case 1
[x,fval,exitflag,output] = fminsearch('dist_Points2D',cam0,options); %%%%<--- optimise
% ... |
github | agusorte/Camera_Calibration_GUI-master | segment2Degrees.m | .m | Camera_Calibration_GUI-master/segment2Degrees.m | 603 | utf_8 | 8dd46661b148d739620c1032e84ae6d2 | %funtion that segments range data by angle
%by Agustin Ortega
%setember 2010
function data=segment2Degrees(scan)
% Compute angle swept by data in xy plane
theta = atan2(scan(:,2),scan(:,1))*180/pi;
indx_ang=find(scan(:,2)<0);
theta(indx_ang)=360+(atan2(scan(indx_ang,2),scan... |
github | agusorte/Camera_Calibration_GUI-master | view_range_img.m | .m | Camera_Calibration_GUI-master/view_range_img.m | 7,405 | utf_8 | 5e6b9134f4062b0311976e4707f6112d | function varargout = view_range_img(varargin)
% VIEW_RANGE_IMG M-file for view_range_img.fig
% VIEW_RANGE_IMG, by itself, creates a new VIEW_RANGE_IMG or raises the existing
% singleton*.
%
% H = VIEW_RANGE_IMG returns the handle to a new VIEW_RANGE_IMG or the handle to
% the existing singleton*.
%
... |
github | agusorte/Camera_Calibration_GUI-master | points3D2vrml2.m | .m | Camera_Calibration_GUI-master/points3D2vrml2.m | 3,239 | utf_8 | 8cc2f53eb940eb6fd01606a1677e5e6c | %% 3DPOINTS2VRML
%
%% Description
% Author -
% Ernesto Homar Teniente Aviles
% CONACYT Fellow
% Institut de Robotica i Informatica Industrial, CSIC-UPC
% Last change: 06/2010
%
% Usage
% points3D2vrml2(outfile,xyz,rgb)
%
% Variables:
% Inputs:
% outfile - a string, output filename ... |
github | agusorte/Camera_Calibration_GUI-master | dist_Points2D.m | .m | Camera_Calibration_GUI-master/dist_Points2D.m | 552 | utf_8 | 6559e0e9504a4df551ef4909463a9471 |
%calibration laser by points
%Agustin Ortega
%abril 2011
function [D_all]= dist_Points2D(X0)
global CALIB_;
global DATA_;
%only otimiee extrisic parameters
om = X0(1:3);
T = X0(4:6);
% om = x(11:13)';
% T = x(14:16)';
f = CALIB_.fc;
c = CALIB_.cc;
k = CALIB_.kc;
alpha =CALIB_.alpha_c;
X=DATA_.P3D';
x2d... |
github | agusorte/Camera_Calibration_GUI-master | rpyMat.m | .m | Camera_Calibration_GUI-master/Hager/rpyMat.m | 685 | utf_8 | b3324a80385c9ddc0b997a5631ca134d |
% Author: Rodrigo Carceroni
% Disclaimer: This code comes with no guarantee at all and its author
% is not liable for any damage that its utilization may cause.
function R = rpyMat (angs)
% Return the 3x3 rotation matrix described by a set of Roll, Pitch and Yaw
% angles.
cosA = cos (angs(3));
sinA = sin (angs(3... |
github | agusorte/Camera_Calibration_GUI-master | objpose.m | .m | Camera_Calibration_GUI-master/Hager/objpose.m | 6,517 | utf_8 | dc59e2917948c873cd6b7e5e023a2614 | function [R, t, it, obj_err, img_err] = objpose(P, Qp, options)
% OBJPOSE - Object pose estimation
% OBJPOSE(P, Qp) compute the pose (exterior orientation)
% between the 3D point set P represented in object space
% and its projection Qp represented in normalized image
% plane. It implements the algorithm desc... |
github | agusorte/Camera_Calibration_GUI-master | get2ndPose_Exact.m | .m | Camera_Calibration_GUI-master/Schweighofer/get2ndPose_Exact.m | 1,662 | utf_8 | 279c3611d83fb0b5ae3064d2b6479259 | function sol=get2ndPose_Exact(v,P,R,t,DB)
%function bet=get2ndPose_Exact(v,P,R,t)
%
%returns the second pose if a first pose was calulated.
%
% Author: Gerald Schweighofer gerald.schweighofer@tugraz.at
% Disclaimer: This code comes with no guarantee at all and its author
% is not liable for any damage that its utili... |
github | agusorte/Camera_Calibration_GUI-master | objpose.m | .m | Camera_Calibration_GUI-master/Schweighofer/objpose/objpose.m | 6,518 | utf_8 | bf44d92084f392803df324c09104f0a0 | function [R, t, it, obj_err, img_err] = objpose(P, Qp, options)
% OBJPOSE - Object pose estimation
% OBJPOSE(P, Qp) compute the pose (exterior orientation)
% between the 3D point set P represented in object space
% and its projection Qp represented in normalized image
% plane. It implements the algorithm desc... |
github | agusorte/Camera_Calibration_GUI-master | rpyMat.m | .m | Camera_Calibration_GUI-master/Schweighofer/util/rpyMat.m | 685 | utf_8 | b3324a80385c9ddc0b997a5631ca134d |
% Author: Rodrigo Carceroni
% Disclaimer: This code comes with no guarantee at all and its author
% is not liable for any damage that its utilization may cause.
function R = rpyMat (angs)
% Return the 3x3 rotation matrix described by a set of Roll, Pitch and Yaw
% angles.
cosA = cos (angs(3));
sinA = sin (angs(3... |
github | agusorte/Camera_Calibration_GUI-master | rpyAng.m | .m | Camera_Calibration_GUI-master/Schweighofer/util/rpyAng.m | 1,184 | utf_8 | 1ae147340c1474c625e3a56cb5ef871c |
% Author: Rodrigo Carceroni
% Disclaimer: This code comes with no guarantee at all and its author
% is not liable for any damage that its utilization may cause.
function angs = rpyAng (R)
% Returns a set of Roll, Pitch and Yaw angles that describe a certain 3x3
% transformation matrix. The magnitude of the Pitch ... |
github | csinva/neuronforest-analysis-scripts-master | evaluate_predictions.m | .m | neuronforest-analysis-scripts-master/matscripts/evaluate_predictions.m | 8,532 | utf_8 | d61e09d206adeb5130ae894d5b76cafd | function evaluate_predictions(files, dims, description, root)
initial_thresholds_pixel = 0:.1:1.0;
min_step = 0.002;
initial_thresholds_rand = .96:.01:1;
% min_step = 0.1;
f = fopen([root '/errors_new.txt'], 'w');
saveAndPrint(f, 'Description:\n%s\n\n', description);
[p_thresholds, p_er... |
github | csinva/neuronforest-analysis-scripts-master | calcGrads.m | .m | neuronforest-analysis-scripts-master/src/main/matlab/calcGrads.m | 6,352 | utf_8 | 3d0bd1d88a736de7f8d8f6672e03e541 | function calcGrads()
%% gradients at each step
%{
iterations = {'21','41'};
n = length(iterations);
preds = {};
%load labels
path = ['/groups/turaga/home/singhc/neuronforest-spark/mnt/predictions/smallGrads/malis/gradient1/big1a/0/split_555/'];
load([path '000/dims.txt']);
label... |
github | alvarouc/ica_gsl-master | basicICA_test.m | .m | ica_gsl-master/others/basicICA_test.m | 3,368 | utf_8 | f16e9274d2224fedc1653bb2b57110e3 |
function [AA,W, icasig_tmp,tcorr]=basicICA_test(icadata,numOfPC,repN,extraICAOptions, reference,projection)
%extraICAOptions = {'verbose','off','lrate',1e-5};
% tempVar = ones(size(icadata, 1), 1)*mean(icadata);
% icadata = icadata - tempVar;
% clear tempVar;
if ~exist('repN','var')
r... |
github | rlafoy/matlab_camera_simulation-master | display_calculation_progress.m | .m | matlab_camera_simulation-master/display_calculation_progress.m | 5,692 | utf_8 | 25aeb5dcd8cf5d15d6e89953cc1d1f3b | function display_calculation_progress(current_value,value_vector);
% This function displays a progress bar showing the percent complete of the
% currently running calculation where the calculation is being iterated
% over the vector 'value_vector' and the current iteration's value is equal
% to 'current_value'. For ex... |
github | rlafoy/matlab_camera_simulation-master | perform_ray_tracing_03.m | .m | matlab_camera_simulation-master/perform_ray_tracing_03.m | 82,996 | utf_8 | 000c8cbd0f3856edec6bf4057eaede56 | function I=perform_ray_tracing_03(piv_simulation_parameters,optical_system,pixel_gain,scattering_data,scattering_type,lightfield_source);
% This function calculates the ray tracing of the input lightrays
% generating the output image 'I'.
%
% This version is similar to version 01 except that it generates the rays
% in ... |
github | rlafoy/matlab_camera_simulation-master | run_piv_simulation_02.m | .m | matlab_camera_simulation-master/run_piv_simulation_02.m | 57,481 | utf_8 | b0058651a9c1a6b829eed8446ca9831b | function run_piv_simulation_02(piv_simulation_parameters);
% This function runs a PIV simulation using the thick lens, non-paraxial
% camera simulation.
% % This creates the simulation parameters for running the simulation
% piv_simulation_parameters=create_piv_simulation_parameters_02;
% This creates the optical sys... |
github | HuifangWang/MULAN-master | Guide_MULAN.m | .m | MULAN-master/Guide_MULAN.m | 39,695 | utf_8 | 89dac5bc45895f1b8e8c103973f704ad | function varargout = Guide_MULAN(varargin)
% Guide_MULAN MATLAB code for Guide_MULAN.fig
% Guide_MULAN, by itself, creates a new Guide_MULAN or raises the existing
% singleton*.
%
% H = Guide_MULAN returns the handle to a new Guide_MULAN or the handle to
% the existing singleton*.
%
% Guide_MUL... |
github | HuifangWang/MULAN-master | mln_calc_FalseRate.m | .m | MULAN-master/Calculation/mln_calc_FalseRate.m | 3,063 | utf_8 | 3b800a39ade27e343b27981b7009ba1c | %%function [ih,f0,f1,Fpr,Tpr,Fnr,pFDR,t,auc,flag_use,th_offcut_roc]=calc_FalseRate(iM,Standard_Net,issymetricM)
% Huifang Wang, April, 2012, Inserm U1106
% Huifang, Sep.,12; updated;
% Huifang, 21, Feb; cutoff of auc
%th_offcut_roc=[th,iFPR,iTPR];
function varargout =mln_calc_FalseRate(iM,Standard_Net,issymetricM,issa... |
github | HuifangWang/MULAN-master | awt_freqlist.m | .m | MULAN-master/Calculation/awt_freqlist.m | 3,922 | utf_8 | e2bcf0b479cc742700314ddc722ab8cc | function [wt,freqlist,psi_array] = awt_freqlist(x,Fs,freqlist,type,xi)
% awt_freqlist analytical wavelet transform, where one can specify the list of desired frequencies
%
% [wt,freqlist,psi_array] = awt_freqlist(x,Fs,freqlist,type,xi)
%
% Inputs:
% x the signal to be analyzed
% Fs ... |
github | HuifangWang/MULAN-master | getcc.m | .m | MULAN-master/Calculation/getcc.m | 1,428 | utf_8 | ad8d7bba21a5ea4d1720901399dbf9fc | function [cross, coh]=getcc(cfs1,cfs2,varargin)
%%%% get the cross spectrum and coherence from
nbIN = nargin;
% Parameters for Smoothing (Width of Windows).
flag_SMOOTH = true;
NSW = [];
NTW = [];
% Number of arrows and flag for plots.
if nbIN>2
nbIN = nbIN-2;
k = 1;
while k<=nbIN
argNAM = var... |
github | HuifangWang/MULAN-master | mln_icalcMatTE.m | .m | MULAN-master/Calculation/mln_icalcMatTE.m | 2,126 | utf_8 | 28fa1b3ae5bfbf4dbcdf9e8b46f5138d | function Mat=mln_icalcMatTE(lfp,maxlag)
%% this function is used to calculate the Transfer Entropy with time
%% delay
% Nov, 13, Huifang Wang Marseille based on Andrea Brovelli's code
[nchan,lengthx]=size(lfp);
BTED=zeros(nchan,nchan,maxlag);
for tau=1:maxlag;
ind_tx=[tau+1:lengthx]';
ind_tx=repmat(ind_tx... |
github | HuifangWang/MULAN-master | mln_Result2file.m | .m | MULAN-master/Calculation/mln_Result2file.m | 1,757 | utf_8 | 6422b71a3db9283b640cfda6fc9370fa | %% change the format of results
% Huifang Wang Marseille
function mln_Result2file(dirname,dataprenom,GroupMethlog)
datafile=[dirname,'/data/',dataprenom,'.mat'];
%GroupMethlog={'TimeBasic','FreqBasic','Hsquare','Granger','FreqAH','MutualInform'};
is3dimemsion=[1,0,1,1,0,1,1];
for igroup=1:length(GroupMethlog)
Resu... |
github | HuifangWang/MULAN-master | mln_icalcMatMITime.m | .m | MULAN-master/Calculation/mln_icalcMatMITime.m | 2,296 | utf_8 | f784115746ad0cf0703d218b2eb8545b | function Mat=icalcMatMITime(lfp,params)
%% this function is used to calculate the mutual Inforamtion with time
%% delay
% June, 12, Huifang Wang Marseille
maxlag=params.MaxDelay;
bins=params.bins;
[nchan,ntime]=size(lfp);
BMITD2=zeros(nchan,nchan,maxlag+1);
BMITD1=zeros(nchan,nchan,maxlag+1);
for tau=0:maxlag;
... |
github | HuifangWang/MULAN-master | cca_regress.m | .m | MULAN-master/Calculation/cca_regress.m | 3,087 | utf_8 | 556413b4867425b37e3ef22a33d11d2c | % -----------------------------------------------------------------------
% FUNCTION: cca_regress.m
% PURPOSE: perform multivariate regression
%
% INPUT: X - nvar (rows) by nobs (cols) observation matrix
% NLAGS - number of lags to include in model
% STATFLAG - ... |
github | HuifangWang/MULAN-master | MulanCal.m | .m | MULAN-master/Calculation/MulanCal.m | 3,205 | utf_8 | 053b36e18e737826e3f69d8036097c2a |
function MulanCal(dirname,dataprenom,calParams,VGroupMethlog)
% Huifang Wang, Marseille, August 18, 2013, Calculate all methods
datafile=[dirname,'/data/',dataprenom,'.mat'];
data=load(datafile);
Params=data.Params;
%% load the data
if exist(datafile,'file')
try
prevar = load(datafile);
... |
github | HuifangWang/MULAN-master | cca_partialgc.m | .m | MULAN-master/Calculation/cca_partialgc.m | 4,334 | utf_8 | a54c0fd96265fc619cff7ea0b70d28de | function ret = cca_partialgc(X,nlags,STATFLAG)
% -----------------------------------------------------------------------
% FUNCTION: cca_partialgc.m
% PURPOSE: perform multivariate regression with partial granger
% causality
%
% INPUT: X - nvar (rows) by nobs (cols) observation ma... |
github | HuifangWang/MULAN-master | mvfilter.m | .m | MULAN-master/Calculation/mvfilter.m | 3,257 | utf_8 | 3fc31c523fb294b2a361793460d2b482 |
function [x,z]=mvfilter(B,A,x,z)
% Multi-variate filter function
%
% Y = MVFILTER(B,A,X)
% [Y,Z] = MVFILTER(B,A,X,Z)
%
% Y = MVFILTER(B,A,X) filters the data in matrix X with the
% filter described by cell arrays A and B to create the filtered
% data Y. The filter is a 'Direct Form II Transposed'
% implemen... |
github | HuifangWang/MULAN-master | mln_plotROCcurve.m | .m | MULAN-master/Interface/mln_plotROCcurve.m | 510 | utf_8 | 858cf3e47b133ec0b578a169af8cabab | %% function plot ROC
function plotROCcurve(Fpr,Tpr,auc,ha2)
cla(ha2);
rf=[0,1];
%hold on
Fpr=[Fpr;0]; %% put the [0,0] as the beginning point to be drew
Tpr=[Tpr;0];
plot(Fpr,Tpr,'g-','linewidth',2,'parent',ha2);
set(ha2,'NextPlot','add');
plot(rf,rf,'parent',ha2);
%set(get(ha2,'XLabel'),'String','False positive rate '... |
github | HuifangWang/MULAN-master | mln_Result2fileSV.m | .m | MULAN-master/Interface/mln_Result2fileSV.m | 2,151 | utf_8 | 6642a8ebbda7988cdb288df26fbf70b4 | %% change the format of results
% Huifang Wang Marseille
% single file for choose GroupMethlog
function filesaved=mln_Result2fileSV(dirname,dataprenom,GroupMethlog)
datafile=[dirname,'/data/',dataprenom];
%GroupMethlog={'TimeBasic','FreqBasic','Hsquare','Granger','FreqAH','MutualInform'};
for igroup=1:length(GroupMeth... |
github | HuifangWang/MULAN-master | GUI_Preprocess.m | .m | MULAN-master/Interface/GUI_Preprocess.m | 6,565 | utf_8 | 87cd52d132ccef8d8cdab00f8d300d89 | function varargout = GUI_Preprocess(varargin)
% GUI_PREPROCESS MATLAB code for GUI_Preprocess.fig
% GUI_PREPROCESS, by itself, creates a new GUI_PREPROCESS or raises the existing
% singleton*.
%
% H = GUI_PREPROCESS returns the handle to a new GUI_PREPROCESS or the handle to
% the existing singleton... |
github | HuifangWang/MULAN-master | mln_statesplot.m | .m | MULAN-master/Interface/mln_statesplot.m | 1,996 | utf_8 | 49722a3eff69cc5c5a960a6eaf20c5a4 | function mln_statesplot(lfp,Params,delay)
Nchan=size(lfp,1);
%% if Number of channels is larger than 6, we divided the figures with each
%% one less or equals 6x6
NumberChanforPage=6;
Npage=(floor(Nchan/NumberChanforPage)+1);
if isempty(find(strncmpi(fieldnames(Params),'str',3)==1,1));
str=1:Nchan;
else
str=Params.... |
github | HuifangWang/MULAN-master | MULAN_gen_data.m | .m | MULAN-master/Interface/MULAN_gen_data.m | 5,978 | utf_8 | 42ce9721c1240a26fc89f0d0bb7233d8 | function varargout = MULAN_gen_data(varargin)
% MULAN_GEN_DATA M-file for MULAN_gen_data.fig
% MULAN_GEN_DATA, by itself, creates a new MULAN_GEN_DATA or raises the existing
% singleton*.
%
% H = MULAN_GEN_DATA returns the handle to a new MULAN_GEN_DATA or the handle to
% the existing singleton*.
%
... |
github | HuifangWang/MULAN-master | mln_showNetworkGraph.m | .m | MULAN-master/Interface/mln_showNetworkGraph.m | 9,768 | utf_8 | 2b98375ffc5fb3cc8a3d8ffa6f23cec9 | %This one for show the small
function mln_showNetworkGraph(cnM,ha,thresholdnw,Params)
if isempty(cnM)
return;
end
Nchannel = size(cnM,1);
% winmean=params.Winmean;
% fs=params.fs;
% band=params.band;
% colorline=band(iband).color;
%nodenames=[];
if ~isempty(find(strncmpi(fieldnames(Params),'str',3)==1,1))
no... |
github | HuifangWang/MULAN-master | GUIevaluationROC2.m | .m | MULAN-master/Interface/GUIevaluationROC2.m | 8,782 | utf_8 | 83f15fb9ada37df54161258a3f282918 | function varargout = GUIevaluationROC2(varargin)
% GUIEVALUATIONROC2 M-file for GUIevaluationROC2.fig
% GUIEVALUATIONROC2, by itself, creates a new GUIEVALUATIONROC2 or raises the existing
% singleton*.
%
% H = GUIEVALUATIONROC2 returns the handle to a new GUIEVALUATIONROC2 or the handle to
% the ex... |
github | HuifangWang/MULAN-master | mln_showAUC.m | .m | MULAN-master/Evaluation/mln_showAUC.m | 2,634 | utf_8 | 92e563ad228a701729704dc6b50cf80c | %% show the results
% show the AUC array for varying the number of windows
% Huifang Wang Feb 7, 2014, Demo for demonstrate the AUC array and Boxplot in the paper
function mln_showAUC
load('ExAUCnmmN5L5.mat','AUCall','Informa')
colormapnowall=colormap(lines);
cs=Informa.cs;
is=Informa.is;
model=Informa.model;
dcs=60;
... |
github | HuifangWang/MULAN-master | mln_MethodStructuresAUC.m | .m | MULAN-master/Evaluation/mln_MethodStructuresAUC.m | 1,478 | utf_8 | 85b4f979ccad1d74e578c52bccfb13cf | % Huifang Wang, Sep. 26, 2013
% Huifang Wang, Nov. 26, 2013 update Method Structure AUC for mlnI
function flg=mln_MethodStructuresAUC(dirname,prenom)
flg=0; % flg for the error
filename=['./',dirname,'/ToutResults/Tout_',prenom,'.mat'];
calresult=load(filename);
fieldname=fieldnames(calresult);
% remove params and ... |
github | HuifangWang/MULAN-master | mln_generate_rossler.m | .m | MULAN-master/GenerateData/mln_generate_rossler.m | 3,633 | utf_8 | 334a908e3aebe1d64fe946c310667975 | % make connectivity simulations for Rossler systems
%% this function is used to generate the henon map nonlinear systems with
%%% noise and delay
%% Huifang Wang Sep. 4, 2012
function [dataname,flgLFP]=mln_generate_rossler(dirname,prename,npts,strfile,is,cs,odelay,flag_noise,SNR)
dataname=[prename,'rosslerCS',num2str(1... |
github | HuifangWang/MULAN-master | mln_generate_linear.m | .m | MULAN-master/GenerateData/mln_generate_linear.m | 2,597 | utf_8 | 540e62fd92c792312611ab571cd20fa9 | % make connectivity simulations for superAR
function [dataname,flag_LFP]=mln_generate_linear(dirname,prename,npts,strfile,is,cs,delaydelay)
% Huifang Wang based on the code from Christian Benar
% test for MVAR modelling
% MVAR simulation code coming from demo7 from biosig toolbox
dataname=[prename,'linearCS',num2str(10... |
github | HuifangWang/MULAN-master | mln_generate_henon.m | .m | MULAN-master/GenerateData/mln_generate_henon.m | 2,372 | utf_8 | 3013ec634b0178c9d3255f54fc9c5ca7 | % make connectivity simulations for Henon systems
%% this function is used to generate the henon map nonlinear systems with
%%% noise and delay
%% Huifang Wang Sep. 4, 2012
function [dataname,flg]=mln_generate_henon(dirname,prename,npts,strfile,is,cs,odelay,flag_noise,SNR)
dataname=[prename,'henonCS',num2str(100*cs),'... |
github | HuifangWang/MULAN-master | spm_diff.m | .m | MULAN-master/GenerateData/spm_diff.m | 4,767 | utf_8 | ed40b5ea2e85046895ec2e9e70f4a987 | function [varargout] = spm_diff(varargin)
% matrix high-order numerical differentiation
% FORMAT [dfdx] = spm_diff(f,x,...,n)
% FORMAT [dfdx] = spm_diff(f,x,...,n,V)
% FORMAT [dfdx] = spm_diff(f,x,...,n,'q')
%
% f - [inline] function f(x{1},...)
% x - input argument[s]
% n - arguments to differentiate w.... |
github | HuifangWang/MULAN-master | spm_erp_L.m | .m | MULAN-master/GenerateData/spm_erp_L.m | 3,838 | utf_8 | d272a989f0e0a3b8dd3f98a941016faa | function [L] = spm_erp_L(P,M)
% returns [projected] lead field L as a function of position and moments
% FORMAT [L] = spm_erp_L(P,M)
% P - model parameters
% M - model specification
% L - lead field
%__________________________________________________________________________
%
% The lead field (L) is constructed usin... |
github | HuifangWang/MULAN-master | mln_CalEvaN.m | .m | MULAN-master/ClusterComputation/mln_CalEvaN.m | 2,099 | utf_8 | 49c8303ead32a2af7b638484523e7210 |
function mln_CalEvaN(dirname,prenom,strfile,paramsfile,nc,is,npts,cs,models)
% Generate the data, calucate the connection methods by all given methods and evalution the results by AUC.
% dirname: the folder to store all files
% prenom: spectial name for new datasets
% strfile: the file stores the structures
% Paramsfi... |
github | thinktube-kobe/airtube-master | echo_diagnostic.m | .m | airtube-master/AndroidLibrary/jni/speex/speex-1.2rc1/libspeex/echo_diagnostic.m | 2,076 | utf_8 | 8d5e7563976fbd9bd2eda26711f7d8dc | % Attempts to diagnose AEC problems from recorded samples
%
% out = echo_diagnostic(rec_file, play_file, out_file, tail_length)
%
% Computes the full matrix inversion to cancel echo from the
% recording 'rec_file' using the far end signal 'play_file' using
% a filter length of 'tail_length'. The output is saved to 'o... |
github | DCS-LCSR/CeleST-master | uipickfiles.m | .m | CeleST-master/uipickfiles.m | 49,724 | utf_8 | 32d565c6ebf3c9ec9cfe872d560ab29b | function out = uipickfiles(varargin)
%uipickfiles: GUI program to select files and/or folders.
%
% Syntax:
% files = uipickfiles('PropertyName',PropertyValue,...)
%
% The current folder can be changed by operating in the file navigator:
% double-clicking on a folder in the list or pressing Enter to move furt... |
github | OceanOptics/MISCToolbox-master | need_npqc.m | .m | MISCToolbox-master/need_npqc.m | 1,683 | utf_8 | 00db91d74bc7cc58483ef963561145b0 | function [ need_qc, sun_elevation ] = need_npqc( dt, lat, lon, min_sun_elevation )
%NEED_NPQC Determine if the profile need a quenching correction
% Base on a model of the sun elevation
%
% Inputs:
% Required:
% dt double date and time UTC in matlab datenum format
% lat double containing latitude
% ... |
github | OceanOptics/MISCToolbox-master | correct_npq.m | .m | MISCToolbox-master/correct_npq.m | 10,102 | utf_8 | f26d9addb47a32c6ac2cc8cc1ca4451c | function [ fchl_qc, qc_delta ] = correct_npq( fchl, z, start_npqc, optimize_start_qc, varargin )
%CORRECT_NPQ apply a non photochemical quenching (NPQ) correction on fl
%
% Inputs:
% Required:
% fchl Nx1 array of double containing a profile of fluorescence chlorphyll (mg.m^-3)
% z Nx1 array of double ... |
github | dan-fern/WavesMPC-master | PSD_BandAve.m | .m | WavesMPC-master/waves/fourier/PSD_BandAve.m | 1,371 | utf_8 | 996be2c47a4445ec0cf2382ce22f39a5 | % This function band averages Spectral values. The averageing is done with
% non-overlapping band averages. The band averaging also does not include
% the 0 frequency.
%
% Inputs: [Sj] = Power Spectral density
% [fj] = Fourier frequencies that your PSD is calculated at.
% [M] = The number of degree... |
github | dan-fern/WavesMPC-master | fft_CI.m | .m | WavesMPC-master/waves/fourier/fft_CI.m | 1,512 | utf_8 | 87af4f3c4a1967e6a6d4f0780659f6c2 | % This function determines the confidence intervals for Spectral estimates.
%
% Inputs: [S] = Power Spectral density
% [M] = Degrees of freedom (2 for no band-averaging, 2*number of
% frequencies averaged otherwise)
% CI = Confidence for your estimate (e.g. 95 means 95 percent
% ... |
github | dan-fern/WavesMPC-master | ftt_freq.m | .m | WavesMPC-master/waves/fourier/ftt_freq.m | 485 | utf_8 | 0c38a6f303d508c327b65871039f4cab | % This function calculates the fourier frequencies that will be output by
% the fft function in matlab
%
% Inputs: [N] = Number of samples in the record
% [dt] = Sampling Interval
%
% Outputs: [CI_bnds] = Fourier Frequencies for which fft will output data.
%
%%%%%%%%%%%%%%%%%%
% Kai Parker
% May 2nd, 2015
%%%... |
github | dan-fern/WavesMPC-master | pr_corr.m | .m | WavesMPC-master/support/garbage/pr_corr.m | 7,093 | utf_8 | 9fbeb4ad309f4854c853cbeda234342f | function H=pr_corr(pt,h,Fs,zpt,M,Corr_lim)
% Correct a sea surface time-series for depth attenuation of pressure.
%
% SURFACE = PR_CORR(PT,H,Fs,Zpt,M,frequ_lim)
%
% Input: PT = sea surface elevation time series (detrended)
% H = mean water depth (m)
% Fs = sampling frequency (Hz)
% Zpt = height... |
github | dan-fern/WavesMPC-master | wavesp.m | .m | WavesMPC-master/support/garbage/wavesp.m | 8,562 | utf_8 | e3f00f4e59e87ab6d7d6446f0090a82a | function [res,names,spect] = wavesp(PT,Zpt,Fs,varargin) % Corr_lim,Noseg,option)
% Spectral wave-parameters from PT data after correction of the pressure attenuation
%
% WAVESP(PT,Zpt,Fs,Corr_lim,Noseg,option)
% RES = WAVESP...
% [RES, NAMES] = WAVESP...
% [RES, NAMES, SPECT] = WAVESP...
%
% Input: PT = ar... |
github | scivision/em-sfm-main | demo_face.m | .m | em-sfm-main/demo_face.m | 1,178 | utf_8 | 1b94939c461b768d62b4afc23c51f709 | % Shark Demo
%
% Copyright (c) by Lorenzo Torresani, Stanford University
%
% A demo of Non-Rigid Structure From Motion on artificial face sequence
%
%
% The 3D reconstruction technique is based on the following paper:
%
% Lorenzo Torresani, Aaron Hertzmann and Christoph Bregler,
% Learning Non-Rigid 3... |
github | scivision/em-sfm-main | findG.m | .m | em-sfm-main/findG.m | 1,189 | utf_8 | 7a08fb05d7f963782c20cd0194f2458f | function G = findG(Rhat)
[F,D] = size(Rhat); F = F/2;
% Build matrix Q such that Q * v = [1,...,1,0,...,0] where v is a six
% element vector containg all six distinct elements of the Matrix C
%clear Q
for f = 1:F,
g = f + F;
h = g + F;
Q(f,:) = zt2(Rhat(f,:), Rhat(f,:));
Q(g,:) = zt2(Rhat(g,:), Rhat(g,:));
... |
github | scivision/em-sfm-main | demo_walking.m | .m | em-sfm-main/demo_walking.m | 1,185 | utf_8 | 7f306333a88f645a07168238015e0d1c | % Shark Demo
%
% Copyright (c) by Lorenzo Torresani, Stanford University
%
% A demo of Non-Rigid Structure From Motion on artificial walking sequence
%
%
% The 3D reconstruction technique is based on the following paper:
%
% Lorenzo Torresani, Aaron Hertzmann and Christoph Bregler,
% Learning Non-Rigi... |
github | scivision/em-sfm-main | demo_shark.m | .m | em-sfm-main/demo_shark.m | 1,123 | utf_8 | 93ba773939d5bce68186d90b6a2874b1 | % Shark Demo
%
% Copyright (c) by Lorenzo Torresani, Stanford University
%
% A demo of Non-Rigid Structure From Motion on artificial shark sequence
%
%
% The 3D reconstruction technique is based on the following paper:
%
% Lorenzo Torresani, Aaron Hertzmann and Christoph Bregler,
% Learning Non-Rigid ... |
github | Shibabrat/ship-dynamics-partial-control-master | extractor.m | .m | ship-dynamics-partial-control-master/extractor.m | 313 | utf_8 | 5203f75b9725d3a661fe19ece5924ddd | % This subroutine computes the four indexes of the a grid of points that
% surround a point 'q' with coordinates 'x' and 'y'.
function [j1,j2,k1,k2]=extractor(N,xi,xf,yi,yf,x,y)
j=((x-xi)*(N-1)/(xf-xi))+1;
k=((y-yi)*(N-1)/(yf-yi))+1;
j1=floor(j);
j2=ceil(j);
k1=floor(k);
k2=ceil(k);
|
github | Shibabrat/ship-dynamics-partial-control-master | func_get_image.m | .m | ship-dynamics-partial-control-master/func_get_image.m | 2,510 | utf_8 | e7818ea0b76116407743b65830b8a56a | function [imagePtsInPhaseSpace, grid_points_image] = ...
func_get_image(ptsInPhaseSpace, grid_points_base)
%
% Shibabrat Naik, Last modified: 26 April 2015
%
returnMapTime = zeros(size(grid_points_base,3),1);
trajs = struct([]);
grid_points_image = zeros(1,3,size(grid_points_b... |
github | Shibabrat/ship-dynamics-partial-control-master | fatten.m | .m | ship-dynamics-partial-control-master/fatten.m | 789 | utf_8 | 4825ae04f2b2fa66ba43f23b45881d81 | % This subroutine carries out the fatten operation that it is needed to compute a safe set.
function set_plus_control=fatten(N,grid_points_base, boundary_index,indexes_control)
[filas_frontera,columnas_frontera]=size(boundary_index);
[filas_indexes_control,columnas_indexes_control]=size(indexes_control... |
github | Shibabrat/ship-dynamics-partial-control-master | in_boundary_comp.m | .m | ship-dynamics-partial-control-master/in_boundary_comp.m | 1,029 | utf_8 | 2a5bcc2e1aa3a0c7c00dc1c3a4a78aa0 | % This subroutine computes the boundary of the set grid_points_fatten after
% fattening it.
function boundary_index=in_boundary_comp(N, grid_points_fatten)
w=1;
boundary_index=zeros(N*N,2);
for j=1:N
for k=1:N
if(grid_points_fatten(1,3,j,k)==0)
if(j>1 && k>1 && j<N && ... |
github | Shibabrat/ship-dynamics-partial-control-master | in_boundary.m | .m | ship-dynamics-partial-control-master/in_boundary.m | 3,548 | utf_8 | dc2a48632855e3dcf4d785976219a622 | % This subroutine computes the boundary of the set grid_points_base before
% fattening it.
function boundary_indexes=in_boundary(N,grid_points_base)
w=1;
boundary_indexes=zeros(N*N,2);
for j=1:N
for k=1:N
if(grid_points_base(1,3,j,k)==1)
if(j>1 && k>1 && j<N && k<N)
... |
github | Shibabrat/ship-dynamics-partial-control-master | cutter.m | .m | ship-dynamics-partial-control-master/cutter.m | 1,025 | utf_8 | ea80da8e9e985e25badf10faa7dd078a | % This subroutine cuts the parts of grid_points_base that do not satisfy
% the property of a safe set.
function grid_points_cutted=cutter(N,grid_points_base,grid_points_image,grid_points_shrink,xi,xf,yi,yf)
grid_points_cutted=grid_points_base;
for j=1:N
for k=1:N
if(grid_points_base(1,3,j,k)==... |
github | Shibabrat/ship-dynamics-partial-control-master | func_get_eqpt_boat_roll.m | .m | ship-dynamics-partial-control-master/func_get_eqpt_boat_roll.m | 846 | utf_8 | b5d01dfca631eb37deacec87c7011211 | function func_get_saddle_eqpts
% Parameters for Edith Terkol
alpha0 = 0.73;
omegaN = 0.62;
omegaE = 0.527;
lambda = 221.94;
H = 4.94;
b(1) = 0.0043;
b(2) = 0.0225;
c(1) = 0.384;
c(2) = 0.1296;
c(3) = 1.0368;
c(4) = -4.059;
c(5) = 2.4052;
c = c./omegaN^2;
b = b... |
github | Shibabrat/ship-dynamics-partial-control-master | func_get_traj_random_waves.m | .m | ship-dynamics-partial-control-master/func_get_traj_random_waves.m | 2,468 | utf_8 | 3b5a38153147228ff0f9ab29aab41960 | function [tOut,xOut] = func_get_traj_random_waves(x)
%FUNC_GET_TRAJ_RANDOM_WAVES obtains trajectories for the ship roll model
%with random wave forcing. A simple linear interpolation is done for the
%generated wave during integration.
%
% Shibabrat Naik
%
global H chi
%Paramters for sea waves
% H = 4.94;
% ... |
github | Shibabrat/ship-dynamics-partial-control-master | shrink.m | .m | ship-dynamics-partial-control-master/shrink.m | 773 | utf_8 | cd613735f7e8160fec776ec935c560eb | % This subroutine carries out the shrinking operation that it is needed to compute a safe set.
function grid_points_shrink=shrink(N,grid_points_fatten,boundary_index,noise_indexes)
[rows_frontera,columns_frontera]=size(boundary_index);
[rows_noise_indexes,columns_noise_indexes]=size(noise_indexes);
... |
github | Shibabrat/ship-dynamics-partial-control-master | index.m | .m | ship-dynamics-partial-control-master/index.m | 2,153 | utf_8 | 721f1c5f478f49ad1cfacf72ad1e32ae | % This subroutine computes the relative indexes that will allow to access all the
% points that are within a distance u_0 or \xi_0 of a given point q of the grid of points.
% Also generates figures for the index of control and disturbance
function [indexes_disturbance,indexes_control]=index(N,clusterFlag,grid_po... |
github | Shibabrat/ship-dynamics-partial-control-master | func_get_eqpt_ship_roll.m | .m | ship-dynamics-partial-control-master/func_get_eqpt_ship_roll.m | 1,352 | utf_8 | b70f7ba55aa7111de9543020080e7294 | function eqPt = func_get_eqpt_ship_roll(eqNum)
%FUNC_GET_EQPT_SHIP_ROLL computes the equilibrium points for the unforced
% ship roll model taken from Soliman, Thompson[1991]
% input:
% eqNum: index of the equilibrium point with 1 as the left eq.
% pt and 2 as the right equilibrium point
% ou... |
github | Shibabrat/ship-dynamics-partial-control-master | func_get_image_rect.m | .m | ship-dynamics-partial-control-master/func_get_image_rect.m | 3,014 | utf_8 | 79717bd9a1b3196ebe30e41bea21029b | function grid_points_image = func_get_image_rect(e,R,grid_points_base)
%FUNC_GET_IMAGE_RECT computes the image of the points in a rectangular
%domain stored in the 4-D array under the map f.
%Inputs:
% e,R: Energy of the tube, ratio of pitch/roll natural
% frequencies
% grid_points_base: Initial... |
github | Shibabrat/ship-dynamics-partial-control-master | iteration_boundary.m | .m | ship-dynamics-partial-control-master/asymptotic-sculpting-set/iteration_boundary.m | 3,844 | utf_8 | 73d9250e9f354ce4994b40f580585a41 | % This subroutine computes the boundary of the forward iteration of the
% set sored in in grid_points_iteration. It stores the indexes of the
% elements of the boundary in boundary_index.
function boundary_index=iteration_boundary(N,grid_points_iteration)
w=1;
boundary_index=zeros(N*N,2);
for j=1:N... |
github | Shibabrat/ship-dynamics-partial-control-master | iteration_extractor.m | .m | ship-dynamics-partial-control-master/asymptotic-sculpting-set/iteration_extractor.m | 579 | utf_8 | 861924ed6a2fd2245df8406d9b0085c6 | % This subroutine computes the indexes of the closest point of the grid to
% the point 'q' with coordinates 'x' and 'y' that are passed as arguments.
function [xo,yo]=iteration_extractor(N,xi,xf,yi,yf,x,y)
j=((x-xi)*(N-1)/(xf-xi))+1;
k=((y-yi)*(N-1)/(yf-yi))+1;
j1=floor(j);
j2=ceil(j);
k1=floor... |
github | Shibabrat/ship-dynamics-partial-control-master | iteration.m | .m | ship-dynamics-partial-control-master/asymptotic-sculpting-set/iteration.m | 844 | utf_8 | 0f9b69ef45f96774fe7cfea815647019 | % This subroutine computes the forward iteration of the
% intermediate set. It uses the fourth element of the vector
% grid_points_asymptotic(1,4,j,k), to indicate if a particular point of the grid
% is part of the foward iteration or not. If it is '1' then is contained in
% the forward iteration, if it is '0' it i... |
github | Shibabrat/ship-dynamics-partial-control-master | index.m | .m | ship-dynamics-partial-control-master/asymptotic-sculpting-set/index.m | 1,129 | utf_8 | e177c5abf6039f3bf88cd86220c484c3 | % This subroutine computes the relative indexes that will allow to access all the
% points that are within a distance u_0+\xi_0 of a given point q of the grid of points.
function indexes_bound=index(N,grid_points_base,disturbance,control);
format long;
n=1;
center_point=floor(N/2);
indexes=zeros(N^2,2);... |
github | Shibabrat/ship-dynamics-partial-control-master | intersection.m | .m | ship-dynamics-partial-control-master/asymptotic-sculpting-set/intersection.m | 533 | utf_8 | 5f620f209e0b5796153636c907191d30 | % This subroutine computes the intersection between the reachable points of
% the forward iteration and the original safe set.
function grid_points_asymptotic=intersection(N,grid_points_base,grid_points_reachable)
grid_points_asymptotic=grid_points_base;
for j=1:N
for k=1:N
if(grid_points_b... |
github | Shibabrat/ship-dynamics-partial-control-master | iteration_fatten.m | .m | ship-dynamics-partial-control-master/asymptotic-sculpting-set/iteration_fatten.m | 971 | utf_8 | 0ebe3ebe8079b6715c1a0f7376d63226 | % This subroutine carries out the fatten operation of the forward
% iteration. It only needs to perform the operation to pass as arguments,
% the indexes of the boundary and the relative indexes of a ball of radius
% disturbance plus control.
function grid_points_reachable=iteration_fatten(N,grid_points_it... |
github | razvanmarinescu/graphical_models-master | p12_2.m | .m | graphical_models-master/cw4/p12_2.m | 978 | utf_8 | bdd99b8da9cf39ef9f82f40383bc6f9b | function p12_2()
load('dodder2.mat')
[K, ~] = size(x)
maxM = 1;
maxV = -inf;
for M=1:2^K-1
binM = binary2vector(M,K);
xTemp = x(binM,:);
[dimX,~] = size(xTemp);
A = eye(dimX);
b = zeros(dimX, 1);
for t=1:T-1
A = A + xTemp(:,t) * xTemp(:,t)' / sigma2(t+1);
b = b + y(t+1) * xTemp... |
github | razvanmarinescu/graphical_models-master | p23_4.m | .m | graphical_models-master/cw4/p23_4.m | 2,385 | utf_8 | 8ac0acb30da73e70db31765a70d643af | function p23_4()
%DEMOHMMBIGRAM demo of HHM for the bigram typing scenario
import brml.*
load freq % http://www.data-compression.com/english.shtml
l = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',' '};
load typing % get the A transition and B emission mat... |
github | razvanmarinescu/graphical_models-master | demoSampleHMM.m | .m | graphical_models-master/cw4/demoSampleHMM.m | 2,074 | utf_8 | 6ca0431381a1cd4e0ead2b8b7ed89e93 | function p27_6()
end
function sampleHMM(lambda)
%DEMOSAMPLEHMM demo of Gibbs sampling from a HMM versus exact result
fprintf(1,'Draw samples from p(h(1:T)|v(1:T)) for a HMM.\nUse these to form empirical estimates of p(h(t)|v(1:T)) and compare to the exact p(h(t)|v(1:T))\n\n')
import brml.*
H=2; V=2; T=10;
% ... |
github | razvanmarinescu/graphical_models-master | p27_9.m | .m | graphical_models-master/cw4/p27_9.m | 2,278 | utf_8 | cda8c7caf0f201fe1002afb0f1332059 | function p27_9()
load('soccer.mat')
games = game; % rename variable to games
[~, G] = size(game); % nr of games
P=20; % nr of players
L=5; % nr of levels
pA=ones(P,L) .* 1/L;
pB=ones(P,L) .* 1/L;
iterations = 200;
for i=1:iterations
i
% for each player go through all the games in wh... |
github | razvanmarinescu/graphical_models-master | p27_6.m | .m | graphical_models-master/cw4/p27_6.m | 2,420 | utf_8 | 81dde4f93623f73615abc5b79f0e950b | function p27_6()
R = 20;
lambdas=[0.1, 1, 10, 20];
L = length(lambdas);
errors = zeros(R,1);
avg_err = zeros(L,1);
for l=1:L
fprintf('lambda %d\n', l)
for run=1:R
errors(run) = sampleHMM(lambdas(l));
end
avg_err(l) = mean(errors);
end
avg_err
save('p27_6_errors2.mat', 'a... |
github | razvanmarinescu/graphical_models-master | exerciseInvest.m | .m | graphical_models-master/cw3/exerciseInvest.m | 3,850 | utf_8 | 556cf4fb41c709623942ee3b58ac2190 | function exerciseInvest
import brml.*
pars.WealthValue=0:0.2:5; % these are the possible states that wealth can take
pars.epsilonAval=[0 0.01]; % these are the possible states that price A change by
pars.epsilonBval=[-0.12 0 0.15]; % these are the possible states that price A change by
% for example, if we use ... |
github | razvanmarinescu/graphical_models-master | prob913.m | .m | graphical_models-master/cw3/prob913.m | 1,200 | utf_8 | a136eb982507bc82c4cec1435f818099 | function prob913()
import brml.*
load('chowliudata.mat')
A = ChowLiu(X);
end
function A = ChowLiu(X)
import brml.*
[D,N] = size(X)
pX = cell(D,1);
pXX = cell(D,D);
nrStates = 3;
states = 1:nrStates
for i=1:D
indicesI = [(X(i,:) == 1); (X(i,:) == 2); (X(i,:) == 3)];
tmpTable = sum(indicesI,2);
pX{i... |
github | razvanmarinescu/graphical_models-master | prob91.m | .m | graphical_models-master/cw3/prob91.m | 7,048 | utf_8 | dbe748b8d7a68d6d6c551b0588ff1099 | function prob91()
%part1()
part3()
end
function part1()
import brml.*
load('printer.mat')
[nr_nodes, nr_visits] = size(x);
x = x-ones(nr_nodes, nr_visits);
[fuse drum toner paper roller burn quality wrinkled mult jam] = assign(1:nr_nodes);
pots = cell(nr_nodes,1);
% define the... |
github | razvanmarinescu/graphical_models-master | raz_cw3.m | .m | graphical_models-master/cw3/raz_cw3.m | 5,741 | utf_8 | 3773127815b691e765b2f4058abc30c1 | function [] = raz_cw3()
prob74a()
prob74b()
end
function [] = prob74a()
load('airplane.mat')
import brml.*
%DEMOMDP demo of solving Markov Decision Process on a grid
import brml.*
[Gx Gy] = size(U); % two dimensional grid size
S = Gx*Gy; % number of states on grid
st = reshape(1:S,Gx,Gy); % assign each grid point... |
github | razvanmarinescu/graphical_models-master | scripts.m | .m | graphical_models-master/cw2/scripts.m | 18,796 | utf_8 | 638bd457d1ebdf30d4f3ca5caeedba1c | function scripts()
%prob57()
%prob67()
%prob120()
%prob69()
%- checked, gives correct result
%pro69cv2()
%prob513()
%prob59()
prob511()
end
function prob120()
len = 10;
grid = zeros(len, len); % in each cell (i,j) contains how many possible scenarios exist where it is occupied by any of the boats
boatLen = 5;... |
github | razvanmarinescu/graphical_models-master | raz_probs.m | .m | graphical_models-master/cw1/raz_probs.m | 10,155 | utf_8 | 20f98ebf77be777a67e070def757df7f | function [] = raz_probs()
%prob313()
%prob314()
%prob322()
%prob26()
%extra1()
prob322var2()
end
function [dec] = cliqueToDec(clique)
%binarray = zeros(10,1);
dec = 0;
for i=1:10
if (ismember(i, clique))
%binarray(i) = 1
dec = dec + 2^(10-i);
end
end
end
%% prob 2.6
function [] = prob26()
l... |
github | humnetlab/IndividualMobilityModel-master | PowerLawPlotWeighted.m | .m | IndividualMobilityModel-master/PowerLawPlotWeighted.m | 1,316 | utf_8 | 0679a9a08821e11c1b3aaa6b96f5a0fb | %loglog plot
function [x_ nbins_]=PowerLawPlotWeighted(m_data,marker,color,min_cut,max_cut,unit_bins)
if nargin < 6
unit_bins=10;
end
if nargin < 5
max_cut = 9999999;
end
if nargin <4
min_cut =0.0000001;
end
index=find(m_data(:,1)>min_cut&m_data(:,1)<max_cut);
m_data=m_data(index,:);
unit_bins=10;
max_data=m... |
github | humnetlab/IndividualMobilityModel-master | PowerLawPlot.m | .m | IndividualMobilityModel-master/PowerLawPlot.m | 1,177 | utf_8 | 19abd5bef383a967289d28b878b7df59 | %loglog plot
function PowerLawPlot(m_data,marker,color,min_cut,max_cut,unit_bins)
if nargin < 6
unit_bins=10;
end
if nargin < 5
max_cut = 9999999;
end
if nargin <4
min_cut =0.0000001;
end
index=find(m_data>min_cut&m_data<max_cut);
m_data=m_data(index);
max_data=max(m_data);
min_data=min(m_data);
max_order=ce... |
github | NadineKroher/essentia-master | DetectPeaks.m | .m | essentia-master/test/src/descriptortests/tuning/DetectPeaks.m | 1,325 | utf_8 | c64072c666d438b9c9c181f2e5aba663 | % Function for peak detection
% Adaptations made to work with HPCP by emilia, 28-03-2007
function [ploc, pval]=DetectPeaks(spectrum, nPeaks)
% function DetectPeaks(spectrum)
% Inputs:
% spectrum: dB spectrum magnitude (abs(fft(signal))
% nPeaks: maximum number of peaks to pick
% Outputs:
% ploc: bin ... |
github | NTCColumbia/ntc_CNMF-master | interp_missing_data.m | .m | ntc_CNMF-master/interp_missing_data.m | 744 | utf_8 | db12d4c51a71a6cf53e8f04e40827629 |
function Y_interp = interp_missing_data(Y)
% interpolate missing data using linear interpolation for each pixel
% produce a sparse matrix with the values
sizY = size(Y);
dimY = length(sizY);
d = prod(sizY(1:dimY-1));
T = sizY(end);
mis_data = cell(d,1);
for i = 1:d
[ii,jj,kk] = ind2sub(sizY(1:dimY-1),i);
... |
github | NTCColumbia/ntc_CNMF-master | lars_regression_noise.m | .m | ntc_CNMF-master/lars_regression_noise.m | 7,310 | utf_8 | 57b6188ceb2fc027c7e65b5a96aac472 | function [Ws, lambdas, W_lam, lam, flag] = lars_regression_noise(Y, X, positive, noise)
% run LARS for regression problems with LASSO penalty, with optional positivity constraints
% Author: Eftychios Pnevmatikakis. Adapted code from Ari Pakman
% Input Parameters:
% Y: Y(:,t) is the observed data at time ... |
github | NTCColumbia/ntc_CNMF-master | f_signalExtraction_dfof.m | .m | ntc_CNMF-master/f_signalExtraction_dfof.m | 3,173 | utf_8 | dd0d5cd3984f92046666a05629c69b91 | % this program extract df/f
function [ signal_inferred, signal_filtered, signal_raw, signal_inferred_DC, signal_filtered_DC, signal_raw_DC,Y_fres ] = f_signalExtraction_dfof(Y,A,C,b,f,d1,d2,backgroundSubtractionforRaw,baselineRatio)
T = size(C,2);
if ndims(Y) == 3
Y = reshape(Y,d1*d2,T);
end
nr = size(A,2); %... |
github | NTCColumbia/ntc_CNMF-master | greedyROI2d.m | .m | ntc_CNMF-master/greedyROI2d.m | 5,442 | utf_8 | b877b7e7eb03f99b0f7d8008bf364a35 | function [basis, trace, center, data] = greedyROI2d(data, K, params)
%greedyROI2d using greedy algorithm to identify neurons in 2d calcium movie
%
%Usage: [basis, trace, center, res] = greedyROI2d(data, K, params)
%
%Input:
%data M x N x T movie, raw data, each column is a vectorized movie
%K number ... |
github | NTCColumbia/ntc_CNMF-master | greedyROI2d_ROIList.m | .m | ntc_CNMF-master/greedyROI2d_ROIList.m | 5,712 | utf_8 | 818b3c28af8114f845d0d45e7bd8ce1c | function [basis, trace, center, data] = greedyROI2d_ROIList(data, K, params, ROIList)
%greedyROI2d using greedy algorithm to identify neurons in 2d calcium movie
%
%Usage: [basis, trace, center, res] = greedyROI2d(data, K, params)
%
%Input:
%data M x N x T movie, raw data, each column is a vectorized movie
%K... |
github | NTCColumbia/ntc_CNMF-master | greedyROI2d_multiscale.m | .m | ntc_CNMF-master/greedyROI2d_multiscale.m | 8,289 | utf_8 | 122cf71e85924dcd91b0d493b6e297d4 | function [basis, trace, center, data] = greedyROI2d_multiscale(data, K, K2, params)
%greedyROI2d using greedy algorithm to identify neurons in 2d calcium movie
%
%Usage: [basis, trace, center, res] = greedyROI2d(data, K, params)
%
%Input:
%data M x N x T movie, raw data, each column is a vectorized movie
%K ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.