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
tsajed/nmr-pred-master
secularity.m
.m
nmr-pred-master/spinach/kernel/legacy/secularity.m
437
utf_8
4dececf297c793c5ecc049c8cc08358f
% A trap for legacy function calls. % % i.kuprov@soton.ac.uk function secularity(varargin) % Direct the user to the new function error('This function is deprecated, use assume() instead.'); end % You told us you would release Spinach on 1 October 2011 and you actually % released Spinach on 1 October 20...
github
tsajed/nmr-pred-master
contour_plot.m
.m
nmr-pred-master/spinach/kernel/legacy/contour_plot.m
597
utf_8
0a8656a515a8827cca670b531c450d13
% A trap for legacy function calls. % % i.kuprov@soton.ac.uk function contour_plot(varargin) % Direct the user to the new function error('This function is deprecated, use plot_2d() instead.'); end % According to a trade legend, Uhlenbeck and Goudsmit (students of % Ehrenfest when they stumbled upon an e...
github
tsajed/nmr-pred-master
combnk.m
.m
nmr-pred-master/spinach/kernel/external/combnk.m
1,407
utf_8
9e6b7b79ccf707597f84b82264aee2da
% All combinations of the N elements in V taken K at a time. % C = COMBNK(V,K) produces a matrix, with K columns. Each row of C has % K of the elements in the vector V. C has N!/K!(N-K)! rows. K must be % a nonnegative integer. % % Copyright 1993-2004 The MathWorks, Inc. % $Revision: 2.12.2.2 $ $Date: 20...
github
tsajed/nmr-pred-master
phantom3d.m
.m
nmr-pred-master/spinach/kernel/external/phantom3d.m
7,917
utf_8
54651ef6f65a0fe3d1d5e068339b469b
% Three-dimensional analogue of MATLAB Shepp-Logan phantom. Generates a 3D % head phantom that can be used to test 3-D reconstruction algorithms. % % DEF is a string that specifies the type of head phantom to generate. % Valid values are: % % 'Shepp-Logan' A test image used widely by rese...
github
tsajed/nmr-pred-master
lgwt.m
.m
nmr-pred-master/spinach/kernel/external/lgwt.m
1,126
utf_8
ac4205aaceb3726f4eea42d9460d9ec6
% This script is for computing definite integrals using Legendre-Gauss % Quadrature. Computes the Legendre-Gauss nodes and weights on an interval % [a,b] with truncation order N % % Suppose you have a continuous function f(x) which is defined on [a,b] % which you can evaluate at any x in [a,b]. Simply evaluate i...
github
tsajed/nmr-pred-master
b2r.m
.m
nmr-pred-master/spinach/kernel/external/b2r.m
1,889
utf_8
20310193c425104c056c7e75205b86af
% Blue -> white -> red color map. White always corresponds % to value zero. % % Cunjie Zhang % Ilya Kuprov function newmap=b2r(cmin,cmax) % Check the input if nargin~=2 error('incorrect number of input arguments.') end if cmin>=cmax error('the first argument must be smaller than the second one....
github
tsajed/nmr-pred-master
jacobianest.m
.m
nmr-pred-master/spinach/kernel/external/jacobianest.m
5,840
utf_8
4c955378155f9dffa7cf48c2abaab7d7
function [jac,err] = jacobianest(fun,x0) % gradest: estimate of the Jacobian matrix of a vector valued function of n variables % usage: [jac,err] = jacobianest(fun,x0) % % % arguments: (input) % fun - (vector valued) analytical function to differentiate. % fun must be a function of the vector or array x0. % %...
github
tsajed/nmr-pred-master
expv.m
.m
nmr-pred-master/spinach/kernel/external/expv.m
4,863
utf_8
c8732ae90e0aa822b4d89d0835ebf115
% [w, err, hump] = expv( t, A, v, tol, m ) % EXPV computes an approximation of w = exp(t*A)*v for a % general matrix A using Krylov subspace projection techniques. % It does not compute the matrix exponential in isolation but instead, % it computes directly the action of the exponential operator on the % operan...
github
tsajed/nmr-pred-master
fourdif.m
.m
nmr-pred-master/spinach/kernel/external/fourdif.m
2,782
utf_8
a00d709f10e1499cbbbdaad00c7907a4
% The function [x, DM] = fourdif(N,m) computes the m'th derivative Fourier % spectral differentiation matrix on grid with N equispaced points in [0,2pi) % % Input: % N: Size of differentiation matrix. % M: Derivative required (non-negative integer) % % Output: % x: Equispaced points 0, 2pi/N...
github
tsajed/nmr-pred-master
simps.m
.m
nmr-pred-master/spinach/kernel/external/simps.m
3,044
utf_8
f3d545adb2c382d803770cbc778b8c92
% Simpson's numerical integration. % % Z = SIMPS(Y) computes an approximation of the integral of Y using % Simpson's method (with unit spacing). To compute the integral for % spacing different from one, multiply Z by the spacing increment. % % For vectors, SIMPS(Y) is the integral of Y. For matrices, SIMPS(Y) %...
github
unamfi/Cuantizacion-vectorial-master
LPCC.m
.m
Cuantizacion-vectorial-master/LPCC.m
2,289
utf_8
3352b9c3cd158718279a760df20b0e89
%% LPCC function LPCCres = LPCC(s) [R LPC p] = lpc(s); Q = 3*p/2; for i=1:1:length(LPC) C = zeros(1,Q+1); C(1) = log(sqrt(R{i}(1))); for m=1:Q if m>=1 && m<=p C(m+1)=LPC{i}(m); for k=1:m-1 ...
github
unamfi/Cuantizacion-vectorial-master
Itakura.m
.m
Cuantizacion-vectorial-master/Itakura.m
97
utf_8
a77eac098d163cc4aa6e1add2ecccb08
%% ITAKURA function d = Itakura(y,Ry,x) d = log((x*Ry*transpose(x))/(y*Ry*transpose(y)));
github
unamfi/Cuantizacion-vectorial-master
kMedias.m
.m
Cuantizacion-vectorial-master/kMedias.m
1,202
utf_8
ef907879c1d603d0e3a63604aae4a1e7
%% K-MEDIAS function centroides = kMedias(vectores,k) for i = 1:k z{i} = vectores{i}; zAnt{i} = zeros(1,length(vectores{i})); end while notEqual(z,zAnt,k) zAnt = z; display('entro') for vector = 1:length(vectores) ...
github
shuoli-robotics/ppzr-master
dialog.m
.m
ppzr-master/sw/logalizer/dialog.m
34,826
utf_8
5407ab492113a3d0358e62c19dc1feab
%-------------------------------------------------------------------- %A simple MATLAB GUI for paparazzi autopilot log-file plotting %Paparazzi Project [http://www.nongnu.org/paparazzi/] %by Roman Krashhanitsa 28/10/2005 %adjustable parabeters: % maxnum - increase if dialog window hangs up or doesnt refresh % Nres - nu...
github
shuoli-robotics/ppzr-master
dialog.m
.m
ppzr-master/sw/logalizer/matlab_log/dialog.m
41,728
utf_8
8a40368512745e70d158a49ee08c5926
%-------------------------------------------------------------------- %A simple MATLAB GUI for paparazzi autopilot log-file plotting %Paparazzi Project [http://www.nongnu.org/paparazzi/] %by Roman Krashhanitsa 28/10/2005 %adjustable parabeters: % maxnum - increase if dialog window hangs up or doesnt refresh % Nres - nu...
github
shuoli-robotics/ppzr-master
tilt.m
.m
ppzr-master/sw/logalizer/matlab/tilt.m
3,005
utf_8
28f19a8ce44283009a8f4ba0410e4c0b
% % this is a 2 states kalman filter used to fuse the readings of a % two axis accelerometer and one axis gyro. % The filter estimates the angle and the gyro bias. % % function [angle, bias, rate, cov] = tilt(status, gyro, accel) TILT_UNINIT = 0; TILT_PREDICT = 1; TILT_UPDATE = 2; persistent tilt_angle; %...
github
shuoli-robotics/ppzr-master
theta_of_accel.m
.m
ppzr-master/sw/logalizer/matlab/theta_of_accel.m
186
utf_8
a68d408f14dcafd800965d810c91c1c1
% % return pitch angle from an accelerometer reading % under assumption that acceleration is vertical % function [theta] = theta_of_accel(accel) theta = -asin( accel(1) / norm(accel));
github
shuoli-robotics/ppzr-master
eulers_of_quat.m
.m
ppzr-master/sw/logalizer/matlab/eulers_of_quat.m
334
utf_8
aa4e8f9fcedb41872e29eb098aefa7d3
% % initialise euler angles from a quaternion % function [eulers] = eulers_of_quat(quat) q0 = quat(1); q1 = quat(2); q2 = quat(3); q3 = quat(4); phi = atan2(2*(q2*q3 + q0*q1), (q0^2 - q1^2 - q2^2 + q3^2)); theta = asin(-2*(q1*q3 - q0*q2)); psi = atan2(2*(q1*q2 + q0*q3), (q0^2 + q1^2 - q2^2 - q3^2)); eulers = [phi t...
github
shuoli-robotics/ppzr-master
synth_data.m
.m
ppzr-master/sw/logalizer/matlab/synth_data.m
923
utf_8
c23bbe3eb4319edf0890fc9bc4b033c2
% % build synthetic data % function [t, rates, quat] = synth_data(dt, nb_samples) t_end = dt * (nb_samples - 1); t = 0:dt:t_end; rates = zeros(3, nb_samples); omega_q = 15; amp_q = 2; osc_start = floor(nb_samples/2); osc_end = floor(osc_start+2*pi/(omega_q*dt)); for idx=osc_start:osc_end rates(2, idx) = -amp_q*(...
github
shuoli-robotics/ppzr-master
theta_of_quat.m
.m
ppzr-master/sw/logalizer/matlab/theta_of_quat.m
182
utf_8
1b15a8391b14bd82c12a4031d009657c
% % initialise euler angles from a quaternion % function [theta] = theta_of_quat(quat) q0 = quat(1); q1 = quat(2); q2 = quat(3); q3 = quat(4); theta = asin(-2*(q1*q3 - q0*q2));
github
shuoli-robotics/ppzr-master
synth_imu.m
.m
ppzr-master/sw/logalizer/matlab/synth_imu.m
382
utf_8
eb83cb7d22000974d367cc96ef11e37f
% % build synthetic imu data % function [gyro, accel, mag] = synth_imu(rates, quat) nb_samples = length(rates); g_ned = [ 0 0 258.3275]; h_ned = [ 166.8120 0.0 203.3070]; for idx = 1:nb_samples dcm = dcm_of_quat(quat(:, idx)); accel(:, idx) = sim_accel(g_ned, dcm); mag(:, idx) = sim_mag(h_n...
github
shuoli-robotics/ppzr-master
sfun_ahrs.m
.m
ppzr-master/sw/logalizer/matlab/sfun_ahrs.m
7,062
utf_8
738df5f0b69d65203e9e7dea9d2b8c41
function [sys,x0,str,ts] = sfun_ahrs(t,x,u,flag) AHRS_UNINIT = 0; AHRS_STEP_PHI = 1; AHRS_STEP_THETA = 2; AHRS_STEP_PSI = 3; persistent ahrs_state; persistent ahrs_quat; % first four elements of our state persistent ahrs_biases;% last three elements of our state persistent ahrs_rates; % we get unbiased body...
github
shuoli-robotics/ppzr-master
quat_of_eulers.m
.m
ppzr-master/sw/logalizer/matlab/quat_of_eulers.m
629
utf_8
8783ebf9fadbb74652d2a366c9064c02
% % initialise a quaternion from euler angles % function [quat] = quat_of_eulers(eulers) phi2 = eulers(1) / 2.0; theta2 = eulers(2) / 2.0; psi2 = eulers(3) / 2.0; sinphi2 = sin( phi2 ); cosphi2 = cos( phi2 ); sintheta2 = sin( theta2 ); costheta2 = cos( theta2 ); sinpsi2 = sin( psi2 ); cospsi2 = c...
github
shuoli-robotics/ppzr-master
dcm_of_quat.m
.m
ppzr-master/sw/logalizer/matlab/dcm_of_quat.m
481
utf_8
b9950e5f461f13427a7c670158a92c14
% % initialise a DCM from a quaternion % function [dcm] = dcm_of_quat(quat) q0 = quat(1); q1 = quat(2); q2 = quat(3); q3 = quat(4); dcm00 = q0^2 + q1^2 - q2^2 - q3^2; dcm01 = 2 * (q1*q2 + q0*q3); dcm02 = 2 * (q1*q3 - q0*q2); dcm10 = 2 * (q1*q2 - q0*q3); dcm11 = q0^2 - q1^2 + q2^2 - q3^2; dcm12 = 2 * (q2*q3 + q0*q1);...
github
shuoli-robotics/ppzr-master
ahrs.m
.m
ppzr-master/sw/logalizer/matlab/ahrs.m
4,335
utf_8
5723f910e49a91fc556660bc06826fa8
function [quat, biases] = ahrs(status, gyro, accel, mag) AHRS_UNINIT = 0; AHRS_STEP_PHI = 1; AHRS_STEP_THETA = 2; AHRS_STEP_PSI = 3; persistent ahrs_quat; persistent ahrs_biases; persistent ahrs_rates; persistent ahrs_P; % covariance matrix persistent ahrs_Q; % estimate noise variance ahrs_dt = 0.01...
github
shuoli-robotics/ppzr-master
range_meter_accel_kalman.m
.m
ppzr-master/sw/logalizer/matlab/range_meter_accel_kalman.m
2,603
utf_8
e73c363bd661f2f111583fc707bf8fde
% % % % function [sys,x0,str,ts] = range_meter_accel_kalman(t,x,u,flag) period = 0.015625; persistent X; % state (Z, Zdot, Zdotdot) persistent P; % error covariance switch flag, %%%%%%%%%%%%%%%%%% % Initialization % %%%%%%%%%%%%%%%%%% case 0, X=[0. 0. 0.]'; P=[1. 0. 0. 0. 1. 0. ...
github
shuoli-robotics/ppzr-master
psi_of_quat.m
.m
ppzr-master/sw/logalizer/matlab/psi_of_quat.m
205
utf_8
821c1b678bcc85fbf97dd6fe3a1b3e3d
% % initialise euler angles from a quaternion % function [psi] = psi_of_quat(quat) q0 = quat(1); q1 = quat(2); q2 = quat(3); q3 = quat(4); psi = atan2(2*(q1*q2 + q0*q3), (q0^2 + q1^2 - q2^2 - q3^2));
github
shuoli-robotics/ppzr-master
phi_of_quat.m
.m
ppzr-master/sw/logalizer/matlab/phi_of_quat.m
205
utf_8
577a048517be0669ac35e0f7fc8f3b30
% % initialise euler angles from a quaternion % function [phi] = phi_of_quat(quat) q0 = quat(1); q1 = quat(2); q2 = quat(3); q3 = quat(4); phi = atan2(2*(q2*q3 + q0*q1), (q0^2 - q1^2 - q2^2 + q3^2));
github
shuoli-robotics/ppzr-master
phi_of_accel.m
.m
ppzr-master/sw/logalizer/matlab/phi_of_accel.m
175
utf_8
7f341eaa185852c295e0a3d39219d885
% % returns roll angle from an accelerometer reading % under assumption that acceleration is vertical % function [phi] = phi_of_accel(accel) phi = atan2(accel(2), accel(3));
github
shuoli-robotics/ppzr-master
dcm_of_eulers.m
.m
ppzr-master/sw/logalizer/matlab/dcm_of_eulers.m
607
utf_8
d49ff8d4658100d798e02d14b725d7b8
% % initialise a DCM from a set of eulers % function [dcm] = dcm_of_eulers(eulers) phi = eulers(1); theta = eulers(2); psi = eulers(3); dcm00 = cos(theta) * cos(psi); dcm01 = cos(theta) * sin(psi); dcm02 = -sin(theta); dcm10 = sin(phi) * sin(theta) * cos(psi) - cos(phi) * sin(psi); dcm11 = sin(phi) * sin(theta) * si...
github
shuoli-robotics/ppzr-master
psi_of_mag.m
.m
ppzr-master/sw/logalizer/matlab/psi_of_mag.m
1,076
utf_8
04a2ed36a67c0a29c793684357f7f95d
% % return yaw angle from a magnetometer reading, knowing roll and pitch % % The rotation matrix to rotate from NED frame to body frame without % rotating in the yaw axis is: % % [ 1 0 0 ] [ cos(Theta) 0 -sin(Theta) ] % [ 0 cos(Phi) sin(Phi) ] [ 0 1 0 ] % [ 0 -sin(Phi) cos(Phi)...
github
shuoli-robotics/ppzr-master
normalize_quat.m
.m
ppzr-master/sw/logalizer/matlab/normalize_quat.m
84
utf_8
059325b9c340c1295d2d86b71c7f0d02
function [quat_out] = normalize_quat(quat_in) quat_out = quat_in / norm(quat_in);
github
shuoli-robotics/ppzr-master
plot_prop.m
.m
ppzr-master/sw/logalizer/matlab/plot_prop.m
1,636
utf_8
a1b37b753e6331884f03d5edc92a7ad1
% % plot a serie of measures realised with the black 10*4.5 prop % function [] = plot_prop() rpm = [ 2800 3350 3720 4450 5250 ]; thrust_g = [ 122 175 219 310 445 ]; torque_g = [ 10 16 19 26 44 ]; omega = rpm / 60 * 2 * pi; omega_square = omega.^2; thrust_n = thrust_g .* (...
github
shuoli-robotics/ppzr-master
eulers_ahrs.m
.m
ppzr-master/sw/logalizer/matlab/eulers_ahrs.m
3,448
utf_8
ff18ecc6efcad8ecea4cb1c04b4153e3
function [eulers, biases] = eulers_ahrs(status, gyro, accel, mag, dt) AHRS_UNINIT = 0; AHRS_PREDICT = 1; AHRS_UPDATE_PHI = 2; AHRS_UPDATE_THETA = 3; AHRS_UPDATE_PSI = 4; persistent ahrs_eulers; persistent ahrs_biases; persistent ahrs_rates; persistent ahrs_P; if (status == AHRS_UNINIT) [ahrs_eul...
github
shuoli-robotics/ppzr-master
eulers_of_quat.m
.m
ppzr-master/sw/airborne/test/ahrs/plot/eulers_of_quat.m
789
utf_8
e5d898a1c84e280d2b3097f8a270c990
%% EULERS OF QUATERNION % % [euler] = eulers_of_quat(quat) % % transposes a quaternion to euler angles function [euler] = eulers_of_quat(quat) algebra_common; if size(quat)(2)==4 quat = quat'; transpose = 1; end dcm00 = 1.0 - 2*(quat(Q_QY,:).*quat(Q_QY,:) + quat(Q_QZ,:).*quat(Q_QZ,:)); dcm01 ...
github
shuoli-robotics/ppzr-master
unwrap.m
.m
ppzr-master/sw/airborne/test/ahrs/plot/unwrap.m
360
utf_8
88eb2f76dedb25dfbdeb635ff1af9f1e
%% unwrap % % [unwraped] = unwrap(wraped) % % function [unwraped] = unwrap(wraped) unwraped = zeros(length(wraped), 1); cnt = 0; for i=2:length(wraped) dif = wraped(i) - wraped(i-1); if (dif > pi/2) cnt=cnt-1; elseif (dif <-pi/2) cnt=cnt+1; end unwraped(i) =...
github
shuoli-robotics/ppzr-master
deg_of_rad.m
.m
ppzr-master/sw/airborne/test/ahrs/plot/deg_of_rad.m
124
utf_8
b8cf99172588f77a253dd84982a9d2e7
%% degres of radians % % [deg] = deg_of_rad(rad) % % function [deg] = deg_of_rad(rad) deg = rad * 180 / pi; endfunction
github
wpisailbot/boat-master
MovableBallastSimulation.m
.m
boat-master/control/matlab/MovableBallastSimulation.m
8,602
utf_8
6afbd0132248cfbb2917460b1eed281a
function MovableBallastSimulation(x0, phigoal) global Vmax ka ks kssq ku kf J Jmb rightingweight; global Kfast Kslow pgoal; pgoal = phigoal; stage1 = 16/64; stage2 = 16/64; G = stage1 * stage2; Vmax = 12; mbmass = 10; J = 12 * 1.2^2; % kg * m^2 Jmb = mbmass * .7^2; % kg * m^2 MBMotorStallTorque = 9.8 / G; % N-m MBMoto...
github
Yadaizi/LLC-image-classification-master
sp_find_sift_grid.m
.m
LLC-image-classification-master/sift/sp_find_sift_grid.m
4,187
utf_8
029daeb5a3d4d49bb26b0e1a64cc4b97
function sift_arr = sp_find_sift_grid(I, grid_x, grid_y, patch_size, sigma_edge) % parameters num_angles = 8; num_bins = 4; num_samples = num_bins * num_bins; alpha = 9; if nargin < 5 sigma_edge = 1; end angle_step = 2 * pi / num_angles; angles = 0:angle_step:2*pi; angles(num_angles+1) = []; % bin ...
github
erlichlab/elutils-master
test_nonblocking.m
.m
elutils-master/+net/test_nonblocking.m
617
utf_8
8e2a79f129ba256b08ce855cf41c2630
function zmqlistener = test_nonblocking() zmqlistener = timer(); zmqlistener.StartFcn = @setup_zmq; zmqlistener.TimerFcn = @wait_for_msg; zmqlistener.ExecutionMode = 'fixedSpacing'; zmqlistener.BusyMode = 'drop'; zmqlistener.Period = 2; zmqlistener.TasksToExecute = +inf; zmqlistener.Star...
github
erlichlab/elutils-master
zmqhelper.m
.m
elutils-master/+net/zmqhelper.m
5,299
utf_8
66a815982b07bdab722a7ad311761f8b
classdef zmqhelper < handle % The ZMQHandler class is a wrapper for the jeromq java class. % % properties url socktype socket subscriptions end methods function obj = zmqhelper(varargin) if nargin == 0 ...
github
erlichlab/elutils-master
sig4inv.m
.m
elutils-master/+stats/sig4inv.m
114
utf_8
832d02d929f5449eafd190461040b711
function x=sig4inv(beta,y) %% sig4 y0=beta(1); a=beta(2); x0=beta(3); b=beta(4); x = -b*log((a./(y-y0))-1)+x0;
github
erlichlab/elutils-master
KernelRegressionA.m
.m
elutils-master/+stats/KernelRegressionA.m
4,999
utf_8
dab81ba78e55468e744502b7999bcd76
classdef KernelRegressionA properties baseline_per_trial = false core_kernel % this is the matrix for a single kernel. Will use it as a convolution kernel core_kernel_matrix % This is the core_kernel convolued with the event times. event_times kernel_bin_size = 0.01 % seconds kernel_dof = 50 kernel_dur...
github
erlichlab/elutils-master
sig4.m
.m
elutils-master/+stats/sig4.m
173
utf_8
ff976a6673d16b218ccb1651af766178
% y=sig4(beta,x) % y0=beta(1); % a=beta(2); % x0=beta(3); % b=beta(4); function y=sig4(beta,x) y0=beta(1); a=beta(2); x0=beta(3); b=beta(4); y=y0+a./(1+ exp(-(x-x0)./b));
github
erlichlab/elutils-master
nanstderr.m
.m
elutils-master/+stats/nanstderr.m
142
utf_8
d09ca0d1a2ee8c2b698c5055f9e29d0e
function y = nanstderr(x,dim) if nargin==1 dim=1; end gd=sum(~isnan(x),dim); y=nanstd(x,0,dim)./sqrt(gd-1); y(y==Inf)=nan; y(gd==0)=nan;
github
erlichlab/elutils-master
cellmean.m
.m
elutils-master/+stats/cellmean.m
326
utf_8
3582f4fc2f25ad0b0db1325cfddfabf2
function [mu, se]=cellmean(M,varargin) % [mu, se]=cellmean(M,varargin) dim=1; utils.overridedefaults(who,varargin) mu=nan(1,numel(M)); se=mu; for fx=1:numel(M) if numel(M{fx})<2 mu(fx)=nan; se(fx)=nan; else mu(fx)=nanmean(M{fx},dim); se(fx)=stats.nanstderr(M{fx},dim); e...
github
erlichlab/elutils-master
bootsigmoid_val.m
.m
elutils-master/+stats/bootsigmoid_val.m
1,722
utf_8
06b7b18967ce489fc03a39b3af42dbb8
function [p,D]=bootsigmoid(A,B,varargin) % [p,D]=bootsigmoid(A,B,varargin) % Takes two sets of N x 2 binomial data A and B, and fits sigmoids to them % both. It then uses the mean and covariance of the fits to calculate the % distance (using the projection of the fits onto fisher's linear % discriminant) of the fits. ...
github
erlichlab/elutils-master
sig4_invB.m
.m
elutils-master/+stats/sig4_invB.m
181
utf_8
c08cb89c2c6b4038f98284bc884f552e
% y=sig4(beta,x) % y0=beta(1); % a=beta(2); % x0=beta(3); % b=beta(4); function y=sig4_invB(beta,x) y0=beta(1); a=beta(2); x0=beta(3); b=1./beta(4); y=y0+a./(1+ exp(-(x-x0)./b));
github
erlichlab/elutils-master
sig2.m
.m
elutils-master/+stats/sig2.m
120
utf_8
c287dd7909e5ebcb805a5626775fe6f9
% y=sig2(beta,x) % x0=beta(3); % b=beta(4); function y=sig2(beta,x) x0=beta(1); b=beta(2); y=1./(1+ exp(-(x-x0)./b));
github
erlichlab/elutils-master
flda.m
.m
elutils-master/+stats/flda.m
1,152
utf_8
9bdfccc574b6158b470380ab74d3a6af
function v=flda(varargin) % v = flda(G1,G2) % v = flda(mean1,mean2,cov1,cov2,n1,n2) % % v is fisher's linear discriminant between the two "groups" of data % Using syntax 1 % G1 is an n x d matrix % G2 is an m x d matrix % Using syntax 2 % Group1 has mean mu1, covariance cov1, and n1 number of samples % Group2 has mean...
github
erlichlab/elutils-master
binned2.m
.m
elutils-master/+stats/binned2.m
3,374
utf_8
b96f93e8a24ff24b02339784a67566ca
function [xbinc, ybinc, mu, se, n]=binned2(x,y,z, varargin) % [binc, mu, se, n]=binned2(x,y,z,bin_e) % Takes a vector x and a vector y and returns mean and standard error of % values of z for bins of x and y. % % Input: % x 1xn vector of x values to bin % y 1xn vector of y values to bin % z 1xn vector of z...
github
erlichlab/elutils-master
align_hv.m
.m
elutils-master/+stats/align_hv.m
3,594
utf_8
5e557d2b0e614ee7d069e455658e2889
function [offset,inc_t,x,y]=align_hv(ev,ts,val,varargin) % [offset,inc_t,x,y]=align_hv(ev, ts,val, varargin) % % pairs={'pre' 3;... % 'post' 3;... % 'binsz' 0.001;... % 'meanflg' 0;... % 'krn' 0.25;... % 'max_offset' 1;... % 'pre_mask', -inf;... % 'p...
github
erlichlab/elutils-master
sig3.m
.m
elutils-master/+stats/sig3.m
239
utf_8
031ac0a7d8b32a57722315ef985581b3
% y=sig4(beta,x) % y0=beta(1); % a=beta(2); % x0=beta(3); % b=beta(4); function y=sig3(beta,X) x0=beta(1); b=beta(2); w=beta(3); dx=X(:,2)-X(:,1); L=X(:,1); R=X(:,2); w=min(max(w,0),1); y=1./(1+ exp(-(dx-x0)./((1+w*R+(1-w)*L).^b)));
github
erlichlab/elutils-master
stderr.m
.m
elutils-master/+stats/stderr.m
101
utf_8
70cccd93f718ca93def51627c9e5d4da
function y=stderr(x,dim) if ~exist('dim','var') dim=1; end y=std(x,0,dim)/sqrt(size(x,dim)-1);
github
erlichlab/elutils-master
sig5.m
.m
elutils-master/+stats/sig5.m
265
utf_8
0e840ad915c8b249461ff617952c70f1
% y=sig4(beta,x) % y0=beta(1); % a=beta(2); % x0=beta(3); % b=beta(4); function y=sig5(beta,X) y0=beta(1); a=beta(2); x0=beta(3); b=beta(4); w=beta(5); dx=X(:,2)-X(:,1); rx=X(:,2); lx=X(:,1); w=min(max(0,w),1); y=y0+a./(1+ exp(-(dx-x0)./((w*rx+(1-w)*lx).^b)));
github
erlichlab/elutils-master
untiedrank.m
.m
elutils-master/+stats/untiedrank.m
1,862
utf_8
6209b20bdf331ab606146b08e4c2e830
function r = untiedrank(x) % function r = untiedrank(x) % % Similar to tiedrank, but arbitrarily breaks ties (with consistency each % time called) % reset random number generator to same start % RandStream.setDefaultStream(RandStream('mrg32k3a','Seed',10)); RandStream.setGlobalStream(RandStream('mrg32k3a','Seed',10));...
github
erlichlab/elutils-master
softplus.m
.m
elutils-master/+stats/softplus.m
337
utf_8
7d105e1e04014e4ca55b507a27f2307e
function y=softplus(beta,x) % y=softplus(beta,x) % a=beta(1); % x0=beta(2); % b=beta(3); a=beta(1); x0=beta(2); b=beta(3); y = a.*(log(1 + exp((x - x0).*b))); y/a = log(1 + exp(x-x0)*b) exp(y/a) = 1 + exp(x-x0)*b exp(y/a) - 1 = exp(x-x0)*b b*(exp(y/a) - 1 = exp(x-x0) log(b*exp(y) - a - 1) = x - x0 y = log(b*(e...
github
erlichlab/elutils-master
sig4m.m
.m
elutils-master/+stats/sig4m.m
219
utf_8
05fdc096552ca475647fbe1ea82ca18f
% y=sig4(beta,x) % y0=beta(1); % a=beta(2); % x0=beta(3); % b=beta(4); function y=sig4m(beta,X) y0=beta(1); a=beta(2); x0=beta(3); b=beta(4); dx=X(:,2)-X(:,1); sx=X(:,2)+X(:,1); y=y0+a./(1+ exp(-(dx-x0)./(sx.^b)));
github
erlichlab/elutils-master
number_of_pairs.m
.m
elutils-master/+stats/number_of_pairs.m
1,817
utf_8
98688df40539000277d8a7cf6dd31647
% [n] = number_of_pairs(sh, p) Compute number of expected simultaneously-recorded pairs of "interesting" neurons % % Given a histogram of (# of sessions) versus (# of single-units recorded % per session), and given a probability of a neuron being an "interesting" % neuron (i.e., having a high enough firing rate, task...
github
erlichlab/elutils-master
loglikelihood.m
.m
elutils-master/+stats/loglikelihood.m
917
utf_8
e4392f988006d99eee42fadd1ad6a4a0
% [L,bic]=loglikelihood(M,y,np) % % Input % M: a vector of probabilities (model predictions) % y: a vector of binomial outcomes % np: the number of parameters in the model % % Output % L: the log likelihood % bic: the bayesian information criteria function [L,bic]=loglikelihood(M,y,np) % if isnumeric(M) N = nan+...
github
erlichlab/elutils-master
rm_nans.m
.m
elutils-master/+db/rm_nans.m
333
utf_8
0cf78edb18bd0054cdeece3c5559a2c9
function S = rm_nans(S) % This is useful since NaNs can't be sent to the DB. fnames = fieldnames(S); for fx = 1:numel(fnames) try if isnan(S.(fnames{fx})) S = rmfield(S,fnames{fx}); end catch me % Skip for fields that can't be tested for nan. e...
github
erlichlab/elutils-master
labdb.m
.m
elutils-master/+db/labdb.m
12,393
utf_8
b2b6dd69cc2d0ad6541952434691faa5
classdef (Sealed) labdb < handle % Class labdb % This is a wrapper class for the JDBC MySQL driver. % It has several features which are generally useful % 1. It reads credentials configurations from ~/.dbconf so that you don't have to type in credentials or store them in code. % 2. It maintains a single connection per ...
github
erlichlab/elutils-master
drawgaussian.m
.m
elutils-master/+draw/drawgaussian.m
2,055
utf_8
5ec4d56c987f84917fba34d436c525cd
%drawgaussian Draw the 1-sigma lines for a 2d gaussian % % [h] = drawgaussian(mean, [sigmax, sigmay, r | C], ... % {'angstart', 0}, {'angend', 360}, {'useC', 0}) % % Draws the nth-sigma lines for a gaussian in the current % figure. Since it uses LINE to do this, it returns a handle to % that line. % %...
github
erlichlab/elutils-master
shadeplot2.m
.m
elutils-master/+draw/shadeplot2.m
8,902
utf_8
5dd5f789c4d2ec7140fb7028dc7f27ec
function fhand=shadeplot2(x,y1,y2,varargin) % % shadeplot2(x,y1,y2,settings) % plots two shaded regions without the use of alpha, this allows the renderer to be % set as painters rather than openGL, giving a vector rather than raster image. % use shadeplot to quickly view graphs and choose colors, use shadeplo...
github
erlichlab/elutils-master
histsig.m
.m
elutils-master/+draw/histsig.m
2,024
utf_8
316408eb6cf67188ef14a168aadd6c59
function [ hx]=histsig(x, x_sig, varargin) % [ hx]=histsig(x, x_sig, x_lim) inpd = @utils.inputordefault; [origin, args]=inpd('origin', 0.1, varargin); [wdth, args]=inpd('width',0.2,args); [hist_h, args]=inpd('height',0.180,args); [num_bins, args]=inpd('n_bins',17,args); [bins, args]=inpd('bins',[],args); [ax, args]...
github
erlichlab/elutils-master
isosum_psycho.m
.m
elutils-master/+draw/isosum_psycho.m
2,131
utf_8
26192d5421145a85a198eccfe1297c00
% [X Y E]= isosum_psycho(x1,x2,wr,varargin) % A function to plot psychometrics with isosum lines. function [X Y E bfit bci]= isosum_psycho(x1,x2,wr,varargin) nsumbins=5; sum_bin_e=[]; x_bin_e=[]; nxbins=6; ax=[]; plot_it=true; clrs=[.85 0 0; 0 .1 .8; 0 .8 .1; .8 0 1; 1 .5 0; ...
github
erlichlab/elutils-master
unity.m
.m
elutils-master/+draw/unity.m
474
utf_8
a15b90de629093e2f2703b1e54bcfe07
% This function draws an unity line on the plot. %h=unity(ax,s) % ax (optional) plot to this axis, default gca % s (optional) use this linestyle, default ':k' function h=unity(ax,s) if nargin<2 s=':k'; end if nargin<1 ax=gca; end bax=ax; for axx=1:numel(bax) ax=bax(axx); oldhold=get(ax,'NextPlot'); xlim=get(ax, ...
github
erlichlab/elutils-master
task_timing.m
.m
elutils-master/+draw/task_timing.m
1,446
utf_8
fda761f48f0aeadf229643406b1b62b1
function task_timing(statetable, varargin) % draw.task_timing(statetable) % % names = { "Start Cue", "Nose in Fixation","Target Cue","Go Sound", "Nose in Target"}'; % start_state = [ 0, 0.15, 0.3, 1.3, 1.65]'; % stop_state = [ 0.15, 1.5, 1.65, 1.35, 1.8]'; % color = cellfun(@(x)x/255, {[48, 110, 29], [0,0,0], [4...
github
erlichlab/elutils-master
psychoplot4.m
.m
elutils-master/+draw/psychoplot4.m
2,729
utf_8
c0531293fb3a8721188984342248cd17
function varargout=psychoplot4(x_vals, varargin) % [stats]=psychoplot4(x_vals, went_right) % [stats]=psychoplot4(x_vals, hits, sides) % % Fits a 4 parameter sigmoid to psychophysical data % % x_vals the experimenter controlled value on each trial. % went_right a vector of [0,1]'s the same length as x_vals des...
github
erlichlab/elutils-master
twodcomp.m
.m
elutils-master/+draw/twodcomp.m
2,055
utf_8
a7d4f275c6ed7c0318d26d909ff0fa0a
function ax=twodcomp(A,B,varargin) plot_type='surf'; plot_ax='v'; ax_h=0.2; ax_w=0.2; ax_h_off=0.1; ax_w_off=0.1; x=1:size(A,2); y=1:size(A,1); fig=[]; gap=0.05; cmin=min([A(:);B(:);B(:)-A(:)]); cmax=max([A(:);B(:);B(:)-A(:)]); ax=[]; plot_colorbar=false; utils.overridedefaults(who,varargin) if isempty(fig) fig...
github
erlichlab/elutils-master
scatter_histhist.m
.m
elutils-master/+draw/scatter_histhist.m
2,816
utf_8
9c312dad3bd2fb8084a228d6f093dac5
function [hm, hx, hy]=scatter_histhist(x, x_sig, y,y_sig, varargin) % [hm, hx, hy]=scatter_histhist(x, x_sig, y,y_sig, x_lim, y_lim) % Optional arguments: % width, hist_height, num_bins, x_label, y_label % % E.g % x = randn(150,1)*2; % y = randn(250,1)*4+3; % y = randn(150,1)*4+3; % xsig = abs(x)>2; % ysig = y<0; % d...
github
erlichlab/elutils-master
mloads.m
.m
elutils-master/+json/mloads.m
3,833
utf_8
82b3ff741f68f9d2bac6ea80362a2e77
function out = mloads(jstr, varargin) % out = mdumps(obj, ['compress']) % function that takes a matlab object (cell array, struct, vector) and converts it into json. % It also creates a "sister" json object that describes the type and dimension of the "leaf" elements. if isempty(jstr) out = {}; ...
github
erlichlab/elutils-master
mdumps.m
.m
elutils-master/+json/mdumps.m
2,894
utf_8
8b81ff9b34a969aa5abdc3df1b2797f2
function out = mdumps(obj, varargin) % out = mdumps(obj, ['compress']) % function that takes a matlab object (cell array, struct, vector) and converts it into json. % It also creates a "sister" json object that describes the type and dimension of the "leaf" elements. % Warning: Simple cell arrays (e.g. cell-arrays o...
github
erlichlab/elutils-master
showerror.m
.m
elutils-master/+utils/showerror.m
639
utf_8
c92f2f93b75dac33946442eaacee08f3
function out = showerror(le, varargin) if nargin==0 le=lasterror; end [print_stack, args] = utils.inputordefault('print_stack', true, varargin); utils.inputordefault(args) if nargout > 0 out = sprintf('\n%s \n%s\n',le.identifier, le.message); if print_stack for xi=1:numel(le.stack) ou...
github
erlichlab/elutils-master
date_diff.m
.m
elutils-master/+utils/date_diff.m
1,805
utf_8
1f82c41c56b44b8e57ed1e0569bc93c5
function out = date_diff(date1, date2, interval) % out = date_diff(date1, date2, interval) % Inputs % date1 a date in yyyy-mm-dd or yyyy-mm-dd hh:mm:ss format % date2 a date in yyyy-mm-dd or yyyy-mm-dd hh:mm:ss format % interval one of 'year','day','hour','minute','second' % % Note: date1 and date2 can either ...
github
erlichlab/elutils-master
overridedefaults.m
.m
elutils-master/+utils/overridedefaults.m
3,788
utf_8
b307fdb8db5be4b0fa55b1d70d931d3a
%parseargs [opts] = overridedefaults(varnames, arguments, ignore_unknowns) % % Variable argument parsing % % function is meant to be used in the context of other functions % which have variable arguments. Typically, the function using % variable argument parsing would be written with the following % header: % % fu...
github
erlichlab/elutils-master
adaptive_mult.m
.m
elutils-master/+utils/adaptive_mult.m
2,123
utf_8
89328d00b41e6d0ae7f634db36b37b2c
% [val] = adaptive_mult(val, hit, {'hit_frac', 0}, {'stableperf', 0.75}, ... % {'mx', 1}, {'mn', 0}, {'do_callback', 0}) % % Implements multiplicative staircase adaptation of a variable. % % PARAMETERS: % ----------- % % val The value to be adapted. % % hit Pass this as 1 if lates...
github
erlichlab/elutils-master
parseargs.m
.m
elutils-master/+utils/parseargs.m
6,636
utf_8
c8ed076c97d377f6a6807576765b9992
%parseargs [opts] = parseargs(arguments, pairs, singles, ignore_unknowns) % % Variable argument parsing-- supersedes parseargs_example. This % function is meant to be used in the context of other functions % which have variable arguments. Typically, the function using % variable argument parsing would be written with...
github
erlichlab/elutils-master
to_string_date.m
.m
elutils-master/+utils/to_string_date.m
2,465
utf_8
3b79081714a1f10ba59298abc6fa29bb
% [str] = to_string_date(din, ['format', {'dashes'|'nodashes'}) % % Takes a din that stands for a date and turns it into a string format that % can be used to look for data files or that can be used with the SQL % database. % % PARAMETERS: % ----------- % % din An integer. If it is an integer of magnitude less ...
github
erlichlab/elutils-master
adaptive_step.m
.m
elutils-master/+utils/adaptive_step.m
2,067
utf_8
9f6646a5feea5b49c15bbcaab948d83d
% [val] = adaptive_step(val, hit, {'hit_step', 0}, {'stableperf', 0.75}, ... % {'mx', 1}, {'mn', 0}, {'do_callback', 0}) % % Implements staircase adaptation of a variable. % % PARAMETERS: % ----------- % % val The value to be adapted. % % hit Pass this as 1 if latest trial was in ...
github
erlichlab/elutils-master
combinator.m
.m
elutils-master/+utils/combinator.m
12,572
utf_8
b7227c1ea589711f5b1cacffff096fb1
function [A] = combinator(N,K,s1,s2) %COMBINATOR Perform basic permutation and combination samplings. % COMBINATOR will return one of 4 different samplings on the set 1:N, % taken K at a time. These samplings are given as follows: % % PERMUTATIONS WITH REPETITION/REPLACEMENT % COMBINATOR(N,K,'p','r') -...
github
erlichlab/elutils-master
MakeSpectrumNoise.m
.m
elutils-master/+sound/MakeSpectrumNoise.m
2,511
utf_8
1ad790feb7a4eab9a9dd378d9caba9ef
% function [snd] = MakeSpectrumNoise(SRate, F1, F2, Duration, Kontrast, ... % CRatio, varargin) % % This function generates a sound whose power spectrum is white except for % two Gaussian peaks at F1 and F2 (each with std = sigma). The contrast of % each peak is defined as C_i = (P_i ...
github
erlichlab/elutils-master
cosyne_ramp.m
.m
elutils-master/+sound/cosyne_ramp.m
887
utf_8
94b4e864d3b54de9f7a28cca9a9bfcb4
% [snd] = cosyne_ramp(snd, srate, ramp_ms) % % Takes a sound in the 1-dimensional vector snd, and assuming that the % samplerate for it is srate samples/sec, multiplies it by a cosyne ramp of % ramp_ms milliseconds (i.e., the cosyne function goes from min to max in % ramp_ms, meaning it has a whole-cycle a period of 2*...
github
erlichlab/elutils-master
MakeBupperSwoop.m
.m
elutils-master/+sound/MakeBupperSwoop.m
6,598
utf_8
08ef1f9c6e0298e251130dfbe2ca6e26
%MakeBupperSwoop.m [monosound]=MakeBupperSwoop(SRate, Att, StartFreq, ... % EndFreq, BeforeBreakDuration, AfterBreakDuration,... % Breaklen, Tau) % % Makes a sound: % % SRate: sampling rate, in samples/sec % Attenuation % StartFreq starting frequency of the...
github
erlichlab/elutils-master
MakeSwoop.m
.m
elutils-master/+sound/MakeSwoop.m
2,192
utf_8
09ee5917bcea33f5d8c9b389ce7ef88d
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % MakeSwoop % Generate the individual tone pips as an accessory to PrepareSweep. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % MakeSwoop % Usage: % Beep=MakeSwoop( SRate, Attenuation, Frequency, Durati...
github
erlichlab/elutils-master
MakeBeep.m
.m
elutils-master/+sound/MakeBeep.m
1,862
utf_8
e6730035baf6efe94fb226b17bff9e9e
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % MakeBeep % Generate the individual tone pips as an accessory to PrepareSweep. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % MakeBeep % Usage: % Beep=MakeBeep( SRate, Attenuation, Frequency, Duration,...
github
erlichlab/elutils-master
MakeChord2.m
.m
elutils-master/+sound/MakeChord2.m
2,265
utf_8
d4e4da484d1e93df77d03709404f2dcf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % MakeChord2 % Generate Chord. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Usage: % Beep=MakeChord( SRate, Attenuation, BaseFreq, NTones, Duration, [RiseFall] ) % Create a chord with base frequency '...
github
erlichlab/elutils-master
MakeSwoop2.m
.m
elutils-master/+sound/MakeSwoop2.m
1,742
utf_8
06d44b69c6c79cd89c41fb2f3d72696b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % MakeSwoop2 % Generate the individual tone pips as an accessory to PrepareSweep. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % MakeSwoop2 % Usage: % Beep=MakeSwoop( SRate, Attenuation, Frequency, Dura...
github
erlichlab/elutils-master
MakeSigmoidSwoop3.m
.m
elutils-master/+sound/MakeSigmoidSwoop3.m
4,319
utf_8
4b75bae0f81f56a8e851319eef4dccf6
%MakeSigmoidSwoop3.m [monosound]=MakeSigmoidSwoop3(SRate, Att, StartFreq, ... % EndFreq, BeforeBreakDuration, AfterBreakDuration,... % Breaklen, Tau, [RiseFall=3] ) % % Makes a sound: % % SRate: sampling rate, in samples/sec % Attenuation % StartFreq starti...
github
erlichlab/elutils-master
MakeChord.m
.m
elutils-master/+sound/MakeChord.m
2,135
utf_8
00364a0eb3f67051ad1e59e125a86d24
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % MakeChord % Generate Chord. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Usage: % Beep=MakeChord( SRate, Attenuation, BaseFreq, NTones, Duration, [RiseFall] ) % Create a chord with base frequency 'B...
github
erlichlab/elutils-master
MakeSigmoidSwoop2.m
.m
elutils-master/+sound/MakeSigmoidSwoop2.m
2,507
utf_8
db64fa6d40a96528a57c83acd4ae8d39
%MakeSigmoidSwoop2.m [Beep]=MakeSigmoidSwoop(SRate, SPL, StartFreq, EndFreq, Duration, Tau, Breaklen, [RiseFall=5] ) % % Makes a sound: % % SRate: sampling rate, in samples/sec % Attenuation % StartFreq starting frequency of the sound, in Hz % EndFreq ending frequency of the sound, in Hz % Durat...
github
erlichlab/elutils-master
MakeClick.m
.m
elutils-master/+sound/MakeClick.m
1,391
utf_8
6e51c9a71deabd3dacbf01b3c4d7b57e
% [click] = MakeClick({'sigma', 0.0001}, {'power', 1.2}) % % Makes a single, sharp, brief, broad-band "click!" of amplitude 0.7. % % Gets the sampling rate from protocolobj; then makes a % Gaussian-like function, exp(-|t|^power / (2*sigma^power)) : a % Guassian would have power=2; then takes the derivative of this % ...
github
erlichlab/elutils-master
MakeBeep4Winsound.m
.m
elutils-master/+sound/MakeBeep4Winsound.m
1,818
utf_8
83fd71b44c3e6b281395e603e3add516
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % MakeBeep4Winsound % Generate the individual tone pips as an accessory to PlayTones. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function Beep=MakeBeep4Winsound( SRate, Attenuation, Frequency, Durati...
github
erlichlab/elutils-master
Make2Sines.m
.m
elutils-master/+sound/Make2Sines.m
2,539
utf_8
492ef41bbfe84d1b25ae431055ed018e
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Make2Sines % Generate two sine tones with delay. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Usage: % Beep=Make2Sines( SRate, Attenuation, F1, F2, ToneDuration, Delay, [RiseFall] ) % Create s...
github
erlichlab/elutils-master
MakeSigmoidSwoop.m
.m
elutils-master/+sound/MakeSigmoidSwoop.m
2,211
utf_8
3f9b0adbb2823476b55a5c7f9523c9bb
%MakeSigmoidSwoopm.m [Beep]=MakeSigmoidSwoop(SRate, Attenuation, StartFreq, EndFreq, Duration, Tau, Breaklen, [RiseFall=5] ) % % Makes a sound: % % SRate: sampling rate, in samples/sec % Attenuation % StartFreq starting frequency of the sound, in Hz % EndFreq ending frequency of the sound, in Hz % ...
github
erlichlab/elutils-master
MakeFMWiggle.m
.m
elutils-master/+sound/MakeFMWiggle.m
2,621
utf_8
14f4272f26b69bb9edcbd12b347726ad
%MakeFMWiggle.m [monosound]=MakeFMWiggle(SRate, Att, Duration, CarrierFreq, ... % FMFreq, FMAmp, [RiseFall=3] {'volume_factor', 1, 'PPfilter_name', ''}) % % Makes a sinusoidally wiggling frequency pure tone (i.e., a sinusoidally frequency modulated sine wave): % % SRate: sampling rate, i...
github
erlichlab/elutils-master
make_pbup.m
.m
elutils-master/+sound/make_pbup.m
8,806
utf_8
87fd9aa4ca3b776517cfe0782df11b6d
% [snd lrate rrate data] = make_pbup(R, g, srate, T, varargin) % % Makes Poisson bups % bup events from the left and right speakers are independent Poisson % events % % ======= % inputs: % % R total rate (in clicks/sec) of bups from both left and right % speakers (r_L + r_R). Note that if distractor_rate > 0, th...
github
erlichlab/elutils-master
MakeEdge.m
.m
elutils-master/+sound/MakeEdge.m
783
utf_8
8536b947788790f936e5ead9be58a078
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % MakeEdge % Generate the rising/falling edge as an accessory to MakeBeep. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function Edge=MakeEdge( SRate, RiseFall ) % Usage: % Edge=MakeEdge( SRate, RiseFa...
github
erlichlab/elutils-master
singlebup.m
.m
elutils-master/+sound/singlebup.m
1,377
utf_8
0be7b1a1e09b4be4290028c14fac66ae
% [snd] = singlebup(srate, att, { 'width', 5}, {'ramp', 2}, {'basefreq', 2000}, ... % {'ntones' 5}, {'PPfilter_fname', ''}); ... function [snd] = singlebup(srate, att, varargin) width=5 ; ramp = 2 ; basefreq = 2000 ; ntones = 5 ; PPfilter_...
github
virati/SGView-master
SG_view.m
.m
SGView-master/SG_view.m
78,170
utf_8
012bb7c3e7682c1678c29a1f1369c165
%% %Written by: Vineet Tiruvadi 2013-2016 %SG Viewer %Main Gui for rapid viewing and spectral figures of BrainRadio and hdEEG %data for MaybergLab. function varargout = SG_view(varargin) % SG_VIEW MATLAB code for SG_view.fig % SG_VIEW, by itself, creates a new SG_VIEW or raises the existing % singleton*.DBS9...