How can I zscore a matrix

조회 수: 2 (최근 30일)
Carolina Quintino
Carolina Quintino 2017년 3월 1일
답변: Star Strider 2017년 3월 1일
Hi everyone, I'm trying to do a zscore of a matrix but I'me having these errors. Error using var (line 65) First argument must be single or double.
Error in std (line 38) y = sqrt(var(varargin{:}));
Error in zscore (line 44) sigma = std(x,flag,dim);
How can I correct that? Thank you for your help.

답변 (1개)

Star Strider
Star Strider 2017년 3월 1일
If the argument to zscore is a cell array, use the cell2mat function to convert it to a double array before you pass it to the zscore function.

Community Treasure Hunt

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

Start Hunting!

Translated by