Find standard deviation and plot mean of three dimensional matrix
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Denoising and Compression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!