clear
clc
datatest = readtable('TestData_readtable.csv','Headerlines',4,'ReadVariableNames',true);
'readtable' function is getting confused about the '3-0382' and inserting addtional rows into the imported table
I tried to use 'Range' but I cannot get it to work and this would be a solution.
The data sets I have do change in column count and poitision and therfore I would also be interested if there are any other ways of dealing with this pesky hyphon.
I have tried 'rmmissing' on individual columns but this creates problems in other areas of my code and doesn't deal witht he issue at the source.
I have attached an exampel data set.
I would apreciate any support on this!

 Réponse acceptée

Ryan Byrne
Ryan Byrne le 6 Fév 2020
clear
clc
datatest = readtable('TestData_readtable.csv','Headerlines',4,'ReadVariableNames',true,'CommentStyle',{'-'});
As always in formalising the question sometime the answer emerges.

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with MATLAB dans Centre d'aide et File Exchange

Produits

Version

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by