How can histograms for multiple images be stored to one .mat file in Matlab?

1 view (last 30 days)
I can currently generate histograms separately but I need to store these histograms in a single file.Kindly explain.

Answers (1)

Ahmet Cecen
Ahmet Cecen on 7 Nov 2014
Edited: Ahmet Cecen on 7 Nov 2014
save('Hist.mat',Hist1,Hist2);
Or you can go memory mapped and say:
save Hist.mat Hist1 -v7.3
m = matfile('Hist.mat','Writable','True')
Then save any subsequent histograms by doing:
m.Hist2=Hist2;
m.Hist3=Hist3;
and so forth.
Or you can make a matrix out of histograms:
A=[Hist1,Hist2] % and so forth, here histograms are column vectors.
then just save A.

Community Treasure Hunt

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

Start Hunting!