I want to subtract two different arrays from each other. how can ı do?
조회 수: 29 (최근 30일)
이전 댓글 표시
I have two TV series. An array consists of 1 column and 5 rows. My B array consists of 50 columns and 5 rows. What I want here is to subtract the value of an array in row 1 column 1 from all elements of array B in row 1. And he continues this process in turn. I tried this code for this, but it doesn't work correctly. I will be glad if you help me.
for i = 1: 5
C = B (i, :) - A (i, 1);
end
댓글 수: 1
Rik
2021년 4월 23일
Backup:
I want to subtract two different arrays from each other. how can ı do?
I have two TV series. An array consists of 1 column and 5 rows. My B array consists of 50 columns and 5 rows. What I want here is to subtract the value of an array in row 1 column 1 from all elements of array B in row 1. And he continues this process in turn. I tried this code for this, but it doesn't work correctly. I will be glad if you help me.
for i = 1: 5
C = B (i, :) - A (i, 1);
end
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!