Matlab is deleting first row of my table and setting it as table property VariableDescription

조회 수: 22 (최근 30일)
Sorry I'm new to Matlab, maybe I'm asking dumb question but does anyone know why is Matlab setting first row of table as VariableDescription (property of table)? It is only happening when my table has only one row, when there are more row in the table it's not happening. Or does anyone know how to stop it from doing so? When this happens my table is size 0(rows)x2(colums) but it should be size of 1(rows)x2(colums)... I even tried to set 'VariableNamingRule' of table to 'preserve' as matlab were suggesting:
table = readtable('filewithtable.csv', 'VariableNamingRule', 'preserve');
But it didn't worked. Have you any tips what I can do?
  댓글 수: 1
Stephen23
Stephen23 2022년 3월 30일
@Alica Urbanová: please upload two sample files by clicking the paperclip button:
  • 1st file which has only one row
  • 2nd file which has multiple rows

댓글을 달려면 로그인하십시오.

채택된 답변

Arif Hoq
Arif Hoq 2022년 3월 29일
It should not work in that way.please try this
A=readtable('filewithtable.csv','ReadVariableName',false);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by