Error using ' during Transpose 3D variable from .nc file (error: "Transpose on ND array is not defined. Use PERMUTE instead.")
Mostrar comentarios más antiguos
Hi all,
I am trying to transpose data using ' (e.g. A=A') but its showing error "Transpose on ND array is not defined. Use PERMUTE instead.". Could anyone help me to fix the error? For the 3D data variable I have used the following code to interpolate and to solve the problem:
File='trmm.1998.2010.nc'
rf=double(ncread(File, 'rf'));
time=double(ncread(File, 'time'));
lon=double(ncread(File, 'lon'));
rain=rf'
rain(isinf(rain)|isnan(rain))=0;
RF=griddedInterpolant({lon,flip(lat),time},flip(rain,1));
newdata=RF({LN,LT,time});
The following error is showing during riddedInterpolant command:
Error using griddedInterpolant
The grid vectors must be strictly monotonically increasing.
## THIS IS THE DATA DETAILS ##
==============
Name Size Bytes Class Attributes
lat 252x1 2016 double
lon 317x1 2536 double
rain 317x252x4748 3034313856 double
time 4748x1 37984 double
=========
5 comentarios
Rik
el 28 de En. de 2020
Is your goal to end up with a 252x317x4748 array?
Walter Roberson
el 28 de En. de 2020
What shows up for
issorted(lon)
issorted(lat)
issorted(time)
lon(1) < lon(2)
lat(1) < lat(2)
time(1) < time(2)
Soumik Ghosh
el 28 de En. de 2020
Walter Roberson
el 28 de En. de 2020
I needed to see the output of those issorted() and comparison calls .
Soumik Ghosh
el 29 de En. de 2020
Respuesta aceptada
Más respuestas (1)
Soumik Ghosh
el 28 de En. de 2020
Categorías
Más información sobre Resizing and Reshaping Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
