Create a matrix from a csv
显示 更早的评论
Hello, I have a csv file with a structure like this (or just take a look at the csv):
- name11,name21,name31
- number,number,number
- number,number,number
- ...
- name21,name22,name23
- number,number,number
- number,number,number
- ...
- name31,name32,name33
- number,number,number
- ...L ist the length of the space between two names, N is the number of matrixes.I want to save every number between two names as a separate matrix, the best would be a Lx3xN.How can I do that?
回答(1 个)
madhan ravi
2018-11-6
编辑:madhan ravi
2018-11-6
Try
readtable()
T=readtable('Testfile_1.csv');
T(:,end-2:end) %reads last three columns
类别
在 帮助中心 和 File Exchange 中查找有关 Holidays / Seasons 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!