Filter löschen
Filter löschen

Reaching a specific data in txt file

1 Ansicht (letzte 30 Tage)
googo
googo am 15 Mai 2013
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!

Akzeptierte Antwort

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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Language Fundamentals finden Sie in Help Center und File Exchange

Tags

Noch keine Tags eingegeben.

Community Treasure Hunt

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

Start Hunting!

Translated by