HP Forums
matrix programming ... - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: matrix programming ... (/thread-14866.html)



matrix programming ... - jtamezga - 04-18-2020 06:06 PM

It is possible to program or create an empty matrix when i´m trying to request first time data? ... i´m using this commands, but it's necessary to put some initial values (ceros in this case) when i establish number of columns (and rows) in stack view:

EXPORT Destats()
BEGIN
LOCAL mat,var;
var:=Ans(1);
mat:=MAKEMAT(0,var,var);
mat:=EDITMAT(mat);
END;

Best regards ... JT


RE: matrix programming ... - toml_12953 - 04-18-2020 08:45 PM

(04-18-2020 06:06 PM)jtamezga Wrote:  It is possible to program or create an empty matrix when i´m trying to request first time data? ... i´m using this commands, but it's necessary to put some initial values (ceros in this case) when i establish number of columns (and rows) in stack view:

EXPORT Destats()
BEGIN
LOCAL mat,var;
var:=Ans(1);
mat:=MAKEMAT(0,var,var);
mat:=EDITMAT(mat);
END;

Best regards ... JT

Every element of a matrix has to have some value in it. Zero is as good a starting place as any, no?