Hello,
I have a 1x16 structure named jj containing another 2 structures called PixelValues and StandardDeviation. Inside PixelValues I have 16 images, where each of them contains different number of regions that contain different number of pixel intensities (for example first image consists of 21x1 structure with 21 regions, each of them with different number of pixel intensities).
Here is my code for calculating std fore this structure PixelValues that I am having trouble with:
numPix - this is a 16x1 double I created containing total number of different number of inregions of each image
numPixx - I converted it to 16x1 cell
for kk = 1:numPix
for iiii=1:numel(numPixx):1
jj(iii{iiii}).StandardDeviation(kk).Var1 = std(double([jj(iii{iiii}).PixelValues(kk).Var1]));
end
end
The problem that I have is calculating a standard deviation for all structures inside PixelValues inside my jj structure. I was able to calculate std for only the first image but I failed to calculate it for other 15. I am strugling to write a for loop that can do that thru all images inside my jj structure. My goal is to get the new structure StandardDeviation that contains separate single values of standard deviation of all those regions inside PixelValues .
I hope that I explained it for everybodu to understand. I attached 1 image to better clarify how my structures looks like.
Thanks in advance!