<< load | Stream manager | sscanf >> |
save(filename) |
save(filename, version, var1, ..., varN) |
save(filename, '-append', ...) |
save(filename, '-mat', ...) |
save(filename, '-nh5', ...) |
save(filename, '-nocompression', ...) |
a string: .nh5 or .mat filename. extension defines format used .mat or .nh5 (default)
string: Names of variables to save from Nelson's workspace.
mat file version used ('-v7.3'). This option will force '-mat'.
forces to save as mat file (default '-nh5').
forces to save as nh5 file (default '-nh5').
append variables to an existing .nh5/.mat file (-v7.3 only).
disable .nh5/.mat file compression.
save save workspace variables to .nh5 or .mat file.
A = ones(3, 4);
B = 'hello for open mat users';
save([tempdir(), 'example_load.mat'], 'A', 'B')
clear;
st = load([tempdir(), 'example_load.mat']);
who
st.A
st.B
clear
who
load([tempdir(), 'example_load.mat']);
who
A
B
append variables
C = eye(3, 4);
save([tempdir(), 'example_load.mat'], 'C', '-append')
clear;
st = load([tempdir(), 'example_load.mat']);
who
st.A
st.B
st.C
clear
who
load([tempdir(), 'example_load.mat']);
who
A
B
C
compression
C = eye(1000, 1000);
save([tempdir(), 'example_save_with_compression.mat'], 'C')
save([tempdir(), 'example_save_no_compression.mat'], 'C', '-nocompression')
with_compression = dir([tempdir(), 'example_save_with_compression.mat'])
no_compression = dir([tempdir(), 'example_save_no_compression.mat'])
Version | Description |
---|---|
1.0.0 | initial version |
Allan CORNET