Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

how to specify which matrix i use

1 Ansicht (letzte 30 Tage)
Christos
Christos am 31 Aug. 2012
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
hello folks. i have a general programming question. I have a matrix lets say D. In regression its called the design matrix. I want to apply some functions in all possible submodels for regression. The design matrix for each of those sub models consists of a subset of columns of D. I used
C=arrayfun(@(x) D(:,logical(dec2bin(x,qq)-'0')), 1:2^qq-1, 'unif', 0);
C{:};.
This way i created a cell matrix C whith elements all possible combinations of columns taken from D. So, i want to apply some functions in each element(matrix) of C. My question is how can i know for each element of C which columns are used from D. i.e. i want a function or something that will tell me that C{1,3} contains the matrix that consists of columns 1 and 2 of D for example.
Thanks for your time.

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by