Reaching a specific data in txt file

2 次查看(过去 30 天)
Hello,
suppose I have the file bbb.txt:
date intrest profit loss
24/4/2013 5 232 3232
23/4/2013 6 4224 233
>> Data = importdata('bbb.txt');
>> Data
Data =
data: [2x3 double]
textdata: {3x4 cell}
How can I reach a specific data? Suppose I want the first date or the number 5 in the first row. Thank you!

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2013-5-15
y=Data.data;
y(1,1)
  2 个评论
googo
googo 2013-5-15
How can I change all the data to be from the type of double? Thank's.
Azzi Abdelmalek
Azzi Abdelmalek 2013-5-15
z=Data.textdata
d=datenum(z(2:end,:),'dd/mm/yyyy')
out=[z y]

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Dates and Time 的更多信息

标签

尚未输入任何标签。

Community Treasure Hunt

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

Start Hunting!

Translated by