Below is the c code for reading LiDar/LAS file into matlab. To compile the code, simply use
The code reads the points coordinates only. Please see the code for details.
For details of LiDar file format, please visit this link.
figure; hist(data1); hold on; %//make data1 red %//get the handle of the bars in a histogram h = findobj(gca,'Type','patch'); %//color of the bar is red and the color of the border %// of the bar is white! set(h,'FaceColor','r','EdgeColor','w'); %//data 2 use default color! hist(data2);
As suggested by Adam in the comments, there is a better way to achieve that. Thanks Adam!!
The variable h contains handles to each of the histograms. Just use “set” on each element individually.
hist(data1); hold on; hist(data2); hist(data3); h = findobj(gca,’Type’,’patch’); display(h) set(h(1),’FaceColor’,’r’,’EdgeColor’,’k’); set(h(2),’FaceColor’,’g’,’EdgeColor’,’k’); set(h(2),’FaceColor’,’b’,’EdgeColor’,’k’);