Converting NFIES(*.dat) file to NetCDF (*.nc) files. - Undefined function or variable 'filenameext'

I am using an *.m file's function (vs_trim2nc()) to convert Delft3D output (NEFIS compliant *.dat file) to NetCDF file (*.nc) file. But when I try this I get an error message "Undefined function or variable 'filenameext'." I got vs_trim2nc.m from a trusted source (See this and this ), so hopefully, it is error free, and there may be something which I am overlooking because I am a beginner to Matlab environment. The vs_trim2nc.m and files to be converted are attached. My syntax and the error message generated is below.
>> vs_trim2nc('E:\Hohai\Delft3DWD\delft3d-course\introduction_hydrodynamics\exercises\05_curvedbend\practice1\trim-cb2a.dat')
Undefined function or variable 'filenameext'.
Error in vs_trim2nc (line 121)
OPT.title = ['NetCDF created from NEFIS-file ',filenameext(vsfile)];
I will be grateful for any kind help.
Thanks and Best Regards
Ahmed

1 件のコメント

Carlos Madrigal
Carlos Madrigal 2021 年 11 月 27 日
Hi Ahmed,
Im having the same error as you. Could you solve it? I know you comment was post so time ago.

サインインしてコメントする。

回答 (1 件)

Diego Casas
Diego Casas 2022 年 8 月 15 日

0 投票

Function "filenameext" is defined in:
If you are using functions from OpenEarthTools you will want to have the whole SVN repository on hand. You can use TortoiseSVN to clone it locally.

タグ

質問済み:

2017 年 11 月 16 日

回答済み:

2022 年 8 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by