HP Forums
Prime: Quick and Dirty AXL - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: Prime: Quick and Dirty AXL (/thread-252098.html)



Prime: Quick and Dirty AXL - Helge Gabert - 10-03-2013

Here is an attempt to duplicate the AXL utility (which I find helpful in the 50G); alas, I can't get it work with symbolic elements in either vectors or lists - - but it works with integers, reals, and complex values as elements in both HOME and CAS.

No doubt it can be optimized.

EXPORT AXL(r)
BEGIN
LOCAL b, n, j;
SIZE(r)->n;

IF TYPE(r)==4 THEN
b:={};
FOR j FROM 1 TO n(1) DO
CONCAT(b,r(j))->b;
END;

ELSE

IF TYPE(r)==6 THEN
MAKEMAT(0,n)->b;
FOR j FROM 1 TO n DO
r(j)->b(1,j);
END;

ELSE
RETURN "Error: Not list or vector";
END;

END;
b;
END;