https://ww2.mathworks.cn/help/matlab/ref/struct.html

1. use as declaration

arr.field = val

% arr is now 1 x 1, with element as struct with field field

arr(n).field = val2

2. declare first

arr = struct(field1,value1,...,fieldN,valueN)

3. fields manip

对应类似python hasattr, getattr,setattr,delattr

but for struct, classdef only and both char and int are accepted as arguments

isfield

getfield

setfield

rmfield