matlab中编程问题:两个矩阵大小分别为r1*c1、r2*c2,需要对矩阵中的每个元素进行多对多运算,如何实现?

如题所述

使用命令:
kron(A,B)
这个运算叫直积,英文叫
Kronecker

tensor
product.
Matlab
里自带有这个函数,叫kron();
想看如何使用,可以使用help
kron,下面是其中的说明:
KRON(X,Y)
is
the
Kronecker
tensor
product
of
X
and
Y.
The
result
is
a
large
matrix
formed
by
taking
all
possible
products
between
the
elements
of
X
and
those
of
Y.
For
example,
if
X
is
2
by
3,
then
KRON(X,Y)
is
[
X(1,1)*Y
X(1,2)*Y
X(1,3)*Y
X(2,1)*Y
X(2,2)*Y
X(2,3)*Y
]
If
either
X
or
Y
is
sparse,
only
nonzero
elements
are
multiplied
in
the
computation,
and
the
result
is
sparse.
希望这对你的问题有所帮助。
温馨提示:答案为网友推荐,仅供参考
第1个回答  2019-11-28
两个电阻r1和r2并联,总电阻的关系式

根据并联电阻关系,总电阻的倒数等于各电阻倒数之和

1/r=1/r1+1/r2得

r=r1*r2/r1+r2
相似回答