Info
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
could anyone help me to solve the issue.
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Walter Roberson
il 11 Set 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} ?
Risposte (0)
Questa domanda è chiusa.
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!