Reshaping a table with date and characteristics in rows

조회 수: 7 (최근 30일)
alpedhuez
alpedhuez 2021년 8월 11일
편집: alpedhuez 2021년 8월 11일
Suppose I start with the table
date age18-24 age 25-34
1/1/2021 10 10
1/2/2021 20 30
Then want to generate a table
group date visitor
age 18-24 1/1/2021 10
age 18-24 1/2/2021 20
age 25-34 1/1/2021 10
age 25-34 1/2/2021 30
A brute force would be to vertically concatenate the tables and remove redundant columns. What function or procedures shall one use?

채택된 답변

Cris LaPierre
Cris LaPierre 2021년 8월 11일

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by