dataset2table
R2026bConvert dataset array to table
Syntax
Description
Examples
Load the hospital data set, which contains simulated information for 100 hospital patients.
load hospitalConvert the dataset array to a table.
t = dataset2table(hospital)
t = 100×7 table
LastName Sex Age Weight Smoker BloodPressure Trials
____________ ______ ___ ______ ______ _____________ _______________
YPL-320 {'SMITH' } Male 38 176 true 124 93 {[ 18]}
GLI-532 {'JOHNSON' } Male 43 163 false 109 77 {[ 11 13 22]}
PNI-258 {'WILLIAMS'} Female 38 131 false 125 83 {1×0 double }
MIJ-579 {'JONES' } Female 40 133 false 117 75 {[ 6 12]}
XLK-030 {'BROWN' } Female 49 119 false 122 80 {[ 14 23]}
TFP-518 {'DAVIS' } Female 46 142 false 121 70 {[ 19]}
LPD-746 {'MILLER' } Female 33 142 true 130 88 {[ 13]}
ATA-945 {'WILSON' } Male 40 180 false 115 82 {1×0 double }
VNL-702 {'MOORE' } Male 28 183 false 115 78 {[ 2]}
LQW-768 {'TAYLOR' } Female 31 132 false 118 86 {[ 11]}
QFY-472 {'ANDERSON'} Female 45 128 false 114 77 {[ 8 10 14]}
UJG-627 {'THOMAS' } Female 42 137 false 115 68 {[ 4 9]}
XUE-826 {'JACKSON' } Male 25 174 false 127 74 {1×0 double }
TRW-072 {'WHITE' } Male 39 202 true 130 95 {[ 8]}
ELG-976 {'HARRIS' } Female 36 129 false 114 79 {1×0 double }
KOQ-996 {'MARTIN' } Male 48 181 true 130 92 {[13 15 21 27]}
⋮
Input Arguments
Input dataset array to convert to a table, specified as a dataset array. Each variable in
ds becomes a variable in the output table
t.
Output Arguments
Output table, returned as a table. The table can store metadata such as descriptions, variable units, variable names, and row names. For more information, see Tables.
Version History
Introduced in R2013b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)