Azzera filtri
Azzera filtri

Find standard deviation and plot mean of three dimensional matrix

3 visualizzazioni (ultimi 30 giorni)
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));

Risposte (0)

Categorie

Scopri di più su Denoising and Compression in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by