struct2table
📝 Syntax
📥 Input argument
📤 Output argument
📄 Description
💡 Examples
🔗 See also
🕔 History
Version
📄 Description
Last updated
Last updated
% Define a structure array
S(1).Name = 'Alice';
S(1).Age = 30;
S(1).Height = 5.5;
S(2).Name = 'Bob';
S(2).Age = 25;
S(2).Height = 6.0;
% Convert the structure array to a table
T = struct2table(S)
S = struct();
S(1).a = [10 20];
S(2).a = [30 40];
S(1).b = 50;
S(2).b = 60;
T = struct2table(S)S = struct();
S.a = [1;2;3]
S.b = [4 5;6 7;8 9]
T = struct2table(S)S = struct();
S(1).a = [10 20];
S(2).a = [30 40 50];
S(1).b = 70;
S(2).b = 80;
T = struct2table(S)