NETCDF error in MATLAB 2023b

Hi All,
I am using MATLAB 2023b trial version and can not work with NETCDF files.
In this case I am not able to simply read one netcdf file. What is going on?
Did I miss any matlab installation file? Is it a bug version? See below
the error I get:
>> test
Error using mexcdf
## Unrecognized Matlab version.
Error in ncread (line 46)
[ncid]=mexcdf('ncopen',fname,'nc_nowrite');
Error in netcdf_load (line 15)
val = ncread(ncfile,varname);
Error in test (line 3)
netcdf_load('swa12_2_grd.nc');
>>
Thanks for any help,
Luciano

3 Kommentare

Walter Roberson
Walter Roberson am 16 Nov. 2023
odd. Question:are you using Apple Silicon?
Luciano Pezzi
Luciano Pezzi am 16 Nov. 2023
I am using Macbook and IMac (with Sonoma 14.0 OS), and the error is the same in both machines.
Tzu-Chun
Tzu-Chun am 14 Mär. 2024
I also face the same problem as yours in 2023b version on Windows 11.
Have you solved your error yet?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Takeyoshi Nagai
Takeyoshi Nagai am 4 Jul. 2024

3 Stimmen

edit ncmex.m from line 113:
% Mex-file gateway.
v = version;
if eval(v(1)) > 4
fcn = 'mexcdf53'; % Matlab-5 or 6.
elseif eval(v(1)) == 4
fcn = 'mexcdf4'; % Matlab-4 only.
elseif eval(v(1:2)) >20
fcn = 'mexcdf60'; %Matlab-2020 or later.
else
error(' ## Unrecognized Matlab version.')
end

Produkte

Version

R2023b

Gefragt:

am 15 Nov. 2023

Beantwortet:

am 4 Jul. 2024

Community Treasure Hunt

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

Start Hunting!

Translated by