From 69d4f1c761291d2c33c4b22454877402465b2c48 Mon Sep 17 00:00:00 2001 From: "Thomas Bushnell, BSG" Date: Sun, 4 Dec 2005 20:03:34 -0800 Subject: Import Debian changes 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. --- linterp.txi | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 linterp.txi (limited to 'linterp.txi') 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 + -- cgit v1.2.3