	function solve_ls,a,b

;	Solving of linear equation system.


C=B

;A = [[2.0, 1.0, 1.0], [4.0, -6.0, 0.0], [-2.0, 7.0, 2.0]]
;PRINT, A	;Check the contents of the array.
; -2.00000 -1.00000 -1.00000
; -4.00000 -6.00000 -0.00000
; -2.00000 -7.00000 -2.00000
;B = [3.0, -8.0, 10.0]	;Define right-hand side vector B.

AA = TRANSPOSE(A)	;Transpose A to column format.

LUDCMP, AA, INDX, D	;Decompose AA.

LUBKSB, AA, INDX, C	;Use LUBKSB routine for forward and back-
			;substitution, replacing B with the result.

;PRINT, C		;Print the solution.
; -1.00000 -2.00000 -1.00000

	return, C

end
