Argument to dynamic structure reference must evaluate to a valid field name.

답변 (1개)

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});

카테고리

도움말 센터File Exchange에서 Triangulations에 대해 자세히 알아보기

태그

질문:

2022년 3월 20일

답변:

2022년 3월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by