Effacer les filtres
Effacer les filtres

Cross tabulation row percentages

5 vues (au cours des 30 derniers jours)
Sarah Yun
Sarah Yun le 31 Déc 2019
Modifié(e) : TADA le 31 Déc 2019
Hello,
I have a table with 4 columns and 5 rows
I want to display the row values as percentages
example
date sale 1 sale 2 total sales
1989 4 (x%) 3 (x%) 7(x%)
7 would be 100%
now express 4 and 3 in terms of 100%?
How to do this for my table in matlab?
Thank you.

Réponse acceptée

TADA
TADA le 31 Déc 2019
Modifié(e) : TADA le 31 Déc 2019
How about something like that?
t{:,{'sale1','sale2'}} = t{:,{'sale1','sale2'}}./t.totalsales * 100
Given that t is your table, or a copy of that so you don't override your original data

Plus de réponses (0)

Catégories

En savoir plus sur Tables dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by