How to apply Classical MDS for excel file data using matlab ?

1 回表示 (過去 30 日間)
ahmed obaid
ahmed obaid 2017 年 1 月 7 日
回答済み: Von Duesenberg 2017 年 1 月 7 日
Dear all
i have a dataset stored in excel file, i have reading my excel file data to A matrix, then i would like to apply the following requirements:
1- when used read command its only read numeric values and discard the headers of rows and columns, how to consider that where rows are instances and columns are features in my excel data.
A = xlsread('D:\test\ts.xls')
or
[num,txt,raw] = xlsread('D:\test\ts.xls')
2- when i find normalization for my input data, output doesn't show rows and columns titles.
normc(A) or Anorm = (A - min(A))/(max(A) - min(A));
3- How do we calculate Euclidean distances among rows (instances)?
4- How do we applying MDS to my matrix and plotting instances in graph .
5- how to stored output matrix such distance matrix to an excel file .
thanks for any suggestion
the following image show portion of my data where rows are 100 and columns are 20 .

採用された回答

Von Duesenberg
Von Duesenberg 2017 年 1 月 7 日
Hi, 1) column and row names should be in your txt variable. 2) it is quite normal that when you apply some computation on numeric data it does not include the corresponding text data; but you can easily retrieve it in your txt variable. 3) use the pdist function (the default distance is Euclidean). 4) look for cmdscale in the documentation. 5) you might want to apply the squareform function to the output of pdist, and then use xlswrite. Hope this helps.

その他の回答 (0 件)

カテゴリ

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