MATLAB program to split a given matrix A into two matrices B & C such that B+C=A.
Hi,
Can you help me splitting a matrix A into B & C such that B+C=A? I need a code to generate all possible combinations of B & C.
For example, if A=[1 2 2 4;2 4 3 0;8 4 0 5;-3 4 5 0] then, B=[1 0 2 0;0 0 3 0;8 4 0 0;-3 0 0 0] and C=[0 2 0 4;2 4 0 0;0 0 0 5;0 4 5 0] are a pair of suitable combinations. I need all possible combinations in which (almost) half of the non zero elements are in B and remaining are in C.
Thank you.Hi,
Can you help me splitting a matrix A into B & C such that B+C=A? I need a code to generate all possible combinations of B & C.
For example, if A=[1 2 2 4;2 4 3 0;8 4 0 5;-3 4 5 0] then, B=[1 0 2 0;0 0 3 0;8 4 0 0;-3 0 0 0] and C=[0 2 0 4;2 4 0 0;0 0 0 5;0 4 5 0] are a pair of suitable combinations. I need all possible combinations in which (almost) half of the non zero elements are in B and remaining are in C.
Thank you. Hi,
Can you help me splitting a matrix A into B & C such that B+C=A? I need a code to generate all possible combinations of B & C.
For example, if A=[1 2 2 4;2 4 3 0;8 4 0 5;-3 4 5 0] then, B=[1 0 2 0;0 0 3 0;8 4 0 0;-3 0 0 0] and C=[0 2 0 4;2 4 0 0;0 0 0 5;0 4 5 0] are a pair of suitable combinations. I need all possible combinations in which (almost) half of the non zero elements are in B and remaining are in C.
Thank you. split matrix MATLAB Answers — New Questions