Accessing Values From Structure or Cell Aray
Show older comments
Hey Guyz..
I am here with another question,The problem I am facing is the accessing and utilizing the data stored in cell Array or Struct. The Project I am currently working on the calculation of centroid values stored in the struct.
I want to create a function that receives from desired struct,uses the point distance formula and calculate the distances for each and every centroid distances of whole image. I have also attached the image of that struct values....
Thanks in Advance !!!!

2 Comments
Adam
on 13 May 2015
Which part of the problem are you actually asking the question about?
g(7).Centroid
allows you to access e.g. the Centroid of the 7th element of a struct, but I assume you know that already. Also a for loop or arrayfun can work on the full array of structs. So which part of 'accessing values from structure or cell array' is the problem?
Stephen23
on 13 May 2015
Accessing data in structures is covered quite well in the documentation:
Accepted Answer
More Answers (1)
Ibraheem Salim
on 14 May 2015
0 votes
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!