Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How can I process line by line while also using iteration to find a group in the data?

조회 수: 1 (최근 30일)
I have a very large data file (.txt) and that's why I get 'Out of memory' error. I want to limit the memory by reading/ process the data line by line, but I am having dificulties with this.
My data looks something like this
1 0 0.0283709 0.00291316 0.000373098 -0.00332569 e- CB 1
1 0 0.0351616 0.00312706 0.000380735 -0.00359444 e- CB 1
1 0 0 0.00337517 0.000336677 -0.00385419 e- CB 2
1 0 0 0.00343182 0.000328684 -0.00391487 e- CB 2
I would like to select all the data that has the same number in row 9 and process the data and plot it and move on to the next number. So here in this case the first and second row will be read and processed and afterwards the iteration goes to 2 and the third and fourth column will be processed.
I looked up several things but it only reads one line of the data and processes it and not a group of the data.
If anyone has an idea how to solve this... thanks!
  댓글 수: 7
Guillaume
Guillaume 2018년 6월 26일
The best solution is to indeed use tall arrays as Stephen says. More details for the desired plots are required for us to tell you how to do it.
Are all the groups plotted on the same plot?
Gabriella Tany
Gabriella Tany 2018년 6월 26일
Already found the bug in my code, it's working now without the tall array :) Didn't want to give more details since it is unpublished data

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by