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

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?

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

1,773

Your Answer

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.


You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.