Message 1 of 6
Matrix : create, read, write

Not applicable
11-05-2015
01:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone,
I'm a full beginner in AutoLISP, having a big issue with matrix. Impossible to find clear help, so I require your advices.
I succeded to create a matrix of 3 dimenssions, (almost) succeeded to read an element... but impossible to write one element.
Have you succeedded or found something about this issue ? If not, how to skirt the problem ?
Below are my code to create a matric l x c x p containing the element a :
(defun ctab3 (a l c p / lin col pro) (repeat l (setq lin (cons a lin))) (repeat c (setq col (cons lin col))) (repeat p (setq pro (cons col pro))) )
And there to search an element in lst (matrix l x c x p) at the rank l-c-p (but the transfer of the list doesn't work) :
(defun stab3 (lst p c l) (nth l-1 (nth c-1 (nth p-1 lst))) )