how to find the weighted sum of two matrices of order 2778x6, the same is like this. any suggestion.

回答 (1 件)

Lukas
Lukas 2018 年 8 月 16 日
I assume, you want to calculate the sum of each matrix element. Weights are defined for each matrix (and usually sum up to 1). Then this is, e.g.:
C = 0.1*A + 0.9*B
If you want to have weights for each element (in A and B), this is:
w = rand(size(A)) % a random weight matrix
C = w.*A + w.*B

カテゴリ

ヘルプ センター および File ExchangeDeep Learning Toolbox についてさらに検索

製品

リリース

R2013a

質問済み:

2018 年 8 月 16 日

回答済み:

2018 年 8 月 16 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by