Assigning excel data to an array via a counter
조회 수: 1 (최근 30일)
이전 댓글 표시
Folks,
Here is the code i use to assign data from the 2nd and 6th column in a spreadsheet to an array
for i=1:1:2
t(i)= data(:,5*(i-1)+1); %Time
end
However, i get the following
??? In an assignment A(I) = B, the number of elements in B and I must be the same.
I want to have an array of 2 columns to do further calcs
Thanks
What is wrong? Thanks
댓글 수: 0
채택된 답변
Azzi Abdelmalek
2014년 7월 22일
편집: Azzi Abdelmalek
2014년 7월 22일
t=zeros(size(data,1),2)
for i=1:1:2
t(:,i)= data(:,5*(i-1)+1); %Time
end
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!