필터 지우기
필터 지우기

how to sum matrics inside a cell array?

조회 수: 3 (최근 30일)
Kobi
Kobi 2014년 8월 6일
편집: Fatih 2014년 8월 6일
i have 4 matrics inside a cell and i need to sum them all currenyly i use this:
R=R{1}+R{2}+R{3}+R{4}
the original R is a cell with 4 matrics

답변 (1개)

Fatih
Fatih 2014년 8월 6일
편집: Fatih 2014년 8월 6일
Sorry, maybe I have not enough information. but methinks I understand you. if you want to sum all elements of matrix. please write matrix in this view.
R = [R1 R2 R3 R4];
%and after that
result = sum(sum(R));
if your matrixes arent same row lenght you cannot use this way.

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by