Argument to dynamic structure reference must evaluate to a valid field name.
Show older comments
Error in IMFEATURE (line 172)
outstats=subsasgn(outstats, s, subsref(stats, s));
Answers (1)
Voss
on 20 Mar 2022
You can avoid this error by changing this line (line 164):
s(2).subs = {requestedStats{p}};
to this:
s(2).subs = requestedStats{p};
However, you can avoid using subsref/subsasgn (and constructing the necessary substruct) entirely by changing line 172 to:
outstats(k).(requestedStats{p}) = stats(k).(requestedStats{p});
Categories
Find more on Triangulations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!