Dani
Dani

Reputation: 41

Accessing and Reading Fields and Values from data<1x3 struct> after loading mat file

I'm new to Matlab. I have a mat file named info.mat. This mat file contains data <1x3 struct>. The data has two fields, ImageName and pose. Each of these fields has values. The data, fields, and values can be shown and accessed in Matlab Workspace by simply clicking on them. I have difficulties on accessing and reading these fields and values. How can I do this? Any help?

When I load the mat file. It only shows the data. It doesn't show Its fields and values.

Upvotes: 0

Views: 68

Answers (1)

Waqas Ibrahim
Waqas Ibrahim

Reputation: 153

data(1).ImageName
data(1).pose

This will give you access to first element in data. You can access the others by changing the index like data(index).

Upvotes: 0

Related Questions