Excel Columns to Matlab Array
조회 수: 48 (최근 30일)
이전 댓글 표시
Hi! I am currently working on a 701x20 matrix of collected data and am trying to convert each column of data to a MATLAB array with a for loop. I am trying to avoid typing out something like this:
time = euh2(:, 1)';
li7 = euh2(:, 2)';
mg25 = euh2(:, 3)';
mg26 = euh2(:, 4)';
My data (named euh2) look like this:![Screen Shot 2019-07-08 at 14.13.39.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/228042/Screen%20Shot%202019-07-08%20at%2014.13.39.png)
![Screen Shot 2019-07-08 at 14.13.39.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/228042/Screen%20Shot%202019-07-08%20at%2014.13.39.png)
I've tried something these lines and am not having much success.
columns = zeros(1, length(euh2));
for ii = 1:20
columns(ii) = euh2(:, ii);
end
Any help would be greatly appreciated! Thank you!
댓글 수: 0
답변 (2개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!