what does the following expression do?

What data structure does the first line of code create? also what do the second and third lines of code do?
Arr=[];
Arr.N=200;
Arr.R=1

 采纳的回答

It first creates ‘Arr’ as an empty array, the creates ‘Arr’ as a structure with fields ‘N’ and ‘R’, and assigns values to them.
See the documentation on Create Structure Array (link) and struct (link) for details.

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 Structures 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by