%!demo
%! ## `movevars` reorders variables, placing one (or several) `'Before'` or
%! ## `'After'` another — the data is unchanged, only the column order shifts.
%!
%! Name = string ({'Sanchez'; 'Johnson'; 'Li'});
%! Age = [38; 43; 40];
%! Gender = categorical ({'M'; 'M'; 'F'});
%! Visit = datetime (2024, [1; 2; 3], [5; 6; 7]);
%! T = table (Name, Age, Gender, Visit)
%! movevars (T, 'Visit', 'After', 'Name')
%!
%! ## Move a variable to the front by placing it before the first one.
%! movevars (T, 'Gender', 'Before', 'Name')
