how to extract the big content of a cell array?

1 回表示 (過去 30 日間)
Valeria Leto
Valeria Leto 2021 年 8 月 5 日
コメント済み: Stephen23 2021 年 8 月 10 日
Hi! I have a 2859x1 cell array. In each cell there is a content like this:
1617026479572040798,,0,,0,0,'',25.0,,,[],0,"[76, 74, 71, 78, 76, 77, 73, 76, 73, 76, 79, 154, 158, 164, 166, 149, 134, 137, 131, 124, 123, 121, 114, 121, 117, 109, 120, 117, 115, 106, 104, 110, 111, 116, 116, 114, 109, 115, 114, 110, 106, 113, 109, 114, 114, 113, 118, 107, 110, 109,.....
I would like to save the numbers it into a double array. How could I do that? Thanks
  11 件のコメント
Peter Perkins
Peter Perkins 2021 年 8 月 9 日
The problem is that once you type 1617026479572040798, you are already done for:
>> sprintf("%.20f",1617026479572040798)
ans =
"1617026479572040704.00000000000000000000"
If it's wrapped in uint64, things are OK,
>> uint64(1617026479572040798)
ans =
uint64
1617026479572040798
but then the question is how to get that into a datetime with as much precision as possible. The solution is epochtime:
>> datetime(uint64(1617026479572040798), 'convertfrom', 'epochtime','TicksPerSecond',1e9,'Epoch','1-Jan-1970','Format','dd-MMM-uuuu HH:mm:ss.SSSSSSSSS')
ans =
datetime
29-Mar-2021 14:01:19.572040798
Stephen23
Stephen23 2021 年 8 月 10 日
"Unfortunately I don't know how these data were stored. The file was given to me like this."
This contradicts your statement that "The whole file is too big to import so I selected just 3 cells."
Please upload an original file as requested. Do not upload data that you have already imported into MATLAB.
If the original file is too large to upload onto the forum, please shorten it whilst keeping its format representative.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeLarge Files and Big Data についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by