MATLAB Answers

0

How to add two different set values .

Asked by jaah navi on 18 Apr 2019
Latest activity Commented on by 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

  0 Comments

Sign in to comment.

Tags

1 Answer

Answer by madhan ravi
on 18 Apr 2019
Edited by madhan ravi
on 18 Apr 2019

A={4,5,3};
B={12};
[A{:}]+[B{:}]

  6 Comments

B={sum([A{:}])} is valid.
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.