Effacer les filtres
Effacer les filtres

Take user inputs via a for loop and then apply 'CrossTab'

4 vues (au cours des 30 derniers jours)
Saurav Roy
Saurav Roy le 3 Nov 2020
Hello everyone,
I want a chi-square statistics value hence I want to user the function crosstab using n number of variables. Although this is permitted if I manually add the individual variables myself. (in the form of x = crosstab(a1, a2,...an)).
But in this scenario, I am asking the user to select 'n' number of data values (each is a column of categorical data) using a for loop. How do I input all the selected columns at once and apply the crosstab function ?
(
Maybe somthing like, a = [a1, ..., an]; x = crosstab(a); % This doesn't work though.
)

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by