How to get to compute the standard deviation of a multispectral vector?
조회 수: 1 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Classification에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!