필터 지우기
필터 지우기

Adding several variables together

조회 수: 4 (최근 30일)
Guillermo Lopez
Guillermo Lopez 2012년 4월 26일
Hi: My question is probably very simple to solve but I am having trouble with how to do it: I have three matrices (30x30) saved with the name A_1, A_2, A_3. I would like to add them together so that it gives a new variable (lets call it totalA) which is also 30x30 and has a value in each cell which has been calculated by adding for example row 1,column 1 of A_1,A_2 and A_3 together. I have tried using load and sum (A_1,A_2,A_3) but it gives me some errors. Any help would be appreciated Guillermo

채택된 답변

Daniel Shub
Daniel Shub 2012년 4월 26일
Ummm, am I missing something?
totalA = A_1+A_2+A_3;
  댓글 수: 1
Guillermo Lopez
Guillermo Lopez 2012년 4월 26일
Probably not, something very stupid which I forgot...Im sorry and thanks for the help!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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