I want to subtract two different arrays from each other. how can ı do?
33 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
Rik
am 23 Apr. 2021
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
Antworten (1)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!