How to add two different set values .
Show older comments
I ma having two different sets having the values in the following manner
A={4} {5}{3)
I want to add it together by having
B={12}.
I tried with the command B=sumA
But i am getting error.
could anyone please help me to get it
Answers (1)
madhan ravi
on 18 Apr 2019
Edited: madhan ravi
on 18 Apr 2019
A={4,5,3};
B={12};
[A{:}]+[B{:}]
6 Comments
jaah navi
on 18 Apr 2019
madhan ravi
on 18 Apr 2019
B={sum([A{:}])}
jaah navi
on 18 Apr 2019
Walter Roberson
on 18 Apr 2019
B={sum([A{:}])} is valid.
jaah navi
on 18 Apr 2019
madhan ravi
on 18 Apr 2019
A={4,5,3}
Categories
Find more on Entering Commands in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!