Read/Write table to files
📄Description

Nelson reads and writes tables in text-based and binary file formats for common data exchange tasks.

Text files (.csv, .txt, etc.):

Binary file:

Binary format is recommended for preserving exact numeric precision and working with large datasets.

Saved tables preserve the public T.Properties metadata. The internal table representation is not part of the file format contract.

💡Examples
Read/Write table to .nh5 file
% Create a sample table with sensor data
T = table([1.5; -2.3; 4.7], [0.5; 1.1; -0.7], [-1; 2; 3], 'VariableNames', {'Voltage', 'Current', 'Resistance'});
R = T;
filename = [tempdir(), 'table_example.nh5'];
save(filename, '-nh5', 'T');
clear T
load(filename, 'T');
assert(isequal(T, R));
T
Read/Write table to text file
% Create a sample table with sensor data
T = table([1.5; -2.3; 4.7], [0.5; 1.1; -0.7], [-1; 2; 3], 'VariableNames', {'Voltage', 'Current', 'Resistance'});
filename = [tempdir(), 'table_example.csv'];
writetable(T, filename);
T2 = readtable(filename);
🔗See Also
writetablereadtableloadsave
🕔Version History
Version Description
1.10.0 initial version
Edit this page on GitHub