필터 지우기
필터 지우기

Get MatLAB to read data instead of text

조회 수: 4 (최근 30일)
Emily McLain
Emily McLain 2022년 11월 15일
댓글: Walter Roberson 2022년 11월 15일
I have some data in Excel that I'm trying to import into MatLAB. The imported file works fine, except MatLAB is recognizing the first colum as text instead of data. Essentially, MatLAB skips the first column of data and goes right to the second because it thinks the first column is text. This has really screwed up my code/data plots... Does anyone know how to get MatLAB to read text as data?

답변 (1개)

David Hill
David Hill 2022년 11월 15일
t=readtable('yourFile.csv');
  댓글 수: 1
Walter Roberson
Walter Roberson 2022년 11월 15일
readmatrix instead of readable if you want to force the first column to numeric. Or else fiddle with import options.
Or possibly the situation calls for HeaderLines

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by