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
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.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Particle & Nuclear Physics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by