フィルターのクリア

multiplying a 1xn vector to each element of a 1xm vector to create a 1xmn vector

1 回表示 (過去 30 日間)
Bahareh
Bahareh 2015 年 10 月 7 日
編集済み: Bahareh 2015 年 10 月 7 日
Hello all, I have a 1xn vector, say d=[ 1 -1 -1 1] and would like to multiply it by each element of a 1xm vector say v=[-1+ 1i 1+ 1i 1- 1i 1- 1i 1+ 1i] to create a 1xmn vector. What is the most efficient way of doing that? Thank you!

採用された回答

Thorsten
Thorsten 2015 年 10 月 7 日
編集済み: Thorsten 2015 年 10 月 7 日
x = d'*v;
x = x(:);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by