a= struct('a1',{1,2,3},'a2',{4,5,6})
我怎样才能得到 1 的值;
我尝试使用返回错误的 a.a1{1}
>> a.a1{1}
??? Field reference for multiple structure elements that is followed by more reference blocks is an
error.
如何访问 1?谢谢。
编辑
A = struct{'a1',[1 2 3],'a2',[4 5 6]}
我如何访问 1. 我使用A(1).a1
但我得到1 2 3