https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data
How can we read that kind of data set into matlab? I want just the numerical values. May be to a 4x200 matrix

 채택된 답변

Hikaru
Hikaru 2015년 1월 27일

0 개 추천

Use textscan.
FID = fopen('iris.txt')
C_data0 = textscan(FID,'%f %f %f %f %s', 200, 'Delimiter',',')
numericVector = cell2mat(C_data0(:,1:4)) %ignores the last column of strings

댓글 수: 2

Pradeep Sanjeewa
Pradeep Sanjeewa 2015년 1월 27일
Thanks a lot. it worked.
Pradeep Sanjeewa
Pradeep Sanjeewa 2015년 1월 27일
How can I get three different data matrices according to the three different classes : Iris-setosa, Iris-versicolor, Iris-virginica ?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

태그

질문:

2015년 1월 27일

댓글:

2015년 1월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by