How to group columns into deciles?

3 次查看(过去 30 天)
gcicceri
gcicceri 2020-6-16
Hy guys,
I have this table composed by strings:
DateTime 1 2 3 4 5
___________ ______ ______ ______ ______ ______
01-Jan-1990 "Var5" "Var3" "Var1" "Var2" "Var4"
02-Jan-1990 "Var3" "Var5" "Var1" "Var2" "Var4"
03-Jan-1990 "Var5" "Var3" "Var1" "Var2" "Var4"
04-Jan-1990 "Var3" "Var5" "Var1" "Var2" "Var4"
05-Jan-1990 "Var5" "Var3" "Var1" "Var2" "Var4"
My question is:
How do I unpack the columns (already sorted) and take for instance 10%, 20% or 40% of the columns??
Like this (40%):
DateTime 1 2
___________ ______ ______
01-Jan-1990 "Var5" "Var3"
02-Jan-1990 "Var3" "Var5"
03-Jan-1990 "Var5" "Var3"
04-Jan-1990 "Var3" "Var5"
05-Jan-1990 "Var5" "Var3"
Which function to use?
Thanks a lot.

回答(1 个)

Cris LaPierre
Cris LaPierre 2020-6-16

类别

Help CenterFile Exchange 中查找有关 Dates and Time 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by