I’m trying to create a permutation with Field_A, Field_B, Field_C, taking a value from each field once a time to create a vector (Answer) with 3 elements . Field_A = [50 60 70 80] Field_B = [ 10 30 90 100] Field_C = [100 500 700 1000] Only one value should be selected from each field to create all possible answers (Vector of three elements). The answers should be 3 values only such as below Answer1 = [Field A = 50 Field B =10 Field C =100] Answer2 = [Field A =70 Field B=90 Field C =100] The order can be changed as long each field is chosen Answer1 = [Field B = 10 Field A=50 Field C =100] However, I do not want two answers from the same field to be chosen as [Field A = 50 Field A=60 Field B= 10].
MATLAB: How to compute Permutation with repetition, (One Value From Each Vector Only)
permutation
Related Question
- Matlab change structure field name by comparing it with a list of conversions
- Read data from cell—structure–multiple fields to table
- I need to manipulate this matrix
- Validate function inputs independent of position and name
- How to assign the same value to every field, including nested fields of a structure
Best Answer