I want to read multiple nc files from a folder. these files are in matrix form i.e. layer wise data. i have successfully read a single file and display the attributes and also extract them. but when i tried to plot them, it ends with the error. i am new to MATLAB so i don't know what kind of error is this and how to fix it. I also have to read multiple files and create a separate data frame with desired variables. i have tried this code:`
filename='1.nc';
ncdisp(filename);
lat=ncread(filename,'latitude');
lon=ncread(filename,'longitude');
time=ncread(filename,'time');
vertical=ncread(filename,'D_vertical_profile')
mymap=pcolor(lat,lon,time)`
it comes with the error
Error using pcolor (line 57) Matrix dimensions must agree.