本文介绍了反转kron函数值的函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在MATLAB中是否有任何函数或方法可以找到kron函数的逆值?

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

现在我想将代码转换为原始值,即[1 1 -1 ]有什么帮助吗?

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

推荐答案

对于kron的矢量输入,这将起作用-

For vector inputs to kron, this would work -

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

这篇关于反转kron函数值的函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 23:00