aboutsummaryrefslogtreecommitdiff
path: root/sys/mwcs/mwvmul.gx
blob: 1c5f48679e005b81bf098fc7649efaca2687a7fd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.

# MW_VMUL -- Vector multiply.

procedure mw_vmul$t (a, b, c, ndim)

PIXEL	a[ndim,ndim]		#I input matrix
PIXEL	b[ndim]			#I input vector
PIXEL	c[ndim]			#O output vector
int	ndim			#I system dimension

int	i, j
PIXEL	v

begin
	do j = 1, ndim {
	    v = 0
	    do i = 1, ndim
		v = v + a[i,j] * b[i]
	    c[j] = v
	}
end