A non-standard array operation, is there an easier way?

2 ビュー (過去 30 日間)
osminbas
osminbas 2013 年 3 月 26 日
Hello,
I am trying to create a matrix by multiplication of two other but it is not a standard multiplication:
A=1x3 array
B=100x1 array
C = [A(1,1)*B, A(1,2)*B, A(1,3)*B];
Is there an easier way to create the C matrix? Thanks.
  1 件のコメント
Image Analyst
Image Analyst 2013 年 3 月 26 日
So what's wrong with that way? Looks fine to me.

サインインしてコメントする。

回答 (2 件)

Matt J
Matt J 2013 年 3 月 26 日
Looks like pretty standard matrix multiplication to me, given the dimensions you've provided,
C=B*A;

Sean de Wolski
Sean de Wolski 2013 年 3 月 26 日
You're in luck:
C = kron(A,B)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by