Transpose on ND array is not defined. Use PERMUTE instead.

Hello, I'm trying to convert a .mat file in to netcdf but stuck with the following error Transpose on ND array is not defined. Use PERMUTE instead. Any help would be much appreciated.
input_file= 'tp2d.mat'
output_file='tp2d.nc'
status=system(['rm ',' ',output_file])
ny=508
nx=449
nz=32
load 'tp2d.mat'
nccreate(output_file,'depth','Dimensions',{'r',nx,'c',ny,'z',nz},'Format','classic')
depth=Tp;
sizeofdepth=size(depth)
sizeofdepth =
508 449 32
ncwrite(output_file,'depth',depth')
Error using '
Transpose on ND array is not defined. Use PERMUTE instead.

 Accepted Answer

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!