Skip to content

Commit 30d9a29

Browse files
author
arismav
committed
add docs on indexing input structs
1 parent 48b57fc commit 30d9a29

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

docs/src/functions.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,22 @@ weighted_averages(results)
233233

234234
If you want a "quick and dirty" way to exclude
235235
some data points from your imported data, you may
236-
use the 'trim' function.
236+
use indexing on the `input1D`and `input2D`
237+
structures, just like you would on any array.
238+
239+
e.g.: `invert(data[x:end])`, if your first `x`
240+
number of points are noisy.
241+
242+
- `data1D[3:end-2]` excludes the 3 first and last
243+
2 data points for both `x` and `y` elements within
244+
the structure.
245+
246+
- `data2D[3:end-2, :]` excludes the 3 first and
247+
last 2 data points in the direct dimension, and
248+
includes all points on the indirect dimension.
249+
250+
251+
The `trim` function also works:
237252

238253
```@docs
239254
trim(::input1D, ::Int, ::Int)

0 commit comments

Comments
 (0)