Error using struct, too many input arguments
显示 更早的评论
Hi, I am creating a strucure as following code but get a error message saying 'Error using struct. Too many input arguments'.
cyl(1)=struct('code','x','dimensions',struct('rad',3,'height',6),'weight',7);
How can I fix this problem? Many thanks in advance!!!
1 个评论
Walter Roberson
2020-4-5
Which release are you using? That code works for me.
Also, what shows up for
which struct
I am wondering if you are accidentally invoking a third-party struct() function.
回答(1 个)
David Hill
2020-4-5
Works perfectly for me. What version of MATLAB are you using?
cyl=struct('code','x','dimensions',struct('rad',3,'height',6),'weight',7);
类别
在 帮助中心 和 File Exchange 中查找有关 Structures 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!