summaryrefslogtreecommitdiffstats
path: root/linterp.txi
diff options
context:
space:
mode:
authorThomas Bushnell, BSG <tb@debian.org>2005-12-04 20:03:34 -0800
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:33 -0800
commit69d4f1c761291d2c33c4b22454877402465b2c48 (patch)
treee46e0725a432b1f6460515fa521da6bb174bb226 /linterp.txi
parentf351d4a6571016e8a571e274032891e06e03911a (diff)
downloadslib-69d4f1c761291d2c33c4b22454877402465b2c48.tar.gz
slib-69d4f1c761291d2c33c4b22454877402465b2c48.zip
Import Debian changes 3a2-3debian/3a2-3
slib (3a2-3) unstable; urgency=low * Brought all source files up-to-date with upstream CVS. Repeat changes from version 3a2-1 in Makefile.
Diffstat (limited to 'linterp.txi')
-rw-r--r--linterp.txi36
1 files changed, 36 insertions, 0 deletions
diff --git a/linterp.txi b/linterp.txi
new file mode 100644
index 0000000..14861f6
--- /dev/null
+++ b/linterp.txi
@@ -0,0 +1,36 @@
+@code{(require 'array-interpolate)}
+
+
+@defun interpolate-array-ref ra x1 @dots{} xj
+
+
+@var{ra} must be an array of rank j containing numbers. @code{interpolate-array-ref} returns a
+value interpolated from the nearest j-dimensional cube of elements
+of @var{ra}.
+
+@example
+(interpolate-array-ref '#2A:fixZ32b((1 2 3) (4 5 6)) 1 0.1)
+ ==> 4.1
+(interpolate-array-ref '#2A:fixZ32b((1 2 3) (4 5 6)) 0.5 0.25)
+ ==> 2.75
+@end example
+@end defun
+
+
+@deffn {Procedure} resample-array! ra1 ra2
+
+
+@var{ra1} and @var{ra2} must be numeric arrays of equal rank. @code{resample-array!} sets @var{ra1} to
+values interpolated from @var{ra2} such that the values of elements at the
+corners of @var{ra1} and @var{ra2} are equal.
+
+@example
+(define ra (make-array (A:fixZ32b) 2 2))
+(resample-array! ra '#2A:fixZ32b((1 2 3) (4 5 6)))
+ra ==> #2A:fixZ32b((1 3) (4 6))
+(define ra (make-array (A:floR64b) 3 2))
+(resample-array! ra '#2A:fixZ32b((1 2 3) (4 5 6)))
+ra ==> #2A:floR64b((1.0 3.0) (2.5 4.5) (4.0 6.0))
+@end example
+@end deffn
+