From: Bruno Luong on
Rich N <richnicholson(a)gmail.com> wrote in message <f44a9168-463e-48d4-9fbd-31c02f202803(a)w12g2000yqj.googlegroups.com>...

> Thanks, I think you meant to type
> Root = subsasgn(Root, struct('type', repmat({'.'},1,length(fields)),
> 'subs', fields), 5);

Or simply:

Root = subsasgn(Root, struct('type','.', 'subs', fields), 5)

Bruno