[Maxima] Dynamically declare variables
ptomaine at bk.ru
Wed May 9 06:50:41 CDT 2007
I am a newbie to Maxima and I have a question.
I have a lot of variables: K111, K112, K113, K121, etc. And want to
declare all of them constant.
for i : 1 thru 3 do
for j : 1 thru 3 do
for k : 1 thru 3 do
declare( concat('K, i, j, k), constant );
Improper argument to declare:
concat('K, i, j, k)
-- an error. To debug this try debugmode(true);
What is correct way to achive the same result as with the following?
declare( K111, constant );
declare( K112, constant );
declare( K333, constant );
Thanks in advance, ptomaine//
More information about the Maxima