-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfindcombosSS.m
More file actions
31 lines (25 loc) · 869 Bytes
/
Copy pathfindcombosSS.m
File metadata and controls
31 lines (25 loc) · 869 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
% function [combos] = findcombosSS(Nruns)
%--------------------------------------------------------------------------
% Jade Crosbie kcrosbie@usgs.gov
% Geology, Geophysics, and Geochemistry Science Center
% U.S. Geological Survey
% Created: Oct 10 2020
% Updated: Jan 6 2020
% MATLAB version: 2019b
%--------------------------------------------------------------------------
% Computes an array of indices of all combinations of runs from a
% station for SS, good for identifying bad runs that shouldn't be used in
% RR or MMT
% INPUT
% Nruns = number of runs for a station
% OUTPUT
% combos = Array with indices for all combos of runs.
function [combos] = findcombosSS(Nruns)
ii = 1;
ik = 1;
while ii <= Nruns
combos{ik} = nchoosek([1:Nruns],ii)
ii = ii + 1;
ik = ik + 1;
end
end