How to add two different set values .

1 次查看(过去 30 天)
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

回答(1 个)

madhan ravi
madhan ravi 2019-4-18
编辑:madhan ravi 2019-4-18
A={4,5,3};
B={12};
[A{:}]+[B{:}]
  6 个评论
jaah navi
jaah navi 2019-4-18
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by