Hi Emmeirrt,
First of all, Since you are new to MATLAB, I recommend exploring MathWorks' Self-Paced Courses. For instance, to get started with the MATLAB language and environment, Consider completing the MATLAB Onramp:
Now, The ecmwf data seems to have files in the GRIB and INDEX format. To import GRIB Files into MATLAB, You may use NetCDF/GRIB reader from File Exchange or NCTOOLBOX. These offer a collection of functions to read GRIB and netCDF files.
Here is an example using NCTOOLBOX:
%Sample data obtained from ftp://polar.ncep.noaa.gov/pub/history/waves/multi_1.at_4m.dp.200607.grb2
% create ncgeodataset object
nc=ncgeodataset('multi_1.at_4m.dp.200607.grb2');
% list variables
nc.variables
% create geovariable object
dirvar=nc.geovariable('Primary_wave_direction_degree_true_surface');
% get data at 1st time step
dir=dirvar.data(1,:,:);
% get grid at 1st time step
g=dirvar.grid_interop(1,:,:);
% plot
pcolorjw(g.lon,g.lat,dir);
title(datestr(g.time))
I hope this helps!