Filter löschen
Filter löschen

Find standard deviation and plot mean of three dimensional matrix

3 Ansichten (letzte 30 Tage)
Luke Wunderlich
Luke Wunderlich am 24 Jun. 2015
Bearbeitet: Luke Wunderlich am 24 Jun. 2015
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));

Antworten (0)

Kategorien

Mehr zu Denoising and Compression finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by