Mentions légales du service

Skip to content
Snippets Groups Projects
Commit cd4a76a5 authored by Camille Mazoyer's avatar Camille Mazoyer Committed by Gildas Cambon
Browse files

support for matlab 20xx versions, in particular 2024 and more recent versions,...

parent ac0f684a
No related branches found
No related tags found
1 merge request!19support for matlab 20xx versions, in particular 2024 and more recent versions,...
...@@ -8,6 +8,8 @@ Release changelog are available here : https://gitlab.inria.fr/croco-ocean/croco ...@@ -8,6 +8,8 @@ Release changelog are available here : https://gitlab.inria.fr/croco-ocean/croco
## Fixed ## Fixed
- Preprocessing_tools : fix in mexcdf functionality for matlab 20xx versions (in particular matlab 2024), see issue [#50](https://gitlab.inria.fr/croco-ocean/croco_tools/-/issues/50)
## Changed ## Changed
## Removed ## Removed
......
...@@ -95,7 +95,9 @@ if nargin < 1, help(mfilename), return, end ...@@ -95,7 +95,9 @@ if nargin < 1, help(mfilename), return, end
% Mex-file gateway. % Mex-file gateway.
v = version; v = version;
if eval(v(1)) > 4 matversion=version('-release');
myversion=str2num(matversion(1:2));
if eval(v(1)) > 4 || myversion >= 20
fcn = 'mexcdf53'; % Matlab-5 or 6. fcn = 'mexcdf53'; % Matlab-5 or 6.
elseif eval(v(1)) == 4 elseif eval(v(1)) == 4
fcn = 'mexcdf4'; % Matlab-4 only. fcn = 'mexcdf4'; % Matlab-4 only.
......
...@@ -95,7 +95,9 @@ if nargin < 1, help(mfilename), return, end ...@@ -95,7 +95,9 @@ if nargin < 1, help(mfilename), return, end
% Mex-file gateway. % Mex-file gateway.
v = version; v = version;
if eval(v(1)) > 4 matversion=version('-release');
myversion=str2num(matversion(1:2));
if eval(v(1)) > 4 || myversion >= 20
fcn = 'mexcdf53'; % Matlab-5 or 6. fcn = 'mexcdf53'; % Matlab-5 or 6.
elseif eval(v(1)) == 4 elseif eval(v(1)) == 4
fcn = 'mexcdf4'; % Matlab-4 only. fcn = 'mexcdf4'; % Matlab-4 only.
......
...@@ -113,7 +113,9 @@ end ...@@ -113,7 +113,9 @@ end
% Mex-file gateway. % Mex-file gateway.
v = version; v = version;
if eval(v(1)) > 4 matversion=version('-release');
myversion=str2num(matversion(1:2));
if eval(v(1)) > 4 || myversion >= 20
fcn = 'mexcdf53'; % Matlab-5 or 6. fcn = 'mexcdf53'; % Matlab-5 or 6.
elseif eval(v(1)) == 4 elseif eval(v(1)) == 4
fcn = 'mexcdf4'; % Matlab-4 only. fcn = 'mexcdf4'; % Matlab-4 only.
......
...@@ -18,7 +18,9 @@ end ...@@ -18,7 +18,9 @@ end
theNCid = -sort(-theNCid); theNCid = -sort(-theNCid);
v = version; v = version;
if v(1) == '6' matversion=version('-release');
myversion=str2num(matversion(1:2));
if v(1) == '6' || myversion >= 20
fcn = 'mexcdf60'; % Matlab-6 only. fcn = 'mexcdf60'; % Matlab-6 only.
elseif v(1) == '5' elseif v(1) == '5'
fcn = 'mexcdf53'; % Matlab-5 only. fcn = 'mexcdf53'; % Matlab-5 only.
......
...@@ -12,7 +12,9 @@ function tnc4ml5 ...@@ -12,7 +12,9 @@ function tnc4ml5
% Version of 15-Apr-1997 09:50:05. % Version of 15-Apr-1997 09:50:05.
v = version; v = version;
if v(1) == '6' matversion=version('-release');
myversion=str2num(matversion(1:2));
if v(1) == '6' || myversion >= 20
fcn = 'mexcdf60'; % Matlab-6 only. fcn = 'mexcdf60'; % Matlab-6 only.
elseif v(1) == '5' elseif v(1) == '5'
fcn = 'mexcdf53'; % Matlab-5 only. fcn = 'mexcdf53'; % Matlab-5 only.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment