How to add two different set values .

1 view (last 30 days)
jaah navi
jaah navi on 18 Apr 2019
Commented: madhan ravi on 18 Apr 2019
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
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
jaah navi on 18 Apr 2019
when i run the following code
A={4} {5} {3}
B={sum([A{:}])}
I am getting error stating Unbalanced or unexpected parenthesis or
bracket with respect to the command line A={4} {5} {3}.Could you please help me on this.

Sign in to comment.

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!