2018/04/10

Matlab: Simple structure with dot (.)

To create a basic form of structure in Matlab, simply use a dot (.) as below:

>> mystruct.name = "peter";
>> mystruct.age = 15;
>> mystruct.hobby = "swimming";
>> mystruct

mystruct =

  struct with fields:

     name: "peter"
      age: 15
    hobby: "swimming"




沒有留言:

張貼留言