How to read .csv file using textscan function ?
Show older comments
Hello guys,
I have a csv file which is attached.
I have use following code to read this but i got the error.
fbc = fopen('BC100118.CSV');
BC = textscan(fbc, '%.f-%.s-%.f,%.f:%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f');
fclose(fbc);
In this file some data also lost and that is not randomly.
I want to plot data with time.
So please help ...
Accepted Answer
More Answers (1)
madhan ravi
on 12 Dec 2018
[num,txt,raw]=xlsread('yourcsv.csv');
plot(t,num)
1 Comment
Vishnu Dhakad
on 12 Dec 2018
Categories
Find more on Graphics Object Properties in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!