MATLAB: I have attached two csv file i want to convert “GLDAS_NOA​H10……c​sv”file in the format of “Apr-02.csv”.please provide me the code

file exchange

convert the GLDAS ……csv in the format of Apr-02.csv

Best Answer

file = 'GLDAS_NOAH10_M.A200201.021.csv' ;
[num,txt,raw] = xlsread(file) ;
lon = num(1,:) ; lon(1) = [] ;
lat = num(:,1) ; lat(1) = [] ;
A = num(2:end,2:end) ;
[X,Y] = meshgrid(lon,lat) ;
T = [X(:) Y(:) A(:)] ;
xlswrite('check.xlsx',T)
Related Question