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.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- 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)