Vector Calculations in LISP - by abidikgubidik How can I perform vector calculations in lisp, such as magnitude of a vector, norm of a vector, distance (between two points), dot product, cross product, etc. Thanks. Read the article
Merging Two Matrixes... in LISP - by abidikgubidik (defun merge-matrix (matrix-1 matrix-2) (if (not (or (eql (matrix-rows matrix-1) (matrix-rows matrix-2)) (null matrix-1) (null matrix-2))) (error "Invalid dimensions.")) (cond ((null matrix-1) (copy-tree matrix-2)) ((null matrix-2) (copy-tree matrix-1)) (t (let ((result (copy-tree matrix-1))) (dotimes (i (matrix-rows matrix-1)) (setf (nth i result) (nconc (nth i result) (nth i matrix-2)))) result)))) (merge-matrix '((3 1) (1 3)) '((4 2) (1 1))) * - EVAL: variable NULL has no value I receive an error like that how I can fix the problem, thanks Read the article