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
AllenDowney/PhysicalModelingInMatlab-master
comp_err2.m
.m
PhysicalModelingInMatlab-master/code/other/comp_err2.m
634
utf_8
0827e847cc8190f954e8e287f3ed988a
function [rms] = comp_err (ang, noise, ang_error) sum = zeros(size(ang)); N=2; for i=1:N [ G, H ] = data_gen (ang, noise, ang_error); rot = ang_rot(ang) [ rot_out, quat, ang_out, av ] = tiax_Joel (G,H); rot_out = quat_rot(quat) % rot_err is the rotation that takes rot o...
github
AllenDowney/PhysicalModelingInMatlab-master
particle.m
.m
PhysicalModelingInMatlab-master/code/other/particle.m
640
utf_8
f7ee05338baeabf68dca3f08da84aaaa
function dXdt = particle(t, X) P = X(1:3); V = X(4:6); A = acceleration(t, P, V); dXdt = [V; A]; end function A = acceleration(t, P, V) % t is the current time, P is the position of the particle in % 3-space, V is the velocity of the particle. q = 1; m = 1; B = mfield(t, P); F = q * c...
github
AllenDowney/PhysicalModelingInMatlab-master
ramp.m
.m
PhysicalModelingInMatlab-master/code/other/ramp.m
5,409
utf_8
41d5fc2f8ec378398b64e94e8baf3b65
% Simulation of a skateboarder on a ramp. % Allen B. Downey function res = bisection_func(flag) % if flag is 1, run the animation at the critical velocity % (minium that gets over the ramp) % otherwise, run a bisection search for the critical velocity if flag v = 5.357540588225950; % init...
github
AllenDowney/PhysicalModelingInMatlab-master
testing.m
.m
PhysicalModelingInMatlab-master/code/other/testing.m
859
utf_8
da145e09b5c05f66c66c6497efc00379
function [x y] = projectile() % example from page 312 of Gilat, % MATLAB: An Introduction with Applications syms V X ang real syms v0 g t positive ihat = [1; 0]; jhat = [0; 1]; X0 = [0; 0]; V0 = pol2vec(v0, ang); A = -g * jhat; V = V0 + int(A, t); X = X0 + int(V, t); Y...
github
AllenDowney/PhysicalModelingInMatlab-master
sym_worksheet.m
.m
PhysicalModelingInMatlab-master/code/other/sym_worksheet.m
14,143
utf_8
9bddfee9cf117a08a0c5bf8e6c6dbe94
function res = sym_examples(func) f = str2func(func); f(); end function res = example_3_1() % page 51 of Wolfson and Pasachoff r = 160; % km degrees = 35; % degrees R = degr2vec(degrees, r) end function res = example_3_2() % page 52 of Wolfson and Pasachoff end function res = example_3_4...
github
AllenDowney/PhysicalModelingInMatlab-master
ramp3.m
.m
PhysicalModelingInMatlab-master/code/other/ramp3.m
4,495
utf_8
077258436c6ecf7a6ba1a9a4e3f207dc
function res = find_zero() res = fzero(@ramp_func, 9); end function res = ramp_func(v) % run the simulation until the ramp touches the ground % and return the x coordinate of the rider relative to % the end of the ramp % ramp_height is the height of the ramp in meters % ramp_dist is the horizo...
github
AllenDowney/PhysicalModelingInMatlab-master
pendulum2.m
.m
PhysicalModelingInMatlab-master/code/other/pendulum2.m
951
utf_8
509ea804b3640bc5d12117311050276f
function res = pendulum() % declare the symbols syms g m1 l1 positive syms x1 y1 t real syms X V T L real syms th1 om1 aa1 real th1ft = sym('th1(t)'); om1ft = sym('om1(t)'); X = pol2vec(l1, th1ft-pi/2); V = diff(X, t); vsq = dot(V, V); V = m1 * g * X(2); T = m1 * vsq ...
github
AllenDowney/PhysicalModelingInMatlab-master
projectile2.m
.m
PhysicalModelingInMatlab-master/code/other/projectile2.m
418
utf_8
8bb6a6a380e5141a28d3f4991c5d6cc1
function dXdt = f(t, X) % this function take a vector with 4 components, [x, y, x', y'] % and returns a column vector with components [x', y', x'', y''] % it uses the function acceleration to compute x'' and y''. V = X(3:4); A = acceleration(V) dXdt = [vx; vy; A]; end function A = acceleration(V) % this function tak...
github
AllenDowney/PhysicalModelingInMatlab-master
fyt.m
.m
PhysicalModelingInMatlab-master/code/other/fyt.m
292
utf_8
3d45c06f78801c15d32fd064eefc1440
function e = solvand (i) % if I am trying to reach a balance of a, how much will I be off by? a = 300000; e = balance(i) - a; end function b = balance (i) % given interest rate i, monthly payment p, how much money % will I have after n months? p = 200; n = 300; b = p/i * ((i+1)^n - 1); end
github
AllenDowney/PhysicalModelingInMatlab-master
projectile.m
.m
PhysicalModelingInMatlab-master/code/other/projectile.m
237
utf_8
92c812704f19d93a86701d79f3a73b5a
function dXdt = f(t, X) x = X(1); y = X(2); vx = X(3) vy = X(4); ax = fx(t, x, y, vx, vy) ay = fy(t, x, y, vx, vy) dXdt = [vx; vy; ax; ay]; end function a = fx(t, x, y, vx, vy) a = 0 end function a = fy(t, x, y, vx, vy) a = -9.8 end
github
AllenDowney/PhysicalModelingInMatlab-master
moody.m
.m
PhysicalModelingInMatlab-master/code/other/moody.m
133
utf_8
edb5ce7c1922c62af8b703e2aa2100e7
function moody() [T, Y] = ode45(@test_func, [0,1.5], 1); plot(T, Y) end function res = test_func(t, y) res = y ^ 2; end
github
AllenDowney/PhysicalModelingInMatlab-master
mysqrt.m
.m
PhysicalModelingInMatlab-master/code/other/mysqrt.m
203
utf_8
1401958fec920f1aedee35ceadeb607e
function root = mysqrt(a) est = a; for i=1:8 est = est - f(est, a) / fp(est); end root = est; end function y = f(x, b) y = x^2 - b; end function y = fp(x) y = 2*x; end
github
AllenDowney/PhysicalModelingInMatlab-master
magpart.m
.m
PhysicalModelingInMatlab-master/code/other/magpart.m
1,657
utf_8
24fab0e2ddcc2699165d56a981c6c06f
function magpart(te) % te is the duration of the time range % initial conditions P = [-0.1 0 0]'; V = [0.1 0.1 0]'; % call ode45 [T, M] = ode45(@part, [0, te], [P; V]); % plot the results X = M(:,1); Y = M(:,2); Z = M(:,3); comet3(X, Y, Z); %XY = M(:, 1:2) %plot(T,X) ...
github
AllenDowney/PhysicalModelingInMatlab-master
interest.m
.m
PhysicalModelingInMatlab-master/code/other/interest.m
292
utf_8
3d45c06f78801c15d32fd064eefc1440
function e = solvand (i) % if I am trying to reach a balance of a, how much will I be off by? a = 300000; e = balance(i) - a; end function b = balance (i) % given interest rate i, monthly payment p, how much money % will I have after n months? p = 200; n = 300; b = p/i * ((i+1)^n - 1); end
github
AllenDowney/PhysicalModelingInMatlab-master
manny1.m
.m
PhysicalModelingInMatlab-master/code/other/manny1.m
2,867
utf_8
10d82049d1436fc2ef8407911f7b31c0
e = function res = manny() % find the velocity that _just_ gets the ball over the wall initial_guess = 45; % m/s velocity = fzero(@crossover_func, initial_guess); res = velocity; end function res = crossover_func(velocity) % this function crosses through zero when the height of the ball a...
github
AllenDowney/PhysicalModelingInMatlab-master
data_gen3.m
.m
PhysicalModelingInMatlab-master/code/other/data_gen3.m
447
utf_8
35a214d2072768e3c7bcd63b8c8d43c6
% takes input of roll, pitch and heading angles and outputs accel and mag % data in body frame with noise function [ G,H ] = data_gen (ang, noise) % g is grav, Hh is horizontal and Hv is vertical component of mag field % in Earth's frame g = 9.8; Hh = 4E4; Hv = 2E4; gnoise = noise*g; hnoise = noise*(Hh^2+Hv^2)^0.5; %...
github
AllenDowney/PhysicalModelingInMatlab-master
lacrosse.m
.m
PhysicalModelingInMatlab-master/code/other/lacrosse.m
5,142
utf_8
42554d9db839fc961a9afd24bfea7dd6
% Simulation of a bouncing lacrosse ball. % Allen B. Downey % The ball is modeled as a thin shell around a core, connected % by a torsional spring. When the ball is in contact with the % ground, the shell stops rotating and the core rotates relative % shell, causing a displacement between the angle of the core % and ...
github
AllenDowney/PhysicalModelingInMatlab-master
sym_examples.m
.m
PhysicalModelingInMatlab-master/code/other/sym_examples.m
16,583
utf_8
3ba1771fda5734c714544cf29d0db8e8
function res = sym_examples(func) f = str2func(func); f(); end function res = example_3_1() % page 51 of Wolfson and Pasachoff r = 160; % km degrees = 35; % degrees R = degr2vec(degrees, r) end function res = example_3_2() % page 52 of Wolfson and Pasachoff R1 = degr2vec(30, 2); R...
github
AllenDowney/PhysicalModelingInMatlab-master
flying_duck.m
.m
PhysicalModelingInMatlab-master/code/other/flying_duck.m
603
utf_8
656cce1b5815b09e59820cee57296adc
function [t, h] = duck(v0) exact = 2 * 10 / 9.8 dts = [0.0001 0.001 0.01 0.1]; for i = 1:length(dts) [T, V, H] = euler(v0, dts(i)); h(i) = max(H); t(i) = (T(end) - exact) / exact end loglog(dts, t) end function [T, V, H] = euler(v0, dt) T(1) = 0; H(1) = 0; V(1) =...
github
AllenDowney/PhysicalModelingInMatlab-master
koch.m
.m
PhysicalModelingInMatlab-master/code/other/koch.m
1,063
utf_8
24503ffe612720432d93fb6a71cc36a7
function koch () clf; axis equal title 'quadric Koch curve by Allen' subplot(2,2,1) koch_square (1) subplot (2,2,2) koch_square (2) subplot (2,2,3) koch_square (3) subplot (2,2,4) koch_square (4) function koch_square (n) v1 = [0,0]; v2 = [1,0]; v3 = [1,1]; v4...
github
AllenDowney/PhysicalModelingInMatlab-master
vector_examples.m
.m
PhysicalModelingInMatlab-master/code/other/vector_examples.m
15,511
utf_8
18b76c1eea4d28b061eff1dcf918c2b0
function res = sym_examples(func) f = str2func(func); f(); end function res = example_3_1() % Example 3-1 on page 51 of Wolfson and Pasachoff r = 160; % km degrees = 35; % degrees R = degr2vec(r, degrees) end function res = example_3_2() % Example 3-2 on page 52 of Wolfson and Pasachoff ...
github
AllenDowney/PhysicalModelingInMatlab-master
double_pend.m
.m
PhysicalModelingInMatlab-master/code/other/double_pend.m
1,486
utf_8
06df2acd5535620b6456c19417b10368
function res = double_pendulum() syms x1 y1 x2 y2 t real syms g m1 m2 l1 l2 real syms V T L real syms th1 th2 om1 om2 aa1 aa2 real x1 = l1 * sin(th1); y1 = -l1 * cos(th1); x2 = x1 + l2 * sin(th2); y2 = y1 - l2 * cos(th2); vx1 = mydiff(x1, 1) vy1 = mydiff(y1, 1) vx2 = mydiff...
github
AllenDowney/PhysicalModelingInMatlab-master
allen_ramp.m
.m
PhysicalModelingInMatlab-master/code/other/allen_ramp.m
5,166
utf_8
684fe3aa529ef04479ff2d1fec73aed3
function res = bisection_func(flag) % if flag is 1, run the animation at the critical velocity % (minimum that gets over the ramp) % otherwise, run a bisection search for the critical velocity if flag v = 8.360417154065374; % initial velocity of the rider/board ramp_func(v, 1.0); ...
github
AllenDowney/PhysicalModelingInMatlab-master
double_pend3.m
.m
PhysicalModelingInMatlab-master/code/other/double_pend3.m
2,191
utf_8
a94b07d9b9e14ed0005151076a7f18c4
function res = double_pendulum() syms g m1 m2 l1 l2 positive syms V T L real syms th1 th2 om1 om2 aa1 aa2 real X1 = pol2vec(l1, th1-pi/2); X2 = X1 + pol2vec(l2, th2-pi/2); V1 = mydiff(X1, 1); V2 = mydiff(X2, 1); v1sq = dot(V1, V1); v2sq = dot(V2, V2); V = m1 * g * X1(2) + m2 ...
github
AllenDowney/PhysicalModelingInMatlab-master
double_pend2.m
.m
PhysicalModelingInMatlab-master/code/other/double_pend2.m
2,208
utf_8
9f1aa549e730db0e34192e6de3cd9450
function res = double_pendulum() syms g m1 m2 l1 l2 positive syms V T L real syms t th1 th2 om1 om2 aa1 aa2 real th1 = sym('th1(t)'); th2 = sym('th2(t)'); X1 = pol2vec(l1, th1-pi/2); X2 = X1 + pol2vec(l2, th2-pi/2); V1 = diff(X1, t); V2 = diff(X2, t); v1sq = dot(V1, V1); ...
github
AllenDowney/PhysicalModelingInMatlab-master
pendulum.m
.m
PhysicalModelingInMatlab-master/code/other/pendulum.m
1,132
utf_8
95c400c13866f15b21444ae45dba06ae
function res = pendulum() % declare the symbols syms g m1 l1 syms x1 y1 t syms V T L syms th1 om1 aa1 X = pol2vec(l1, th1-pi/2); V = mydiff(X, t); vsq = dot(V, V); V = m1 * g * X(2); T = m1 * vsq / 2; L = T - V % take derivatives dLdom1 = diff(L, om1); ddt1 = ...
github
AllenDowney/PhysicalModelingInMatlab-master
corn.m
.m
PhysicalModelingInMatlab-master/code/other/corn.m
2,363
utf_8
74c691be1c2961e078cd42b7c9d70766
function res = corn() % run a simulation of the enzyme action in fuel alcohol production % and return the time (in hours) to reduce the unavailable starch % concentation to 0.01 (mMol/L) options = odeset('Events', @event_func); tend = 50 * 60 * 60; % 50 hours in seconds Sinit...
github
AllenDowney/PhysicalModelingInMatlab-master
newton.m
.m
PhysicalModelingInMatlab-master/code/other/newton.m
2,573
utf_8
ac84e80f3e4cea4d66c65e7bd04b7c53
function [ euler, quat ] = newton ( G, H ) % THIS FUNCTION IS NOT CURRENTLY WORKING. % Inputs: Two matrices, G accelerometer data and H magentometer data. % Output: Euler angles and quaternions for rotations. % Euler output is: [ phi, theta, psi ]; % Quaternion output is: [ q0, w ] where w = { q1, q2, q3 } a vector d...
github
AllenDowney/PhysicalModelingInMatlab-master
pendulum1.m
.m
PhysicalModelingInMatlab-master/code/other/pendulum1.m
1,132
utf_8
95c400c13866f15b21444ae45dba06ae
function res = pendulum() % declare the symbols syms g m1 l1 syms x1 y1 t syms V T L syms th1 om1 aa1 X = pol2vec(l1, th1-pi/2); V = mydiff(X, t); vsq = dot(V, V); V = m1 * g * X(2); T = m1 * vsq / 2; L = T - V % take derivatives dLdom1 = diff(L, om1); ddt1 = ...
github
mzahiri/Walker-master
passivewalker.m
.m
Walker-master/Code/passivewalker.m
11,539
utf_8
a14368ea616ebe4a51f9c3117e1d6fd7
function passivewalker(flag) clc clear all close all format long global check; if nargin == 0 flag = 1; %simulates simplest walker by default end walker.M = 10000; walker.m = 1.0; walker.I = 0.00; walker.l = 1.0; walker.w = 0.0; walker.c = 1.0; walker.r = 0.0; walker.g = 1.0; wa...
github
mzahiri/Walker-master
pw2.m
.m
Walker-master/Code/pw2.m
12,235
utf_8
db9495b6f8c3a904a6f4c1f9dab20d60
function passivewalker(flag) clc clear all close all format long if nargin == 0 flag = 1; %simulates simplest walker by default end walker.M = 10000; walker.m = 1.0; walker.I = 0.00; walker.l = 1.0; walker.w = 0.0; walker.c = 1.0; walker.r = 0.0; walker.g = 1.0; walker.gam =0.01823;...
github
mzahiri/Walker-master
passivewalker.m
.m
Walker-master/Code/simple-2/passivewalker.m
6,262
utf_8
186044fe1d14ed5fec845c40f6615a5e
function passivewalker(flag) clc clear all close all format long global check; %% c = COM on the leg from hip, w = COM fore-aft offset, r = radius of feet %% M = hip mass, m = leg mass, I = leg inertia, l = leg length walker.M = 10000; walker.m = 1.0; walker.I = 0.00; walker.l ...
github
kunaljathal/Music-FX-Library-master
fixChorus.m
.m
Music-FX-Library-master/fixChorus.m
1,012
utf_8
6cc78c4859b297491eb69c7a9a1c3bb5
% Kunal Jathal % Fixed Delay Chorus % =================== % We want to implement a simple chorus filter i.e. just the following % difference equation: % y[n] = x[n] + b0 * x[n - K] % We want to take in the following arguments: % Delay Coefficient (b0) % Input Signal (x[n]) % Delay Amount (K) (in MILLISECONDS) - th...
github
kunaljathal/Music-FX-Library-master
varChorus.m
.m
Music-FX-Library-master/varChorus.m
2,164
utf_8
037182ae863446f624fed1df1fe16650
% Kunal Jathal % Variable Delay Chorus % ===================== % Now, we want to implement a variable delay chorus filter, i.e. the % difference equation: % y[n] = x[n] + b0 * x[n - g[n]] % We want to take in the following arguments: % Delay Coefficient (b0) % Input Signal (x[n]) % Delay Amount (g[n]) - this is now...
github
kunaljathal/Music-FX-Library-master
compressor.m
.m
Music-FX-Library-master/compressor.m
2,950
utf_8
26dae3fe42e55a28b17ee3aa577cf54c
% Kunal Jathal % N19194426 % DST 2 - Assignment 2 % % Question 2 (a) % function compressor(inputSignal, threshold, slope, gainMatching) % Error check the threshold and slope if ((abs(threshold) > 1) || (abs(slope) > 1)) error('Both the threshold and slope need to be under 1'); end % Get the original signal [ori...
github
kunaljathal/Music-FX-Library-master
allPassChorus.m
.m
Music-FX-Library-master/allPassChorus.m
4,879
utf_8
a693eb0c471bbb2e56fdc628e2db2b41
% Kunal Jathal % % Chorus function using LFO and an All Pass Filter for fractional delay % ===================================================================== % We want to implement a FRACTIONAL delay chorus filter % y[n] = x[n] + b0 * x[n - g[n]] % We want to take in the following arguments: % Delay Coefficient ...
github
kunaljathal/Music-FX-Library-master
WahWah_v1.m
.m
Music-FX-Library-master/WahWah_v1.m
6,810
utf_8
bc44022206dc52cce41705a04219b805
% Kunal Jathal % N19194426 % DST 2 - Assignment 3 % % Question 2 % % The simplest Wah Wah 'Pedal' in the world. % =========================================== function varargout = WahWah_v1(varargin) % WAHWAH_V1 MATLAB code for WahWah_v1.fig % WAHWAH_V1, by itself, creates a new WAHWAH_V1 or raises the existing ...
github
kunaljathal/Music-FX-Library-master
deEsser.m
.m
Music-FX-Library-master/deEsser.m
4,242
utf_8
44b35f368851a2ba6f23aadf9202bfc3
function deEsser(inputSignal, threshold, slope, gainMatching, lowerFreqLimit, upperFreqLimit) % define Bark band edges and center frequencies barkEdges = [0 100 200 300 400 510 630 770 920 1080 1270 ... 1480 1720 2000 2320 2700 3150 3700 4400 5300 6400 7700 9500 12000 15500]; % Error check the threshold and slope i...
github
kunaljathal/Music-FX-Library-master
fracChorus.m
.m
Music-FX-Library-master/fracChorus.m
2,914
utf_8
1ae6767034ee4be127684992524dec97
% Kunal Jathal % Fractional Delay Chorus % ======================= % Now, we want to implement a FRACTIONAL delay chorus filter % y[n] = x[n] + b0 * x[n - g[n]] % We want to take in the following arguments: % Delay Coefficient (b0) % Input Signal (x[n]) % Delay Amount (g[n]) - this is now a function of time. So we ...
github
mvansegbroeck-zz/ivectool-master
ISDvectorEM_P1_s1_f2.m
.m
ivectool-master/ivec/ISDvectorEM_P1_s1_f2.m
2,836
utf_8
b894271087168dcc771f82f4606f0233
% P1. E STEP OF EM TRAINING function ISDvectorEM_P1_s1_f2(TrainMatName,TrainLabelName,StasticsMatName,N_Rank,Idx_iteration,nbClassesTrain,n_MeansuperDim,T_init,InvSigma1,matrix1,nMixNum,nVecSize,ProjectMatrixPool,log_N_s_table,log_N_s_table_length,log_N_s_table_interval,W_init,InvSigma2,matrix2) %load(LastModelMa...
github
mvansegbroeck-zz/ivectool-master
ISDvectorEM_P2_s1.m
.m
ivectool-master/ivec/ISDvectorEM_P2_s1.m
3,778
utf_8
2a0e1d6881c6aa364d373e64e2890754
% P2. M STEP OF EM TRAINING, ACCUMULATION OVER SPLIT FILES function ISDvectorEM_P2_s1(LastModelMatName,trainingset,nb_splits,NewModelMatName,ivec_dim,odir) load (LastModelMatName); ProjectMatrixPool_=cell(size(ProjectMatrixPool,3)); for i=1:size(ProjectMatrixPool,3) ProjectMatrixPool_{i}=ProjectMatrixPo...
github
mvansegbroeck-zz/ivectool-master
ISDvectorEM_P0_s1.m
.m
ivectool-master/ivec/ISDvectorEM_P0_s1.m
1,494
utf_8
eec24f1a626163103f7c8fd025e6caf8
% P0. INITIALIZE PARAMETERS FOR EM TRAINING function ISDvectorEM_P0_s1(trainingdir, N_Rank, nMixNum, featType, nVecSize, nbClassesTrain) %clear all; %N_Rank=400; % 600(for RATS) = dimension of i-vector, related to the #Gaussians, in the GMM and the amount of the data %nMixNum=128; % 2048 (for RATS) Idx_ite...
github
mvansegbroeck-zz/ivectool-master
make_gfcc.m
.m
ivectool-master/ivec/make_gfcc.m
8,426
utf_8
7f4de9d5934ddf6baf6f1a2817da972e
function make_gfcc(wav_list) % Generate MFCC features in HTK format (*.mfc) % for the files given in the database file % wav_list: list of wav files to be processed if ~exist('wav_list', 'var') fprintf(1, 'Input file list is missing!\n'); exit; end fd=fopen(wav_list,'r'); list_files=textscan...
github
mvansegbroeck-zz/ivectool-master
Compute_DET.m
.m
ivectool-master/ivec/DETware_v2.1/Compute_DET.m
4,264
utf_8
6bbbdac6f97b52ea4458058f88c248bf
function [Pmiss, Pfa] = Compute_DET(true_scores, false_scores) %function [Pmiss, Pfa] = Compute_DET (true_scores, false_scores) % % Compute_DET computes the (observed) miss/false_alarm probabilities % for a set of detection output scores. % % true_scores (false_scores) are detection output scores for a set of % det...
github
mvansegbroeck-zz/ivectool-master
Plot_DET.m
.m
ivectool-master/ivec/DETware_v2.1/Plot_DET.m
3,604
utf_8
68c057dc7d5ce51d832102a23cb692dd
function h = Plot_DET (Pmiss, Pfa, plot_code, opt_thickness) %function h = Plot_DET (Pmiss, Pfa, plot_code, opt_thickness) % % Plot_DET plots detection performance tradeoff on a DET plot % and returns the handle for plotting. % % Pmiss and Pfa are the vectors of miss and corresponding false % alarm probabilities to...
github
mvansegbroeck-zz/ivectool-master
ppndf.m
.m
ivectool-master/ivec/DETware_v2.1/ppndf.m
3,906
utf_8
9fc6ba84330e74b6dc6094b95a34bd31
function norm_dev = ppndf (cum_prob) %function ppndf (prob) %The input to this function is a cumulative probability. %The output from this function is the Normal deviate %that corresponds to that probability. For example: % INPUT OUTPUT % 0.001 -3.090 % 0.01 -2.326 % 0.1 -1.282 % 0.5 0.0 % 0.9 ...
github
rsagroup/rsatoolbox_matlab-master
modelRDMs_demo2.m
.m
rsatoolbox_matlab-master/Demos/modelRDMs_demo2.m
1,163
utf_8
9660723aa413065309981a8e198f5957
% modelRDMs is a user-editable function which specifies the models which % brain-region RDMs should be compared to, and which specifies which kinds of % analysis should be performed. % % Models should be stored in the "Models" struct as a single field labeled % with the model's name (use underscores in stead ...
github
rsagroup/rsatoolbox_matlab-master
simulationOptions_demo.m
.m
rsatoolbox_matlab-master/Demos/simulationOptions_demo.m
2,959
utf_8
c7f0701dee0ea6c4461cfa9b9ac88fc5
% simulationOptions_demo % % This function is used to make a simulationOptions struct for use in the % simulation part of the demo. The options should be set to personal % preference. % % Cai Wingfield 7-2010 %__________________________________________________________________________ % Copyright (C) 2010 Medical Resea...
github
rsagroup/rsatoolbox_matlab-master
defineUserOptions2.m
.m
rsatoolbox_matlab-master/Demos/defineUserOptions2.m
5,018
utf_8
a145cf333eacda6b7ddca816096e0c97
% projectOptions_demo is a nullary function which initialises a struct % containing the preferences and details for a particular project; in this case % the demo for the toolbox. It should be edited to taste before a project is % run, and a new one created for each substantially different project (though % the opti...
github
rsagroup/rsatoolbox_matlab-master
simulationOptions_demo_LDt.m
.m
rsatoolbox_matlab-master/Demos/simulationOptions_demo_LDt.m
2,841
utf_8
d41b7be54be5f415a9245f96e5aa7730
% simulationOptions_demo % % This function is used to make a simulationOptions struct for use in the % simulation part of the demo. The options should be set to personal % preference. % % Cai Wingfield 7-2010 %__________________________________________________________________________ % Copyright (C) 2010 Medical Resea...
github
rsagroup/rsatoolbox_matlab-master
projectOptions_demo.m
.m
rsatoolbox_matlab-master/Demos/projectOptions_demo.m
5,032
utf_8
719615c2e54ea4d6e193a2b813741bd9
% projectOptions_demo is a nullary function which initialises a struct % containing the preferences and details for a particular project; in this case % the demo for the toolbox. It should be edited to taste before a project is % run, and a new one created for each substantially different project (though % the...
github
rsagroup/rsatoolbox_matlab-master
projectOptions_DEMO1.m
.m
rsatoolbox_matlab-master/Demos/projectOptions_DEMO1.m
3,199
utf_8
0f849d0c8c32362043d8bc2db92d8fec
% This function which initialises a struct containing the preferences and % details for a particular project; in this case the demo for the toolbox. % It should be edited to taste before a project is run, and a new one % created for each substantially different project (though the options % struct will be saved eac...
github
rsagroup/rsatoolbox_matlab-master
runSearchlightLDC.m
.m
rsatoolbox_matlab-master/+rsa/runSearchlightLDC.m
4,709
utf_8
f742f9deeeabe84a23555350be127a9d
function runSearchlightLDC(searchLight,varargin) % runSearchlightLDC(searchLight,varargin) % Wrapper for the main searchlight function rsa_runSearchlight % This version calculates the LDC from an SPM first-level analysis % New Version takes into account the first-level design matrix % % INPUT: % searchLi...
github
rsagroup/rsatoolbox_matlab-master
concatenateRDMs.m
.m
rsatoolbox_matlab-master/+rsa/+rdm/concatenateRDMs.m
1,304
utf_8
e94aee03769d01742977510fd459d365
function RDMsOut = concatenateRDMs(varargin) % RDMsOut = concatenateRDMs(RDMs1[, RDMs2[, ...]]) % concatenates a number of wrapped RDMs (RDM structures). % the main difference between this function and the similar one called % 'concatRDMs' is that this function requires the input to be wrapped RDM % st % CW 5-2010, 6-...
github
rsagroup/rsatoolbox_matlab-master
averageRDMs_subjectSession.m
.m
rsatoolbox_matlab-master/+rsa/+rdm/averageRDMs_subjectSession.m
4,264
utf_8
edf85b5ec9bdf9c26d417d36ea920204
function RDMs = averageRDMs_subjectSession(varargin) % RDMs = averageRDMs_subjectSession(RDMs): returns the input unchanged (no % operation). RDMs = averageRDMs_subjectSession(RDMs, 'subject'): computes % the subject-averaged RDMs. RDMs = averageRDMs_subjectSession(RDMs, % 'session') RDMs = averageRDMs_subjectSession(R...
github
rsagroup/rsatoolbox_matlab-master
exportfig.m
.m
rsatoolbox_matlab-master/+rsa/+fig/exportfig.m
16,831
utf_8
b853b90bbcaba9d8af0986ebba1f7d8a
function exportfig(varargin) %EXPORTFIG Export a figure to Encapsulated Postscript. % EXPORTFIG(H, FILENAME) writes the figure H to FILENAME. H is % a figure handle and FILENAME is a string that specifies the % name of the output file. % % EXPORTFIG(...,PARAM1,VAL1,PARAM2,VAL2,...) specifies % parame...
github
rsagroup/rsatoolbox_matlab-master
addComparisonBars.m
.m
rsatoolbox_matlab-master/+rsa/+fig/addComparisonBars.m
1,785
utf_8
9a859018a9453467eb8ce8cdcbb0ace4
% this function adds the pairwise copmparison bars to a figure; the 'hold on' % should have been set before executing this function % pairWisePs: an nxn pairwise comparison matrix. This is supposed to be % sorted in descending order of average values (large to small heights) % a horizontal bar would be displayed ...
github
rsagroup/rsatoolbox_matlab-master
fMRISearchlight.m
.m
rsatoolbox_matlab-master/+rsa/+fmri/fMRISearchlight.m
24,662
utf_8
79083f57cc9af57fc82cf17551620bc5
function [varargout] = fMRISearchlight(fullBrainVols, binaryMasks_nS, models, betaCorrespondence, userOptions) % % fMRISearchlight is a function which takes some full brain volumes of data, % some binary masks and some models and perfoms a searchlight in the data within % each mask, matching to each of the models. Sav...
github
rsagroup/rsatoolbox_matlab-master
crossvalIPMraw.m
.m
rsatoolbox_matlab-master/+rsa/+spm/crossvalIPMraw.m
6,493
utf_8
29502724c505d6e0a4c1676e65a58dc1
function G = crossvalIPMraw(Y,SPM,conditionVec,varargin) % function dist=rsa.spm.crossvalIPMraw(Y,SPM,conditionVec,varargin); % First, gets the regression coefficent from the SPM, and prewhitens them. % Prewhiten can be controlled using different methods (run-wise or overall). % The same code is used in rsa.spm.noi...
github
rsagroup/rsatoolbox_matlab-master
spm_create_vol.m
.m
rsatoolbox_matlab-master/+rsa/+spm/spm_create_vol.m
5,060
utf_8
3b5408bd0f3dd0f5ab2278da9aae7907
function V = spm_create_vol(V,varargin) % Create a volume % FORMAT V = spm_create_vol(V) % V - image volume information (see spm_vol.m) %____________________________________________________________________________ % Copyright (C) 2005 Wellcome Department of Imaging Neuroscience % John Ashburner % $Id: spm_create_vol.m...
github
rsagroup/rsatoolbox_matlab-master
getDataFromSPM.m
.m
rsatoolbox_matlab-master/+rsa/+spm/getDataFromSPM.m
4,400
utf_8
523e6fe1b3b1c4d81efd6fe20ccce8d5
function betas = getDataFromSPM(userOptions) % % getDataFromSPM is a function which will extract from the SPM metadata the % correspondence between the beta image filenames and the condition and session % number. % % function betas = getDataFromSPM(userOptions) % % betas --- The array of info. % be...
github
rsagroup/rsatoolbox_matlab-master
makeGifti.m
.m
rsatoolbox_matlab-master/+rsa/+gifti/makeGifti.m
1,756
utf_8
053d379ddd936b504573dc0b1275933d
function makeGifti(file,varargin) % function rsa_makeGifti(file,varargin) % Convert file into the GIFTI file format and write it into % the same directory. Aligns surface with the volume anatomical for the % subject. % % INPUTS % file: full path and file name for the file to be converted % % USEROPTIONS / VARARGIN: ...
github
rsagroup/rsatoolbox_matlab-master
save_gii.m
.m
rsatoolbox_matlab-master/+rsa/+gifti/save_gii.m
21,903
utf_8
8be3caec981ac345280ccccf033321d3
function rsa_save_gii(this,filename,encoding) % Save GIfTI object in a GIfTI format file % FORMAT save(this,filename) % this - GIfTI object % filename - name of GIfTI file to be created [Default: 'untitled.gii'] % encoding - optional argument to specify encoding format, among % ASCII, Base64Binary, G...
github
rsagroup/rsatoolbox_matlab-master
save.m
.m
rsatoolbox_matlab-master/+rsa/@gifti/save.m
20,267
utf_8
aa5357fe19c7be85f66b8f1f38d1dc38
function save(this,filename,encoding) % Save GIfTI object in a GIfTI format file % FORMAT save(this,filename) % this - GIfTI object % filename - name of GIfTI file that will be created % encoding - optional argument to specify encoding format, among % ASCII, Base64Binary, GZipBase64Binary, ExternalFi...
github
rsagroup/rsatoolbox_matlab-master
gifti.m
.m
rsatoolbox_matlab-master/+rsa/@gifti/gifti.m
3,622
utf_8
770f3ed1f17658bff49edbacd0062416
function this = gifti(varargin) % GIfTI Geometry file format class % Geometry format under the Neuroimaging Informatics Technology Initiative % (NIfTI): % http://www.nitrc.org/projects/gifti/ % http://nifti.nimh.nih.gov/ %_____________________________________________________________...
github
rsagroup/rsatoolbox_matlab-master
read_gifti_file.m
.m
rsatoolbox_matlab-master/+rsa/@gifti/private/read_gifti_file.m
5,738
utf_8
8ba32dfda235fde9c266c2fee680204f
function this = read_gifti_file(filename, this) % Low level reader of GIfTI 1.0 files % FORMAT this = read_gifti_file(filename, this) % filename - XML GIfTI filename % this - structure with fields 'metaData', 'label' and 'data'. %__________________________________________________________________________ % Cop...
github
rsagroup/rsatoolbox_matlab-master
isintent.m
.m
rsatoolbox_matlab-master/+rsa/@gifti/private/isintent.m
2,098
utf_8
24b5f1aa2d6630fd9e8c6b38b40cb76f
function [a, b] = isintent(this,intent) % Correspondance between fieldnames and NIfTI intents % FORMAT ind = isintent(this,intent) % this - GIfTI object % intent - fieldnames % a - indices of found intent(s) % b - indices of dataarrays of found intent(s) %____________________________________________...
github
rsagroup/rsatoolbox_matlab-master
ceilingAvgRDMcorr.m
.m
rsatoolbox_matlab-master/+rsa/+stat/ceilingAvgRDMcorr.m
12,980
utf_8
e3023f3f40eba60be02de3b3ef113618
function [ceiling_upperBound, ceiling_lowerBound, bestFitRDM]=ceilingAvgRDMcorr(refRDMestimates,RDMcorrelationType,monitor) % Given a set of reference RDM estimates (e.g. from multiple subjects) in % argument refRDMestimates, this function estimates upper and lower bounds % on the ceiling, i.e. the highest average...
github
rsagroup/rsatoolbox_matlab-master
fisherDiscrTRDM.m
.m
rsatoolbox_matlab-master/+rsa/+stat/fisherDiscrTRDM.m
3,927
utf_8
f8e1cec7130187b350332053c5ff5e9c
function [RDM_fdtFolded_ltv, cv2RDM_fdt_sq] = fisherDiscrTRDM(Xa, Ya, Xb, Yb, condPredIs, RDMmask) % USAGE % [RDM_fdtFolded, sdRDM_fdt] = fisherDiscrTRDM(Xa, Ya, Xb, Yb[, condPredIs, RDMmask) % % % computes a lower-triangular vector of Linear Discriminat t-statistics % (RDM_fdtFolded_ltv) and a folded sym...
github
rsagroup/rsatoolbox_matlab-master
exhaustivePermutations.m
.m
rsatoolbox_matlab-master/+rsa/+stat/exhaustivePermutations.m
3,779
utf_8
e9e4ff52f3626c4a481afc95e4060993
% permutations = exhaustivePermutations(n[, cap]) % % n number of items to be permuted % cap (optional) stop after finding this many % permutations each row is a permutation; they'll be in lexicographic order % % Cai Wingfield 3-2010 function permutations = exhaustivePermutations(varargin) % The following algor...
github
rsagroup/rsatoolbox_matlab-master
randomPermutation.m
.m
rsatoolbox_matlab-master/+rsa/+stat/randomPermutation.m
1,208
utf_8
cc190d60c8fedc5dc5b1ee0cc51b2dcf
function indicesOut = randomPermutation(n) % generates a random vector of n integer numbers from 1 to n. The numbers % are randomly placed in the vector. % Cai Wingfield 2-2010 %__________________________________________________________________________ % Copyright (C) 2010 Medical Research Council import rsa.* import ...
github
YingzhouLi/HMat-master
mempty.m
.m
HMat-master/HMat.m/src/@HMatrix/mempty.m
1,366
utf_8
0a971d973c880acc576ec6a660dad220
function C = mempty(A,B) C = HMatrix(); C.height = A.height; C.width = B.width; C.EPS = A.EPS; C.MAXRANK = A.MAXRANK; if A.blockType == 'E' || B.blockType == 'E' C.blockType = 'E'; elseif A.blockType == 'D' || B.blockType == 'D' C.blockType = 'D'; C.DMat = zeros(A.height,B.width); elseif A.blockType == 'L...
github
YingzhouLi/HMat-master
mrdivide.m
.m
HMat-master/HMat.m/src/@HMatrix/mrdivide.m
4,234
utf_8
9a7f72f8d0a21033822280e6ef09f59e
function C = mrdivide( A, B ) if isa(A,'HMatrix') && isa(B,'HMatrix') C = mempty(A,B'); C = hmrdivideh(A,B,C); elseif isa(A,'LRMatrix') && isa(B,'HMatrix') C = LRMatrix(A.UMat,A.VMat'/B,A.EPS,A.MAXRANK); elseif isa(B,'HMatrix') C = dmrdivideh(A,B); elseif isa(A,'HMatrix') C = H2D(A)/B; end end fu...
github
YingzhouLi/HMat-master
times.m
.m
HMat-master/HMat.m/src/@HMatrix/times.m
2,458
utf_8
2ee8d5e3a704a9f90e7a271f037eb6a6
function C = times( A, B ) if isa(A,'HMatrix') && isa(B,'HMatrix') C = htimesh(A,B); elseif isa(A,'HMatrix') && isa(B,'LRMatrix') C = htimesl(A,B); elseif isa(A,'LRMatrix') && isa(B,'HMatrix') C = ltimesh(A,B); else C = H2D(A) .* H2D(B); end end function C = htimesh(A,B) if A.blockType == 'L' LR...
github
YingzhouLi/HMat-master
plus.m
.m
HMat-master/HMat.m/src/@HMatrix/plus.m
2,502
utf_8
967f44ae9cd4f48f430f8936d4698add
function C = plus( A, B ) if isa(A,'HMatrix') && isa(B,'HMatrix') C = hplush(A,B); elseif isa(A,'HMatrix') && isa(B,'LRMatrix') C = hplusl(A,B); elseif isa(A,'LRMatrix') && isa(B,'HMatrix') C = lplush(A,B); else C = H2D(A) + H2D(B); end end function C = hplush(A,B) if A.blockType == 'L' LRMat = ...
github
YingzhouLi/HMat-master
mtimes.m
.m
HMat-master/HMat.m/src/@HMatrix/mtimes.m
3,957
utf_8
fa65e015ca77b6604980a654a72f2f15
function C = mtimes( A, B ) if isa(A,'HMatrix') && isa(B,'HMatrix') C = mempty(A,B); C = hmtimesh(A,B,C); elseif isa(A,'HMatrix') && isa(B,'LRMatrix') C = LRMatrix(A*B.UMat,B.VMat,B.EPS,B.MAXRANK); elseif isa(A,'LRMatrix') && isa(B,'HMatrix') C = LRMatrix(A.UMat,A.VMat'*B,A.EPS,A.MAXRANK); elseif isa(A...
github
YingzhouLi/HMat-master
mldivide.m
.m
HMat-master/HMat.m/src/@HMatrix/mldivide.m
4,227
utf_8
12fee6e6b0bf0446430700a09010c16c
function C = mldivide( A, B ) if isa(A,'HMatrix') && isa(B,'HMatrix') C = mempty(A',B); C = hmldivideh(A,B,C); elseif isa(A,'HMatrix') && isa(B,'LRMatrix') C = LRMatrix(A\B.UMat,B.VMat,B.EPS,B.MAXRANK); elseif isa(A,'HMatrix') C = hmldivided(A,B); elseif isa(B,'HMatrix') C = A\H2D(B); end end fun...
github
YingzhouLi/HMat-master
minus.m
.m
HMat-master/HMat.m/src/@HMatrix/minus.m
2,508
utf_8
28caf906a55cdf0be1465de58a9ad0df
function C = minus( A, B ) if isa(A,'HMatrix') && isa(B,'HMatrix') C = hminush(A,B); elseif isa(A,'HMatrix') && isa(B,'LRMatrix') C = hminusl(A,B); elseif isa(A,'LRMatrix') && isa(B,'HMatrix') C = lminush(A,B); else C = H2D(A) - H2D(B); end end function C = hminush(A,B) if A.blockType == 'L' LRM...
github
vislab-tecnico-lisboa/vizzy-master
WaistLeftArmFwdKinVizzy.m
.m
vizzy-master/vizzy_description/kinematic_description_matlab/waist_left_arm_fwd_kin/WaistLeftArmFwdKinVizzy.m
6,029
utf_8
c1855a112fccab3118872cb8e8bf65d8
% Edited by Plinio Moreno % Lisbon Nov 2014 % This function computes the vizzy left arm forward kinematic as % described by the CAD files. The kinematics include the % waist. Parameters are given according to the DH notation. Global % forward kinematic is given by T_Ro0 * T_0n. % % Usage: % % [T_Ro0, T_0n, rpy_R...
github
vislab-tecnico-lisboa/vizzy-master
WaistRightArmFwdKinVizzy.m
.m
vizzy-master/vizzy_description/kinematic_description_matlab/waist_right_arm_fwd_kin/WaistRightArmFwdKinVizzy.m
5,911
utf_8
72942fae1a146259ee94c77452d565ad
% Edited by Plinio Moreno % Lisbon Nov 2014 % This function computes the vizzy right arm forward kinematic as % described by the CAD files. The kinematics include the % waist. Parameters are given according to the DH notation. Global % forward kinematic is given by T_Ro0 * T_0n. % % Usage: % % [T_Ro0, T_0n, rpy_...
github
vislab-tecnico-lisboa/vizzy-master
WaistHeadFwdKinVizzy.m
.m
vizzy-master/vizzy_description/kinematic_description_matlab/waist_head_fwd_kin/WaistHeadFwdKinVizzy.m
8,042
utf_8
cf0c082286b43c174908978fec5a9593
% Edited by Plinio Moreno % Lisbon Nov 2014 % This function computes the vizzy head forward kinematic as % described by the CAD files, including the inertial sensor. % The kinematics include the % iCub waist. Parameters are given according to the DH notation. Global % forward kinematic for the right eye are give...
github
vislab-tecnico-lisboa/vizzy-master
RightWristThumbFwdKinVizzy.m
.m
vizzy-master/vizzy_description/kinematic_description_matlab/right_wrist_fingers_fwd_kin/RightWristThumbFwdKinVizzy.m
3,438
utf_8
cf9ce01d8b958b1962065c9b99aa1510
% Edited by Plinio Moreno % Lisbon Nov 2014 % This function computes the vizzy left arm forward kinematic as % described by the CAD files. The kinematics include the % waist. Parameters are given according to the DH notation. Global % forward kinematic is given by T_Ro0 * T_0n. % % Usage: % % [T_Ro0, T_0n, rpy_R...
github
poliquin/io273-master
gibbs2.m
.m
io273-master/ps3/gibbs2.m
10,367
utf_8
5422f07a32a24498ba5e0667c18edd12
%% Question 2 - Gibbs % These functions estimate the Gibbs sampler for pset 3. function [ALPHA, BETA, SIGMA, ystr] = gibbs2(Y,X,runs,initbeta,initsigma) % Returns results from Gibbs Multinomial Probit % INPUTS % Y = N by 1 vector % X = N*K by P vector % P denotes the number of parameters ...
github
poliquin/io273-master
gibbs.m
.m
io273-master/ps3/gibbs.m
10,948
utf_8
7041d705df4e1fbe13c3ae24d04d1cff
%% Question 2 - Gibbs % These functions estimate the Gibbs sampler for pset 3. function [ALPHA, BETA, SIGMA, ystr] = gibbs(Y,X,runs,initbeta,initsigma) % Returns results from Gibbs Multinomial Probit % INPUTS % Y = N by 1 vector % X = N*K by P vector % P denotes the number of parameters ...
github
poliquin/io273-master
moment_inequalities.m
.m
io273-master/ps2/moment_inequalities.m
3,940
utf_8
b5c1ff94f79926d2ebf1ddb86d6eaed0
% moment_inequalities - Simulation estimator for entry without % assumptions on order of entry. Procedure based on Ciliberto and Tamer % (2009). function obj = moment_inequalities(theta, mu, markets,firms, entry, u) % model parameters MU = mu; ALPHA = theta(1); BETA = theta(2); DELTA = theta(3); SIGMA = thet...
github
poliquin/io273-master
hessdiag.m
.m
io273-master/ps2/derivest/hessdiag.m
2,034
utf_8
ff31ada116a5b893f0b1b7ad4ef6336f
function [HD,err,finaldelta] = hessdiag(fun,x0) % HESSDIAG: diagonal elements of the Hessian matrix (vector of second partials) % usage: [HD,err,finaldelta] = hessdiag(fun,x0) % % When all that you want are the diagonal elements of the hessian % matrix, it will be more efficient to call HESSDIAG than HESSIAN. % HESSDIA...
github
poliquin/io273-master
hessian.m
.m
io273-master/ps2/derivest/hessian.m
5,157
utf_8
8e0bddd9a2df4151adbee6e016f767cf
function [hess,err] = hessian(fun,x0) % hessian: estimate elements of the Hessian matrix (array of 2nd partials) % usage: [hess,err] = hessian(fun,x0) % % Hessian is NOT a tool for frequent use on an expensive % to evaluate objective function, especially in a large % number of dimensions. Its computation will use rough...
github
poliquin/io273-master
jacobianest.m
.m
io273-master/ps2/derivest/jacobianest.m
5,850
utf_8
eb3dd9ff0c56b1eb7316f8237dbee253
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
poliquin/io273-master
gradest.m
.m
io273-master/ps2/derivest/gradest.m
2,374
utf_8
8164711b2f9bdaae657fae039afd34f0
function [grad,err,finaldelta] = gradest(fun,x0) % gradest: estimate of the gradient vector of an analytical function of n variables % usage: [grad,err,finaldelta] = gradest(fun,x0) % % Uses derivest to provide both derivative estimates % and error estimates. fun needs not be vectorized. % % arguments: (input) % fun ...
github
poliquin/io273-master
derivest.m
.m
io273-master/ps2/derivest/derivest.m
23,018
utf_8
3198e9636b2275d707eec59dbb9b8a2f
function [der,errest,finaldelta] = derivest(fun,x0,varargin) % DERIVEST: estimate the n'th derivative of fun at x0, provide an error estimate % usage: [der,errest] = DERIVEST(fun,x0) % first derivative % usage: [der,errest] = DERIVEST(fun,x0,prop1,val1,prop2,val2,...) % % Derivest will perform numerical differentiatio...
github
poliquin/io273-master
sec3q2c.m
.m
io273-master/ps1/sec3q2c.m
4,283
utf_8
37a43ce0433f6c76008fa38b2dbf2d21
function [] = sec3q2c() % SEC3Q2C Estimate demand/supply model under different conduct assumptions runs = 1; % number of times to run each model data = load('data/100_3.mat'); cost = data.cost; eta = data.eta; prices = data.prices; prods = data.prods; %profits = data.profits; shares = data.shares; %surplus = data.s...
github
poliquin/io273-master
mktsim.m
.m
io273-master/ps1/mktsim.m
6,049
utf_8
eeb034d4880ed9bd848b5712d04103c5
function [shares, prices, prods, profits, surplus, xi, W, z, eta] = mktsim(j, m) %MKTSIM Draw j products in m markets for BLP simulation. % Simulate 500 individuals per market for m markets with j products, % creating characteristics, cost shifters, prices, and market shares. % Input arguments: ...
github
poliquin/io273-master
merger_foc.m
.m
io273-master/ps1/merger_foc.m
776
utf_8
d1315f019e9766ce6bce1637ae60d697
function foc = merger_foc(P,MC,X,BETA,ALPHA,XI,NU,SIGMA,merger) [shares, sim_DS,sim_XDS]=merger_shr(P,X,BETA,ALPHA,XI,NU,SIGMA); %MERGER_EQUILIBRIUM: coeffmat = [0,1,0;1,0,1;0,0,0]; if merger foc = shares + (P-MC).*sim_DS + coeffmat*(P-MC).*sim_XDS; else foc = shares + (P-MC).*sim_...
github
ENSTABretagneRobotics/moos-ivp-enstabretagne-master
text.m
.m
moos-ivp-enstabretagne-master/scripts/kml/@kml/text.m
1,699
utf_8
e223a6c06b55ec49f50f03f9ad27196e
function target = text(this,long,lat,alt,txt,varargin) %KML.TEXT(long,lat,alt,txt) Writes the text given by txt at the coordinates % given by long, lat and alt. To write in more than one coordinate, pass an % array of coordinates, and a cell of texts, with the same number of members. % % Copyright 2012 Rafa...
github
ENSTABretagneRobotics/moos-ivp-enstabretagne-master
poly.m
.m
moos-ivp-enstabretagne-master/scripts/kml/@kml/poly.m
1,252
utf_8
e9e479698670f5053c919a1bcfd72f88
function target = poly(this,long,lat,varargin) %KML.POLY(long,lat) Draw a closed polygon with vertices given by long, lat. % To change the altitude of the polygon, use KML.POLY(...,'altitude', 10000) % % Copyright 2012 Rafael Fernandes de Oliveira (rafael@rafael.aero) % $Revision: 2.3 $ $Date: 2012/09/05 0...
github
ENSTABretagneRobotics/moos-ivp-enstabretagne-master
transfer.m
.m
moos-ivp-enstabretagne-master/scripts/kml/@kml/transfer.m
6,885
utf_8
c26057fea7de2d53b610a075ccec1655
function target = transfer(this,axisHandle,varargin) %KML.TRANSFER(ax) Transfer the axis from the handle ax to the KML as an overlay. % Example: % k = kml; % t = linspace(0,2*pi,1000); % figure; % plot(t,sin(t)); % k.transfer(gca) % k.run % % The corners of the overlay are taken from the axis limits...
github
SimonSegerblomRex/tdoa-master
matchingdelays.m
.m
tdoa-master/matlab/matchingdelays.m
1,518
utf_8
cd02e41f2593e253b1ea19d037f3f983
function uref = matchingdelays(u,settings) %MATCHINGDELAYS - Limits the delay candidates % % This function... % % uref = MATCHINGDELAYS(u,settings) % % Input: % u - delay data output from getdelays % settings - struct that must have... % % Output: % uref - delays for channels = sett...
github
DobyRahnev/Confidence-leak-master
spear.m
.m
Confidence-leak-master/helperFunctions/spear.m
2,353
utf_8
3df82b087c5ebe9f07043b7c0d7658d4
function [r,t,p]=spear(x,y) %Syntax: [r,t,p]=spear(x,y) %__________________________ % % Spearman's rank correalation coefficient. % % r is the Spearman's rank correlation coefficient. % t is the t-ratio of r. % p is the corresponding p-value. % x is the first data series (column). % y is the second data serie...
github
DobyRahnev/Confidence-leak-master
type2ag.m
.m
Confidence-leak-master/helperFunctions/type2ag.m
6,791
utf_8
e7b49c612ccf6c07129982eca84104ca
function [obs_Ag, exp_Ag, ROCpoints] = type2ag(nR_S1, nR_S2, eqvar, doPlot) % [obs_Ag, exp_Ag, ROCpoints] = type2ag(nR_S1, nR_S2, eqvar, doPlot) % % input % nR_S1, nR_S2 : response counts for S1 and S2 stimuli % eqvar : 1 if assuming equal variance SDT model, 0 otherwise (requires % SDT_MLE_fit) % doPlot : Plot...
github
andreikarpau/DataScienceRepo-master
submit.m
.m
DataScienceRepo-master/Machine Learning Course Projects/Recommender Systems/submit.m
17,515
utf_8
f1320acecad5e41355ce270b4195c3db
function submit(partId, webSubmit) %SUBMIT Submit your code and output to the ml-class servers % SUBMIT() will connect to the ml-class server and submit your solution fprintf('==\n== [ml-class] Submitting Solutions | Programming Exercise %s\n==\n', ... homework_id()); if ~exist('partId', 'var') || isem...