フィルターのクリア

how to multiply each of the array with another set of array

1 回表示 (過去 30 日間)
Grace
Grace 2014 年 5 月 6 日
回答済み: Mischa Kim 2014 年 5 月 6 日
Hi everyone, suppose i have a=1,2,3,4 and j=1,2,3 I want to get 1^1, 1^2, 1^3, 2^1, 2^2, 2^3, 3^1, 3^2, 3^3, 4^1, 4^2 and 4^3. How can i go this?

採用された回答

Mischa Kim
Mischa Kim 2014 年 5 月 6 日
Grace, use
a = [1,2,3,4];
j = [1,2,3]';
b = bsxfun(@power,a,j);

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by