How to get field value from a struct as a variable in order to use in a code?
Show older comments
Hey all
I want to extract x and y from this struct, as a seperate variables in my workplace, in order to use them in my code.
struct with fields:
Geometry: 'Polygon'
BoundingBox: [2×2 double]
X: [1×125458 double]
Y: [1×125458 double]
please help me
thanks a lot
Accepted Answer
More Answers (2)
James Tursa
on 17 Oct 2019
Depends on your downstream code whether this is really worth it, but simply e.g.
x = yourstruct.x;
y = yourstruct.y;
BN
on 17 Oct 2019
0 votes
Categories
Find more on Structures 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!