Not enough ram memory to perform a function

Hi, I'm aware that this function cannot be performed due to the dimensions of the matrices (picture attached) and not having enough ram memory, but is there any function in which Matlab could work on the data in chunks to reduce the load on the RAM? Thanks

2 Comments

Please give us the dimensions of the variables involved, and what you intend to do with the results downstream in your code.
524600x1 and 436000x1. It is part of bigger code to insert 0s in a matrix where some entries are missing.

Sign in to comment.

Answers (1)

The code you give the image for would not return an index anyhow.
I suspect that what you need is ismember(), and that possibly you might want the second output as well as the first.

2 Comments

What that should return is a n x m logic array (being n and m the respective number of rows of the two matrices TimeNumH and TimeH) that shows a 1 every time the condition is satisfied.
I have doubts that creating that matrix is going to be beneficial .
Performance on any kind of look-up using the result is going to be rather bad. It seems likely to me that you could get rather better performance by working with marginal indices and sorted arrays and binary searches, or perhaps by using containers.Map

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!