how to solve this error: Error using ' TRANSPOSE does not support N-D arrays. Use PAGETRANSPOSE/PAGECTRANSPOSE to transpose pages or PERMUTE to reorder dimensions of N-D arrays
60 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
abbas zoulikha
am 26 Nov. 2020
Kommentiert: Steven Lord
am 26 Nov. 2020
u10 = double(ncread(nc_windfile, 'u10')) ;
v10 = double(ncread(nc_windfile, 'v10')) ;
lon = double(ncread(nc_windfile, 'longitude'))';
lat =double( ncread(nc_windfile, 'latitude'))';
time_w = double(ncread(nc_windfile, 'time'));
%interpolation of component of wind from 12.5° to 1km:
%first interpolation: from 12.5 to 6 km:
[lon,lat]=meshgrid(lat,lon);
lat=lat'; lon=lon';
[yi, xi]=meshgrid(36:0.06:37,2.5:0.06:4.5);
F=griddedInterpolant({lat,lon},u10','linear');
U1 = F(yi,xi);
Error using '
TRANSPOSE does not support N-D arrays. Use PAGETRANSPOSE/PAGECTRANSPOSE to transpose pages or PERMUTE to reorder dimensions of N-D
arrays.
Error in NCAR_wind_nc11 (line 36)
F=griddedInterpolant({lat,lon},u10','linear');
i tried also to use interp2 but i get the same error
0 Kommentare
Akzeptierte Antwort
Jan
am 26 Nov. 2020
Bearbeitet: Jan
am 26 Nov. 2020
What is the size of u10 ?
u10 = double(ncread(nc_windfile, 'u10')) ;
size(u10)
If it has more than 2 dimensions, u10' is not valid - as the error message tells you.
2 Kommentare
Steven Lord
am 26 Nov. 2020
A = rand(339, 129, 124);
B = pagectranspose(A);
% Spot check one page
isequal(A(:, :, 75)', B(:, :, 75))
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!