Problem in Dimensionality reduction

1 回表示 (過去 30 日間)
chiara
chiara 2014 年 7 月 2 日
回答済み: chiara 2014 年 7 月 2 日
Hello everyone, I have an excel file and I would like to apply dimensionality reduction.
I wrote this:
%%Clean up
clc
close all
clear all
%%I/O Parameters
InputFilesPath = 'C:\Users\Federico\Desktop\Chiara\Dissertation\Matlab Program - v0\Input Files\';
InputFileName = 'leukemia modified';
OutputFilePath = 'C:\Users\Federico\Desktop\Chiara\Dissertation\Matlab Program - v0\Output Files\';
[GEData,X,vX]=xlsread(strcat(InputFilesPath,InputFileName));
GenesNumber = size(GEData,1);
dim = size(GEData,2);
vX(1,:)=[];
coeff = pca(vX);
But I am getting this error:
*Undefined function 'isnan' for input arguments of type 'cell'.
Error in pca (line 248)
nanIdx = isnan(x);
Error in testpca (line 17)
coeff = pca(vX);
Error in run (line 63)_ * * *
evalin('caller', [script ';']);*
How can I remove it? Thank you in advance

採用された回答

Titus Edelhofer
Titus Edelhofer 2014 年 7 月 2 日
Ciao Chiara,
the third return parameter from xlsread is a cell array, you will need to convert vX to a matrix using cell2mat.
Or you use the variable X instead that should be the numbers from your Excel sheet (in matrix format already).
Titus

その他の回答 (3 件)

chiara
chiara 2014 年 7 月 2 日
ok I did it but I still have the same error :(

chiara
chiara 2014 年 7 月 2 日
Ops no sorry is Solved thank youuuuuuuuuu :)))

chiara
chiara 2014 年 7 月 2 日
thank you again :)

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by