Dynamischer Zugriff auf verschachtelte Felder in Matlab
(Wie) Kann ich in Matlab dynamisch auf verschachtelte Felder zugreifen? Ich habe über einen Testfall wie diesen nachgedacht:
a = struct;
a.foo.bar = [];
place = {'foo', 'bar'};
a.(place{:})
% instead of the following, which only works if know in advance
% how many elements 'place' has
a.(place{1}).(place{2})