What is this?
writedata requires me to know whether the thing I will be writing is string, integer or floating.
I want to write a matrix where the type of entries can vary.
Is there any way to do this with writedata?
Use fprintf. For example:
> A := << a^2| 3.5>, < 2 | b>>; fprintf("myfile.txt","%{c,}a\n", A); close("myfile.txt");
and the file should contain:
a^2,3.5 2,b
Thanks Robert!
fprintf
Use fprintf. For example:
> A := << a^2| 3.5>, < 2 | b>>; fprintf("myfile.txt","%{c,}a\n", A); close("myfile.txt");and the file should contain:
a^2,3.5
2,b
thanks!
Thanks Robert!