How can I insert the values contained in a field of a nested structure into the indexes of a matrix contained in another field whithout a looping

Hello,
I am performing a segment classification and thus get a class vector for each segment. The pixel ids are contained in a nested structure as following:
d.S(1) =
ids: [845x1 double]
I would like to put the values of the class vector into a matrix like
imC(d.S(:).ids) = class(:)
whithout looping.
Thanks a lot.
Guillaume

Answers (0)

This question is closed.

Asked:

on 25 Apr 2013

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!