Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

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

1 vue (au cours des 30 derniers jours)
Gabriella Tany
Gabriella Tany le 26 Juin 2018
Clôturé : MATLAB Answer Bot le 20 Août 2021
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 commentaires
Guillaume
Guillaume le 26 Juin 2018
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 le 26 Juin 2018
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

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by