Resources

How can I save an N-dimensional array to a file?

0

I have some data in an N-dimensional array that I would like to save to a file to use later. Do I have to convert it back to matrices before I save it? Or can I save it as an N-dimensional array?

Tags: asked November 21, 2012
aptech
342

1 Answer

0
accepted

Yes, you may save multi-dimensional arrays with the ‘save’ command and load them into GAUSS later with the ‘load’ command. The syntax is quite simple. Let us assume that you have a 12x110x9 dimensional array named ‘a’. To save this to disk you would only need to enter:

save a;

This will create a file called ‘a.fmt’ on your hard drive. You can then load that data into a later GAUSS session like this:

load a;

This will create a new variable named ‘a’ in your GAUSS workspace with the contents loaded from the ‘a.fmt’ file you saved previously.

aptech
342