multiplication question in 3 dim

1 回表示 (過去 30 日間)
Ole
Ole 2020 年 7 月 9 日
回答済み: madhan ravi 2020 年 7 月 9 日
Let say there is matrix from meshgrid X,Y.
How to multiply it through a vector L in building third dimension of a F matrix ?
Each component of L(k) will miltiply X for example for the third dimension.
x = 0:1:5; y = 0:2:40
L = 1:0.1:10; % third dimension
[X, Y] = meshgrid(x,y);
F = (X.*Y).*L % problematic
F is two dimensions in X,Y and third dimention in L
And I would like how to access rows and colums and depth for this matrix ?

採用された回答

madhan ravi
madhan ravi 2020 年 7 月 9 日
F = (X.*Y) .* reshape(L, 1, 1, [])

その他の回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by