sum matrixs after loading
이전 댓글 표시
Hi all,
I know it's a noob question and I'm sorry for that but I cannot figure it out.
This is my code:
V_I1=load('Vdef1.txt', 'V_I', '-ascii');
V_I2=load('Vdef2.txt', 'V_I', '-ascii');
V_I3=load('Vdef3.txt', 'V_I', '-ascii');
V_I4=load('Vdef4.txt', 'V_I', '-ascii');
V_I5=load('Vdef5.txt', 'V_I', '-ascii');
V_I6=load('Vdef6.txt', 'V_I', '-ascii');
V_I7=load('Vdef7.txt', 'V_I', '-ascii');
V_I8=load('Vdef8.txt', 'V_I', '-ascii');
V_I9=load('Vdef9.txt', 'V_I', '-ascii');
V_I10=load('Vdef10.txt', 'V_I', '-ascii');
for l=1:nelettrodi
for j=l+1:nelettrodi
for k=j+1:nelettrodi
V_= V_I(l)+V_I(j)+V_I(k);
I'd like V_I(j), for j=1 for example, to be the matrix V_I1 I previously loaded ( and so on for the other indexes). This way also V_ is a matrix that is the sum of the others. I searched around but I wasn't able to find the solution to this. Thanks for your help, Giorgio.
답변 (1개)
Walter Roberson
2012년 7월 23일
1 개 추천
댓글 수: 2
Giorgio Scolozzi
2012년 7월 24일
편집: Giorgio Scolozzi
2012년 7월 24일
Walter Roberson
2012년 7월 24일
for i=1:10
V_I{i} = load(['Vdef',num2str(i),'.txt'], '-ascii');
end
Then
V_{i} = V_I{l} + V_I{j} + V_I{k};
카테고리
도움말 센터 및 File Exchange에서 Just for fun에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!