Info

This question is closed. Reopen it to edit or answer.

could anyone help me to solve the issue.

1 view (last 30 days)
jaah navi
jaah navi on 11 Sep 2019
Closed: MATLAB Answer Bot on 20 Aug 2021
code:
A=partitions(4)
partdisp(A)
where partitions and partdisp are functions
when i run the above code it executes and gives the following result
The formation of clusters {1 2 3 4}:
{1 2 3 4}
{1 2 3} {4}
{1 2 4} {3}
{1 2} {3 4}
{1 2} {3} {4}
{1 3 4} {2}
{1 3} {2 4}
{1 3} {2} {4}
{1 4} {2 3}
{1} {2 3 4}
{1} {2 3} {4}
{1 4} {2} {3}
{1} {2 4} {3}
{1} {2} {3 4}
{1} {2} {3} {4}
with respect to the result i need to avoid the formation which contains {2 3},{2,4},{3,4}.
Could anyone please help me on it.
  4 Comments
jaah navi
jaah navi on 11 Sep 2019
yes.I got it form the link.
but I dont want to display all the formation.
I need to remove the formation which contains {2,3},{3,4},{2,4}.
could you please help me how to remove it.
Walter Roberson
Walter Roberson on 11 Sep 2019
Remove the entries of A that would meet those conditions before you do the partdisp()
The partitions code returns a cell array row vector (one column). Each row is a cell array with possibly multiple entries. So for example for row K, A{K} would be a cell array whose entries are each a subset.
Given one particular partitioning expressed as a cell array, how would you test whether it has an entry which is {2,3}, {2,4}, or {3,4} ?

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!