필터 지우기
필터 지우기

create a tall array from .mat files

조회 수: 4 (최근 30일)
Ben Morrow
Ben Morrow 2018년 6월 4일
댓글: Ben Morrow 2018년 8월 20일
Hey,
I have 29 arrays of size approximately 150k x 13 stored in the form of .mat labeled 1-29. I want to add an extra column to each row and then store them in a single array. I figure that the data is too large to store in memory, so I want to use a tall array. ultimately the data is to be taken from the tall array, sorted and plotted as a surface plot. I want to know if a tall array is the best way to do this or if there is an eaiser way like appending the .mats together without loading them into memory and adding the 14th coloum to them without loading into memory.
Thanks
  댓글 수: 1
Ben Morrow
Ben Morrow 2018년 6월 4일
to clarify, it is an array, datak (the same name in every .mat) contained in mat1.mat to mat29.mat

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

답변 (1개)

Nanda Gupta
Nanda Gupta 2018년 6월 8일
I understand that you would like to add a column for each row(150) in each of your MAT files(29 files). Based on the description your entire data should be around ~450Mb.
150,000 * 13 * 8 Bytes = 15600000 Bytes = 15.6 MB
15.6 MB * 29 = 452.4 MB
In this case, you will likely be able to store all this at the same time in the MATLAB workspace, unless MATLAB is explicitly showing an error for insufficient memory.
So, an easier way would be to try using arrays before Tall arrays.
  댓글 수: 1
Ben Morrow
Ben Morrow 2018년 8월 20일
I wanted to have multiple plots available of similar data sets, I got some kind of memory error. I resolved it by creating smaller .matfiles by cutting out every other data point.

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

카테고리

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