n=100;for i=1:3000ZZ=Zf{i};DD=Df{i};Zf2=linspace(min(ZZ(:)),max(ZZ(:)),n);Df2=linspace(min(DD(:)),max(DD(:)),n);Zfr=interp1(Zf2,1:numel(Zf2),ZZ,'nearest');Dfr=interp1(Df2,1:numel(Df2),DD,'nearest');zm=accumarray([Dfr Zfr],1,[n n]);surf(zm);hold onend
This code generates the following histogram
How do I modify the x and y axis to make them go up until the max of Dfr and Zfr but still have the number of bins remain 100?
Best Answer