[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with reading csv (textscan)

From: basic_coding
Subject: Re: Problems with reading csv (textscan)
Date: Mon, 19 Aug 2019 11:21:31 -0500 (CDT)

Thanks for quick answer.

So here is the simple 3 lines of code I used for the original file:
file = 'C:\......path_to_file....\messungen1'
fid = fopen(file, 'r');
[data] = textscan(fid, '%s %s %f %s %f %s %f %s %f %s %f %s %f %s %f %s %f'

As this didn't work I tried to create a simple csv with comparable content:
    2019-08-16-10:27:28 ;    value 1 ;    5.83 ;    value 2 ;    13 ;
    2019-08-16-10:27:30 ;    value 1 ;    6.73 ;    value 2 ;    14 ;

Using the follwoing code lines, I managed to read the data:
file = 'C:\......path_to_file....\filename.csv'
fid = fopen(file, 'r');
[data] = textscan(fid, '%s %s %f %s %f' ,'delimiter',';');

Sorry for the missing lines.

Sent from:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]