memmapfile & char inputs

조회 수: 12 (최근 30일)
Graziano
Graziano 2011년 7월 6일
Hi all, as I have to work with a massive ammunt of data, I have decided to give a try to memmapfile. As moust of you already know this allow me to map matlab to the the file without the need to import into matlab workspace.
The issue thought is the following: the txt file i am mapping contains both strings (i know which columns contain strings) and NA. I know I can specify multiple data format but it seems there's not the possibility to specify a char class.
Can I have some hint or a workaround to solve my problem?
Thanks!
Graziano
  댓글 수: 2
Jan
Jan 2011년 7월 6일
What is "NA"?
Oleg Komarov
Oleg Komarov 2011년 7월 6일
Should be NaN/missing

댓글을 달려면 로그인하십시오.

답변 (1개)

Jan
Jan 2011년 7월 6일
MEMMAPFILE cannot handle files which contain blocks of different size, e.g. text lines with varying length. So either use MEMMAPFILE to treat the complete file as a single stream of bytes, or decide to use the standard methods for serialized file reading.
Look in the examples of "doc memmapfile".
  댓글 수: 2
Graziano
Graziano 2011년 7월 7일
Thank you very much for your answer. I do appreciate it a lot. By serialized reading do you mean functions like fread? ...
Jan
Jan 2011년 7월 7일
Yes. FREAD, FGETL, FGETS might by appropriate.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Large 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