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 日

0 投票

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

6 件のコメント

jaah navi
jaah navi 2019 年 4 月 18 日
I want to have the result of A in B.
A contains three sets {4} {5} {3}
Now I need to all three sets together and store it in B.So the answer will be B={12}.
madhan ravi
madhan ravi 2019 年 4 月 18 日
B={sum([A{:}])}
jaah navi
jaah navi 2019 年 4 月 18 日
when i run the following code i am getting error stating
Unbalanced or unexpected parenthesis or bracket.
could you please help me on this.
Walter Roberson
Walter Roberson 2019 年 4 月 18 日
B={sum([A{:}])} is valid.
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.
madhan ravi
madhan ravi 2019 年 4 月 18 日
A={4,5,3}

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeEntering Commands についてさらに検索

タグ

質問済み:

2019 年 4 月 18 日

コメント済み:

2019 年 4 月 18 日

Community Treasure Hunt

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

Start Hunting!

Translated by