aboutsummaryrefslogtreecommitdiff
path: root/sys/mwcs/mwmmul.gx
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /sys/mwcs/mwmmul.gx
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/mwcs/mwmmul.gx')
-rw-r--r--sys/mwcs/mwmmul.gx23
1 files changed, 23 insertions, 0 deletions
diff --git a/sys/mwcs/mwmmul.gx b/sys/mwcs/mwmmul.gx
new file mode 100644
index 00000000..b86449c2
--- /dev/null
+++ b/sys/mwcs/mwmmul.gx
@@ -0,0 +1,23 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+# MW_MMUL -- Matrix multiply.
+
+procedure mw_mmul$t (a, b, c, ndim)
+
+PIXEL a[ndim,ndim] #I left input matrix
+PIXEL b[ndim,ndim] #I right input matrix
+PIXEL c[ndim,ndim] #O output matrix
+int ndim #I dimensionality of system
+
+int i, j, k
+PIXEL v
+
+begin
+ do j = 1, ndim
+ do i = 1, ndim {
+ v = 0
+ do k = 1, ndim
+ v = v + a[k,j] * b[i,k]
+ c[i,j] = v
+ }
+end