How to calculate sum of all the possible combinations of two vector elements
14 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Davoud
am 18 Feb. 2019
Kommentiert: Ethan Duckworth
am 24 Feb. 2024
I have two vectors A and B with different lengths. The B vector always have 4 elements. How can I obtain the vector C containing sum of all the possible combinations of elements of B vector with A.
For example B= [1 2 3 4] and A= [0.1 0.2 0.3 0.4 0.5 0.6]
Then C= [1.1 1.2 1.3 1.4 1.5 1.6 2.1 2.2 2.3 2.4 2.5 2.6 3.1 3.2 3.3 3.4 3.5 3.6 4.1 4.2 4.3 4.4 4.5 4.6]
Thank you
2 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Creating and Concatenating Matrices 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!