Question: save using the input varial as the file name

Hi,

 

myproc:=proc(name)
local i;
i:=10;
save i,"i_name";
end proc;

myproc(bob);

basically, I want to save the value i in the file that has name i_bob in this case.

how should I do that?

and dose it work the same way with Matrix? say I would like to Export a Matrix with name Matrix_bob, (or whatever I input in the myproc proceudre? )

 

Thanks.

 

Please Wait...