Info

此问题已关闭。 请重新打开它进行编辑或回答。

how to specify which matrix i use

1 次查看(过去 30 天)
Christos
Christos 2012-8-31
关闭: MATLAB Answer Bot 2021-8-20
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.

回答(0 个)

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by