when I using readtable to read .csv file all variable data get mixed, what are the reason for this and provide proper solution for this
조회 수: 4 (최근 30일)
이전 댓글 표시
data3 = readtable('daily_cloud_free_data.csv');
댓글 수: 2
채택된 답변
Stephen23
2023년 3월 21일
There is no need to change the file format when you can simply specify the delimiter when importing:
T = readtable('daily_cloud_free_data.csv', 'Delimiter',',')
T = rmmissing(T)
댓글 수: 0
추가 답변 (1개)
aakash dewangan
2023년 3월 21일
Try this format, in my work it works well :)
T = readtable('Acceleration with g 2023-03-15 23-30-50.xls');
time = (T(:,1)); % column 1
Acc = (T(:,4)); % column 4
time = table2array(time); % column 1 vector
Acc = table2array(Acc); % column 4 vector
댓글 수: 1
Stephen23
2023년 3월 21일
This code:
time = (T(:,1));
Acc = (T(:,4));
time = table2array(time);
Acc = table2array(Acc);
is simpler using the correct curly-brace indexing:
time = T{:,1};
Acc = T{:,4};
참고 항목
카테고리
Help Center 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!