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 Comment

Hi Ahmed,
Im having the same error as you. Could you solve it? I know you comment was post so time ago.

Sign in to comment.

Answers (1)

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.

Asked:

on 16 Nov 2017

Answered:

on 15 Aug 2022

Community Treasure Hunt

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

Start Hunting!