Statistic Toolbox all combinations 6 Parameter

Hi guys :) i need some Help with the Statistic Toolbox. i have 6 parameters. a,b,c,d,e,f. All these Parameters can be 0.3 0.5 -0.3 -0.5 Now i want to create an matrix where all possible combinations are listed.
In the documentation i found this function nchoosek. Has sb an idea how i can do this ?
Hope that sb can Help me thx

回答 (1 件)

dpb
dpb 2018 年 7 月 15 日

0 投票

D=fullfact(4*ones(1,6));
fullfact returns the design levels as 1:L; to have as wanted levels since they're all same for each factor
>> D(1:5,:)
ans =
1 1 1 1 1 1
2 1 1 1 1 1
3 1 1 1 1 1
4 1 1 1 1 1
1 2 1 1 1 1
>> L=[-0.5 -0.3 0.3 0.5];
>> D=L(D);
>> D(1:5,:)
ans =
-0.5000 -0.5000 -0.5000 -0.5000 -0.5000 -0.5000
-0.3000 -0.5000 -0.5000 -0.5000 -0.5000 -0.5000
0.3000 -0.5000 -0.5000 -0.5000 -0.5000 -0.5000
0.5000 -0.5000 -0.5000 -0.5000 -0.5000 -0.5000
-0.5000 -0.3000 -0.5000 -0.5000 -0.5000 -0.5000
>>

質問済み:

2018 年 7 月 15 日

回答済み:

dpb
2018 年 7 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by