I have following cell array:
res{1}.nft.x=1; res{2}.nft.x=2; res{3}.nft.x=3;
How can I easily get an array of nft.x values, i.e., [1 2 3] in this case?
nft.x
[1 2 3]
Thanks!
use cellfun
cellfun
>> cellfun( @(x) x.nft.x, res )