ERROR MESSAGE: ??? Undefined function or method 'pcacov' for input arguments of type 'double'

I am a beginner at Matlab and I can not understand why am getting this error despite using the online MATLAB example. I don't think its a directory problem since I'm putting the code directly in the command window.
>> load hald; [pc,score,latent,tsquare] = princomp(ingredients); pc,latent
??? Undefined function or method 'princomp' for input arguments of type 'double'.
>> load hald; >> covx = cov(ingredients); >> [COEFF,latent,explained] = pcacov(covx) ??? Undefined function or method 'pcacov' for input arguments of type 'double'.
Is the default example and the function "princomp" and "pcacov" are already coming up in the function help.
My code is as follows:
X = xlsread('MCVaR.xls','Dataset','B70:O83'); [PCA, V] = pcacov(X); xlswrite('MCVaR.xls',V,'DomYieldCurve','Q70');

回答 (1 件)

Sean de Wolski
Sean de Wolski 2011 年 7 月 8 日
Do you have the statistics toolbox?
ver
at the command line to see if you have it/have it installed

カテゴリ

ヘルプ センター および File ExchangeDimensionality Reduction and Feature Extraction についてさらに検索

製品

タグ

質問済み:

2011 年 7 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by