I have had zero luck finding this elsewhere on the site, so here's my problem. I loop through about a thousand mat files, each with about 10,000 points of data. I'm trying to create an overall histogram of this data, but it's not very feasible to concatenate all this data to give to hist.
I was hoping to be able to create an N and Bin variable each loop using hist (y), then N and Bin would be recalculated on the next loop iteration by using hist(y_new). And so on and so on. That way the source data doesn't grow and when the loop finally ends, I can just use bar(). If this method wouldn't work, then I am very open-minded to other solutions.
Also, it is probably not safe to assume that the x data will remain constant throughout each iteration. I'm using 2012a.
Thanks for any help!!
histc
instead ofhist
. Why is your suggested approach not working? It's unclear what you've tried and why it doesn't give the desired results... – Wolfiehistc
, then you can just add the next results into the bin totals... So you have one edges array, one bin totals array for those edges, and each step you add the bin totals for the next data set... – Wolfie