Reshaping a table with date and characteristics in rows

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 投票

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDates and Time についてさらに検索

製品

リリース

R2020b

タグ

質問済み:

2021 年 8 月 11 日

編集済み:

2021 年 8 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by