Clear Filters
Clear Filters

how to load data set from a website in matlab

26 views (last 30 days)
I want to load wine data set from
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

Answers (1)

Rashed Mohammed
Rashed Mohammed on 18 Mar 2021
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 = '';
options = weboptions('ContentType','table','ContentReader',@load);
data = webread(url,weboptions);
Load data from downloaded file
data = load('');
Hope this helps
  1 Comment
SAIKUMAR R on 16 Sep 2021
can't read such files. while loading such file it displays "error using load"

Sign in to comment.


Find more on File Operations in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!