Adding multiple elements from an array
조회 수: 1 (최근 30일)
이전 댓글 표시
I have an 8*8 table in an excel file
A
To/From 1 2 3 4 5 6 7 8
1 0.1179 0 0 0 0 0 0 0
2 0.053 0.1949 0 0 0 0 0 0
3 0.0301 0.1159 0.5868 0 0 0 0 0
4 0.0001 0.0005 0.0769 0.8234 0 0 0 0
5 0 0 0.0019 0.1961 0.818 0 0 0
6 0 0 0 0.005 0.1737 0.6902 0.0023 0
7 0 0 0 0.0007 0.0246 0.2707 0.8626 0.0275
8 0 0 0 0.0001 0.0073 0.055 0.3589 1.9761
I wanted to know how I can add all the elements in column 1 except the element (1,1). Similarly, how I can add all the elements in column 2 except (2,2), and so on.
PS: I know how to select the data I need for the first column with xlsread.
eg.
s1=xlsread(filename,1,'B4:B10');
But I don't know how to read data from column 2 without selecting element(2,2). And how to add them.
댓글 수: 0
답변 (2개)
Azzi Abdelmalek
2016년 4월 9일
You have 8x8 matrice, then read it from excel, then do whatever you want.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!