MATLAB Answers

Adi Nor
0

If each element of vector with size (1,3) takes one value of 4 discrete values. How can I obtain all possible combinations of this vector?

Asked by Adi Nor
on 7 May 2017
Latest activity Commented on by Azzi Abdelmalek
on 7 May 2017
If each element of vector with size (1,3) takes one value of 4 discrete values [0 0.625 1.25 2.5]. How can I obtain all possible combinations of this vector?

  0 Comments

Sign in to comment.

1 Answer

Answer by Azzi Abdelmalek
on 7 May 2017

If the order is not important
v=[0 0.625 1.25 2.5]
id=nchoosek(1:4,3)
out=v(id)

  2 Comments

If the vector size is (1,14). what will the answer ?

Sign in to comment.