presenting result in a table

조회 수: 3(최근 30일)
Esegboria Osarhemen
Esegboria Osarhemen 2019년 3월 3일
댓글: Rena Berman 2019년 3월 5일
이 질문에 Star Strider 님이 플래그를 지정함
How can I create a matrix/table like the one in the attached photo using the given data
  댓글 수: 1
Rena Berman
Rena Berman 2019년 3월 5일
(Answers Dev) Restored edit

댓글을 달려면 로그인하십시오.


Sheng Chen
Sheng Chen 2019년 3월 3일
You can try table():
LastName = {'Sanchez';'Johnson';'Li';'Diaz';'Brown'};
Age = [38;43;38;40;49];
Smoker = logical([1;0;1;0;1]);
Height = [71;69;64;67;64];
Weight = [176;163;131;133;119];
BloodPressure = [124 93; 109 77; 125 83; 117 75; 122 80];
T = table(LastName,Age,Smoker,Height,Weight,BloodPressure);
Also, please refer to Table array with named variables that can contain different types and see if this is what you want.


Find more on Matrices and Arrays in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by