how to load data set from a website in matlab

조회 수: 34 (최근 30일)
Aisha Ajmal
Aisha Ajmal 2021년 3월 16일
댓글: SAIKUMAR R 2021년 9월 16일
Hi,
I want to load wine data set from https://archive.ics.uci.edu/ml/datasets/wine
or https://archive.ics.uci.edu/ml/machine-learning-databases/wine/
I am not able figure out what is the right way to load this data in the Matlab. I will be thankful if someone can explain

답변 (1개)

Rashed Mohammed
Rashed Mohammed 2021년 3월 18일
Hi Aisha,
If you want to load the wine data set directly from the link, you can use the webread function, else if you want to load the wine data set after downloading the file from the link, you can use the load function. Below is the sample code for the same.
Load data directly from URL
url = 'https://archive.ics.uci.edu/ml/machine-learning-databases/wine/wine.data';
options = weboptions('ContentType','table','ContentReader',@load);
data = webread(url,weboptions);
Load data from downloaded file
data = load('wine.data');
Hope this helps
  댓글 수: 1
SAIKUMAR R
SAIKUMAR R 2021년 9월 16일
can't read such files. while loading such file it displays "error using load"

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

카테고리

Help CenterFile Exchange에서 Web Services에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by