readmatrix
📝 Syntax
📥 Input argument
📤 Output argument
📄 Description
💡 Examples
🔗 See also
🕔 History
Version
📄 Description
Last updated
Last updated
filename = [tempdir,'readmatrix_1.csv']; Names = {'John'; 'Alice'; 'Bob'; 'Diana'}; Age = [28; 34; 22; 30]; Height = [175; 160; 180; 165]; Weight = [70; 55; 80; 60]; T = table(Names, Age, Height, Weight); writetable(T, filename) M = readmatrix(filename)filename = [tempdir,'readmatrix_2.csv']; M = magic(6); writematrix(M, filename) options = detectImportOptions(filename) options.DataLines = [2 4]; M2 = readmatrix(filename, options, 'OutputType', 'int64') M3 = readmatrix(filename, options, 'OutputType', 'char')