How to get to compute the standard deviation of a multispectral vector?

1 visualización (últimos 30 días)
I have a vector that have the size of 598 x 598 x 7, where 7 is the number of bands. I need to perform some training data to work with the knnclasify command. To perform the training data I will use the normrnd command and I need to compute the mean and the standard deviation of the vector. I wrote the following code:
Data = lanread('flc1.lan'); % flc1.lan data
m = mean(Data);
Sigma = std(Data);
It seems that I can compute the mean but I get the following error on the standard deviation:
Error using var (line 65) First argument must be single or double.
Error in std (line 38) y = sqrt(var(varargin{:}));
Error in HW10 (line 14) Sigma = std(Data,0,7);
Can someone please help me with this? I don't understand what I'm doing wrong.

Respuestas (0)

Categorías

Más información sobre Measurements and Feature Extraction en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by