Thank you for your help, that got me a little farther, but in order to plot this spatially how do I get the position of the grains (in x) in a matrix the same size?
Here's the code so far
ebsd = ebsd('indexed');
[grains,ebsd.grainId,ebsd.mis2mean] = calcGrains(ebsd,'angle',10*degree);
figure; plot(grains,grains.GOS);
[xy] = ginput(2)
ebsd_line=spatialProfile(ebsd,xy)
grains_on_that_line = grains(unique(ebsd_line.grainId))
plot(?????,grains_on_that_line.GOS);
Can I use the x position in centroid somehow? I tried a variety of methods but I think my syntax is wrong...
Cheers, Jessica