mohammad
mohammad

Reputation: 2212

Function to inverse kron function value

Is there any function or any way to find an inverse value to kron function in MATLAB?

matrix = [1 1 -1 ];
code =   [ 1 1 1 -1 -1 -1];
spread_code = kron(matrix,code);

after speading i got the following value

ans =
  Columns 1 through 15
     1     1     1    -1    -1    -1     1     1     1    -1    -1    -1    -1    -1    -1
  Columns 16 through 18
     1     1     1

and now i want to convert the code to it is original value which is [1 1 -1 ] any help please ?

Upvotes: 1

Views: 816

Answers (1)

Divakar
Divakar

Reputation: 221714

For vector inputs to kron, this would work -

spread_code(1:numel(code):end)./code(1)

Upvotes: 3

Related Questions