I have a number of intensity profiles (saved as vectors) across the diameter of a laser beam, taken at increments along the length of the beam. I would like to generate a color plot similar to the one attached, with the vectors I have being vertical slices of this image. I have managed to get close using plot3 (second image attached) and setting hold on. With this approach the arguments of plot3 are a 1xn X vector of the distance along the diameter (same for each profile), a 1xn uniform Y vector for the increment along the beam (eg [2;2;2;2;2]), and a 1xn Z vector of the intensity. Is there some way to combine all the separate Z intensity vectors to produce an X,Y,intensity color plot, perhaps using pcolor?
MATLAB: Combine a number of vectors into a 2D color plot
2d color plotpcolor
Best Answer