How to add two different set values .
이전 댓글 표시
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
2019년 4월 18일
편집: madhan ravi
2019년 4월 18일
A={4,5,3};
B={12};
[A{:}]+[B{:}]
댓글 수: 6
jaah navi
2019년 4월 18일
madhan ravi
2019년 4월 18일
B={sum([A{:}])}
jaah navi
2019년 4월 18일
Walter Roberson
2019년 4월 18일
B={sum([A{:}])} is valid.
jaah navi
2019년 4월 18일
madhan ravi
2019년 4월 18일
A={4,5,3}
카테고리
도움말 센터 및 File Exchange에서 Entering Commands에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!