MATLAB Answers

0

i need to subtract two arrays of different sizes

Asked by Omar Almahallawy on 7 May 2019
Latest activity Answered by KSSV
on 7 May 2019
A= 10 15 20 25
11 12 17 16
12 11 17 19
B= 5 4 3
C=A-B
i need the first row in A with the first element in B
second row in A with second element in B
AND SO ON...
i need the answer to be like this
C=5 10 15 20
7 8 13 12
9 8 14 16

  0 Comments

Sign in to comment.

2 Answers

Answer by madhan ravi
on 7 May 2019

A-B(:)

  0 Comments

Sign in to comment.


Answer by KSSV
on 7 May 2019

C = A-B'

  0 Comments

Sign in to comment.