You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+23-5
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ Use the <img src=https://user-images.githubusercontent.com/45469701/116359125-a6
17
17
18
18
## Dependencies
19
19
### MATLAB Version
20
-
MATLAB R2019b or higher (mainly for the [arguments ... end syntax checking](https://www.mathworks.com/help/matlab/matlab_prog/function-argument-validation-1.html) at the beginning of functions, which is used extensively throughout). For users of R2007a - R2019a, I suggest removing the arguments ... end syntax for any functions that use this and replacing it with corresponding [inputParser()](https://www.mathworks.com/help/matlab/ref/inputparser.html) and [varargin](https://www.mathworks.com/help/matlab/ref/varargin.html) code to deal with variable input arguments, default parameter values, and repeating arguments. Alternatively, you could remove the arguments ... end syntax lines for each function and update every place that the function is called so that all input arguments are specified. Open up an issue if you need more details on this. Other functions may need to be replaced if they aren't available in early MATLAB versions.
20
+
MATLAB R2019b or higher (mainly for the [arguments ... end syntax checking](https://www.mathworks.com/help/matlab/matlab_prog/function-argument-validation-1.html) at the beginning of functions, which is used extensively throughout).
21
21
22
22
#### R2007a - R2019a
23
23
I suggest removing the arguments ... end syntax for any functions that use this and replacing it with corresponding [inputParser()](https://www.mathworks.com/help/matlab/ref/inputparser.html) and [varargin](https://www.mathworks.com/help/matlab/ref/varargin.html) code to deal with variable input arguments, default parameter values, and repeating arguments. Alternatively, you could remove the arguments ... end syntax lines for each function and update every place that the function is called so that all input arguments are specified. Open up an issue if you need more details on this. Other functions may need to be replaced if they aren't available in early MATLAB versions.
@@ -61,29 +61,47 @@ If you only want to (manually) compute distances in the VFZ sense, first you nee
61
61
```matlab
62
62
npts = 100;
63
63
o = get_ocubo(npts); %generate some random data
64
-
o = get_octpairs(o); %symmetrize (using default reference GBO)
To convert to the traditional GBO distance, multiply $d_E$ by a factor of `2`.
77
+
78
+
71
79
Alternatively, `pdist2()` may be of interest if you want pairwise distances between two sets of points, or `vecnorm()` if you want to calculate distances between two lists of GBOs:
72
80
```matlab
73
81
npts2 = 100;
82
+
o1 = get_ocubo(npts1);
83
+
o1 = get_octpairs(o1);
84
+
o1 = normr(o1);
85
+
74
86
o2 = get_ocubo(npts2);
75
87
o2 = get_octpairs(o2);
88
+
o2 = normr(o2)
89
+
76
90
d = vecnorm(o1-o2,2,2); %o1 and o2 need to be the same size
77
91
```
78
92
If you want the "true" minimum distances (i.e. essentially the same implementation as [GB_octonion_code](https://github.com/ichesser/GB_octonion_code), but vectorized and parallelized), you may use `GBdist4.m` directly with two sets of GBOs.
79
93
```matlab
80
-
d = GBdist4(o1,o2);
94
+
d = GBdist4(o1,o2,dtype="norm");
95
+
```
96
+
It depends on the application, but if you want to compute large pairwise distance matrices that are nearly identical to the traditional GBO distances, I recommend using the ensembled VFZ distance via `ensembleGBdist.m` with `K >= 10`.
97
+
```matlab
98
+
d = ensembleGBdist(o,o2,dtype="omega")
81
99
```
82
-
It depends on the application, but if you want to compute large pairwise distance matrices that are nearly identical to the traditional GBO distances, I recommend using the ensembled VFZ distance via `ensembleGBdist.m` with `K >= 10`. This will be much faster than using `GBdist4.m`. For reference, this corresponds to (from the main paper when `K==10`):
100
+
This will be much faster than using `GBdist4.m`. For reference, this corresponds to (from the main paper when `K==10`):
This is distinct from `ensembleVFZO.m`, which takes the average interpolated property from `K` different VFZs.
85
103
86
-
Drop me a note in "Issues" if you have something you'd like to do or something you'd like to clarify, but can't figure out among the (many) options and functions in the `interp` repo. With a few details, there's a good chance I can offer some suggestions that will save a lot of time.
104
+
[Open an issue](https://github.com/sgbaird-5DOF/interp/issues/new/choose) if you have something you'd like to do or something you'd like to clarify, but can't figure out among the (many) options and functions in the `interp` repo. With a few details, there's a good chance I can offer some suggestions that will save a lot of time.
87
105
88
106
## Plots
89
107
Most plots in the paper are produced in the script: [plotting.m](code/plotting.m). First, you need to create a dummy folder:
0 commit comments