We help IT Professionals succeed at work.

# Store Double Values in Cell Array in Matlab

on
Please check the code attached ,, Kind Help me find a way to store
histogram values of Images about (200) in a variable

I m trying to store in variable called Hists1 in the code ... I have referred to this link also

http://www.mathworks.in/help/techdoc/matlab_prog/br04bw6-98.html
``````clc;
clear all;
close all;

files1 = cell(1,200);
Hists1 = cell(1,200,rand(11,11,11));

dirpath = 'D:\pinder\Sar\FinalDay\SarData';
dirInfo = dir(dirpath);
isDir = [dirInfo.isdir];
AllSARfiles = {dirInfo(~isDir).name};

%   Hist = zeros(11,11,11);

Path2Save = 'D:\pinder\Sar\FinalDay\SarData\';

for i=1:numel(AllSARfiles)

filename = AllSARfiles(i);

if strcmp('Thumbs.db',filename)

else

files1(i) = strcat(Path2Save,filename);
fn = files1{1,i};

[Hists1(i) , RGBt] = getImageHists(fn);

end

%

end
``````
Comment
Watch Question

## View Solution Only

Founder
Commented:
I solved this , I just need to change the brackets : Solution Found   , Need to use Curly Brackets
I was using small brackets .. any way Question open for discussion

Hists1 = cell(1,200,rand(11,11,11));

[Hists1{i} , RGBt] = getImageHists(fn);
Founder

Commented:
I myself have  solved it ...correctly