Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- M=-1+2*rand(3) %// sample data
- [x,y]=meshgrid(0:0.5:1); %// grid for sample data
- [X,Y]=meshgrid(0:0.005:1); %// grid to interpolate onto
- IN=interp2(x,y,M,X,Y); %// interpolate data onto finer grid
- colormap(MAP)
- surf(X,Y,IN,'EdgeColor','none') %// create the surface plot
- caxis([-1 1]) %// set color axxis range
- colorbar
- shading interp
- view([0 90]) %// put view right on top of plot, looking straight down
- MAP = [...
- 0 1.000000000000000 1.000000000000000
- 0 0.952380955219269 1.000000000000000
- 0 0.904761910438538 1.000000000000000
- 0 0.857142865657806 1.000000000000000
- 0 0.809523820877075 1.000000000000000
- 0 0.761904776096344 1.000000000000000
- 0 0.714285731315613 1.000000000000000
- 0 0.666666686534882 1.000000000000000
- 0 0.619047641754150 1.000000000000000
- 0 0.571428596973419 1.000000000000000
- 0 0.523809552192688 1.000000000000000
- 0 0.476190477609634 1.000000000000000
- 0 0.428571432828903 1.000000000000000
- 0 0.380952388048172 1.000000000000000
- 0 0.333333343267441 1.000000000000000
- 0 0.285714298486710 1.000000000000000
- 0 0.238095238804817 1.000000000000000
- 0 0.190476194024086 1.000000000000000
- 0 0.142857149243355 1.000000000000000
- 0 0.095238097012043 1.000000000000000
- 0 0.047619048506021 1.000000000000000
- 0 0 1.000000000000000
- 0.047619048506021 0 0.952380955219269
- 0.095238097012043 0 0.904761910438538
- 0.142857149243355 0 0.857142865657806
- 0.190476194024086 0 0.809523820877075
- 0.238095238804817 0 0.761904776096344
- 0.285714298486710 0 0.714285731315613
- 0.333333343267441 0 0.666666686534882
- 0.380952388048172 0 0.619047641754150
- 0.428571432828903 0 0.571428596973419
- 0.476190477609634 0 0.523809552192688
- 0.523809552192688 0 0.476190477609634
- 0.571428596973419 0 0.428571432828903
- 0.619047641754150 0 0.380952388048172
- 0.666666686534882 0 0.333333343267441
- 0.714285731315613 0 0.285714298486710
- 0.761904776096344 0 0.238095238804817
- 0.809523820877075 0 0.190476194024086
- 0.857142865657806 0 0.142857149243355
- 0.904761910438538 0 0.095238097012043
- 0.952380955219269 0 0.047619048506021
- 1.000000000000000 0 0
- 1.000000000000000 0.047619048506021 0
- 1.000000000000000 0.095238097012043 0
- 1.000000000000000 0.142857149243355 0
- 1.000000000000000 0.190476194024086 0
- 1.000000000000000 0.238095238804817 0
- 1.000000000000000 0.285714298486710 0
- 1.000000000000000 0.333333343267441 0
- 1.000000000000000 0.380952388048172 0
- 1.000000000000000 0.428571432828903 0
- 1.000000000000000 0.476190477609634 0
- 1.000000000000000 0.523809552192688 0
- 1.000000000000000 0.571428596973419 0
- 1.000000000000000 0.619047641754150 0
- 1.000000000000000 0.666666686534882 0
- 1.000000000000000 0.714285731315613 0
- 1.000000000000000 0.761904776096344 0
- 1.000000000000000 0.809523820877075 0
- 1.000000000000000 0.857142865657806 0
- 1.000000000000000 0.904761910438538 0
- 1.000000000000000 0.952380955219269 0
- 1.000000000000000 1.000000000000000 0];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement