Skip to content

Commit

Permalink
< R2020b compat
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Oct 18, 2020
1 parent 609cecd commit f548b49
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Fortran Namelist Reader

[![Build Status](https://travis-ci.com/scivision/fortran-namelist.svg?branch=master)](https://travis-ci.com/scivision/fortran-namelist)
![ci](https://github.com/scivision/fortran-namelist/workflows/ci/badge.svg)

Pure Python and Matlab **readers** for
[Fortran namelist](https://github.com/scivision/fortran2018-examples/tree/master/namelist)
=> dict / struct
Expand Down
4 changes: 3 additions & 1 deletion read_namelist.m
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
function params = read_namelist(filename, namelist)

arguments
filename (1,1) string {mustBeFile}
filename (1,1) string
namelist (1,1) string
end

params = struct();

assert(isfile(filename), filename + " not found.")

fid = fopen(filename);
while ~feof(fid)
line = fgetl(fid);
Expand Down

0 comments on commit f548b49

Please sign in to comment.