Find standard deviation and plot mean of three dimensional matrix
3 views (last 30 days)
Show older comments
I have image radiance data with pixel height (y) and width (x) of 150 and 120 at 151 wavenumbers (z) for each pixel. I need to find the mean radiance at each wavenumber and standard deviation. What am I doing wrong?
Data = 150x120x151 single
X = 1x151 double (wavenumbers)
StdDev=ones(1,151);
Mean=ones(1,151);
for counter=1:151
StdDev(counter)=std2(Data(:,:,counter));
Mean(counter)=mean(Data(:,:,counter));
end
figure
hold on
plot(X,Mean,'k')
plot(X,Mean(X)+StdDev(X),'r--')
plot(X,Mean(X)-StdDev(X),'r--')
hold off
I received this error:
In an assignment A(I) = B, the number of elements in B and I must be the same.
Error in StdDevSSBare (line 34)
Mean(counter)=mean(Data(:,:,counter));
0 Comments
Answers (0)
See Also
Categories
Find more on Denoising and Compression in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!