Azzera filtri
Azzera filtri

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

4 visualizzazioni (ultimi 30 giorni)
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.
)

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by