adding same size cell arrays
조회 수: 16 (최근 30일)
이전 댓글 표시
Assume I have a matrices C1,C2 as follows:
C1 = nx1 cell each cell is [5x5 double].
C2 = nx1 cell each cell is [5x5 double].
How to calculate C3 as:
C3{1,1} = C1{1,1}+C2{1,1};
C3{2,1} = C1{2,1}+C2{2,1};
.
.
C3{n,1} = C1{n,1}+C2{n,1};
using cellfun or any other method without looping
댓글 수: 0
채택된 답변
추가 답변 (1개)
Sean de Wolski
2015년 12월 28일
If you have the neural networks toolbox:
gadd(A,B)
댓글 수: 1
Greg Heath
2015년 12월 29일
command line documentation
help gadd
doc gadd
See also gsubtract, gmultiply, gdivide, gnegate.
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!