subtract matrix from vector

1 回表示 (過去 30 日間)
M
M 2022 年 3 月 31 日
コメント済み: M 2022 年 3 月 31 日
There are vector fH with size 14*1 and matrics fD with size 14*128
How can I subtract the first three values of each column of the matrix fD from the first three values of vector fH then divided over the first three values of vector fH then multiply the value by 100??
Then store the new matrix that will be with size 3*128 in RNF
  2 件のコメント
Stephen23
Stephen23 2022 年 3 月 31 日
M
M 2022 年 3 月 31 日
@Stephen, These are different questions!!

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

採用された回答

James Tursa
James Tursa 2022 年 3 月 31 日
Just learn how to use indexing and element-wise operators. From your language, here are the pieces:
subtract
-
the first three values of each column of the matrix fD
fD(1:3,:)
the first three values of vector fH
fH(1:3)
divided over
./
the first three values of vector fH
fH(1:3)
then multiply
*
the value by 100
100
So now that you have the pieces, simply put them together. I will leave that up to you.
  1 件のコメント
M
M 2022 年 3 月 31 日

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeParticle & Nuclear Physics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by