DATA ARRANGEMENT AND COMBINATION
Afficher commentaires plus anciens
I have 11 value of D and 11 value of E and 11 value of F. The different values of D and E and F are given below.
D = -.018+.0002*(0:10);
E = 175+ 1*(0:10);
F = 368+ 1*(0:10);
There will be total 11*11*11 =1331 comibation and I want all different combination in arranage manner
eg - 1st combination : -.018 & 175 & 368
2nd combination : -.018 & 175 & 369
3rd combination : -.018 & 175 & 370
.
.
11 combination : -.018 & 175 & 378
12 combination: -.018 & 176 & 368
13 combination: -0.018 & 176 & 369
.
.
121 combination: -0.018 & 185 & 378
122 combination: -0.0178 & 175 & 368
.
.
1331 combination: -0.016 & 185 & 378
so my D(1)=D(2)=.....D(121) = -.018
D(122)=D(123)=...D(242)= -.0178
D(1221)= D(1222)=...D(1331)= -.016
E(1)=E(2)=...E(11)= 175
E(12)= E(13)=...E(22)=176
E(111)=....E(121)= 185
E(122)=...E(132)= 175
F(1)= 368, E(2)=369.......F(11)= 378
F(12)=368,F(13)=369....F(22)=378
Please help me to write the code so I can get all 1331 value of D and 1331 value of E and 1331 value of F
Réponses (1)
D = -.018+.0002*(0:10);
E = 175+ 1*(0:10);
F = 368+ 1*(0:10);
[E,F,D] = meshgrid(E,F,D);
D = D(:);
E = E(:);
F = F(:);
result = [D E F];
disp(result(1:121,:))
disp(result(122:242,:))
disp(result(end-120:end,:))
Catégories
En savoir plus sur Develop Apps Using App Designer dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!