Problem Importing Data from a CSV file

I was wondering if someone could point me in the right direction on how to import the following data from a ".csv" file.
my goal is to import this data into matlab and plot this data.
I have tried to use dlmread and csv read and it appears the issue is that the data in the time column is a string.
here is the data that I would like to import:
Time Pressure
17:59:45;261 81.845337
17:59:45;261 81.845337
17:59:45;261 81.845337
17:59:45;271 81.845337
17:59:45;281 81.845337

댓글 수: 1

Anuj Agrawal
Anuj Agrawal 2013년 5월 2일
try "importdata"... it reads data with string headers.

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

답변 (2개)

the cyclist
the cyclist 2013년 5월 2일

0 개 추천

If you have a relatively recent version of MATLAB, consider using the Import Data tool that is available on the Home tab of the developer window.
Cedric
Cedric 2013년 5월 2일

0 개 추천

You can also use TEXTREAD, as follows:
[t, p] = textread('myFile.csv', '%s %f', 'delimiter', ' ', 'headerlines', 1) ;

카테고리

태그

질문:

2013년 5월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by