1function v = infer_lqn_optget(s, f, d)
2% INFER_LQN_OPTGET Return option field s.(f), or
default d when absent/empty.
4% V = INFER_LQN_OPTGET(S, F, D) returns S.(F)
if S
is a
struct with a
5% non-empty field F, otherwise
the default value D. Small helper shared by
6%
the LQN parameter identification routines (see INFER_LQN).
8% Copyright (c) 2012-2026, Imperial College London
11if isstruct(s) && isfield(s, f) && ~isempty(s.(f))