Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.23 KB | None | 0 0
  1. M=-1+2*rand(3) %// sample data
  2. [x,y]=meshgrid(0:0.5:1); %// grid for sample data
  3. [X,Y]=meshgrid(0:0.005:1); %// grid to interpolate onto
  4. IN=interp2(x,y,M,X,Y); %// interpolate data onto finer grid
  5.  
  6. colormap(MAP)
  7. surf(X,Y,IN,'EdgeColor','none') %// create the surface plot
  8. caxis([-1 1]) %// set color axxis range
  9. colorbar
  10. shading interp
  11. view([0 90]) %// put view right on top of plot, looking straight down
  12.  
  13. MAP = [...
  14. 0 1.000000000000000 1.000000000000000
  15. 0 0.952380955219269 1.000000000000000
  16. 0 0.904761910438538 1.000000000000000
  17. 0 0.857142865657806 1.000000000000000
  18. 0 0.809523820877075 1.000000000000000
  19. 0 0.761904776096344 1.000000000000000
  20. 0 0.714285731315613 1.000000000000000
  21. 0 0.666666686534882 1.000000000000000
  22. 0 0.619047641754150 1.000000000000000
  23. 0 0.571428596973419 1.000000000000000
  24. 0 0.523809552192688 1.000000000000000
  25. 0 0.476190477609634 1.000000000000000
  26. 0 0.428571432828903 1.000000000000000
  27. 0 0.380952388048172 1.000000000000000
  28. 0 0.333333343267441 1.000000000000000
  29. 0 0.285714298486710 1.000000000000000
  30. 0 0.238095238804817 1.000000000000000
  31. 0 0.190476194024086 1.000000000000000
  32. 0 0.142857149243355 1.000000000000000
  33. 0 0.095238097012043 1.000000000000000
  34. 0 0.047619048506021 1.000000000000000
  35. 0 0 1.000000000000000
  36. 0.047619048506021 0 0.952380955219269
  37. 0.095238097012043 0 0.904761910438538
  38. 0.142857149243355 0 0.857142865657806
  39. 0.190476194024086 0 0.809523820877075
  40. 0.238095238804817 0 0.761904776096344
  41. 0.285714298486710 0 0.714285731315613
  42. 0.333333343267441 0 0.666666686534882
  43. 0.380952388048172 0 0.619047641754150
  44. 0.428571432828903 0 0.571428596973419
  45. 0.476190477609634 0 0.523809552192688
  46. 0.523809552192688 0 0.476190477609634
  47. 0.571428596973419 0 0.428571432828903
  48. 0.619047641754150 0 0.380952388048172
  49. 0.666666686534882 0 0.333333343267441
  50. 0.714285731315613 0 0.285714298486710
  51. 0.761904776096344 0 0.238095238804817
  52. 0.809523820877075 0 0.190476194024086
  53. 0.857142865657806 0 0.142857149243355
  54. 0.904761910438538 0 0.095238097012043
  55. 0.952380955219269 0 0.047619048506021
  56. 1.000000000000000 0 0
  57. 1.000000000000000 0.047619048506021 0
  58. 1.000000000000000 0.095238097012043 0
  59. 1.000000000000000 0.142857149243355 0
  60. 1.000000000000000 0.190476194024086 0
  61. 1.000000000000000 0.238095238804817 0
  62. 1.000000000000000 0.285714298486710 0
  63. 1.000000000000000 0.333333343267441 0
  64. 1.000000000000000 0.380952388048172 0
  65. 1.000000000000000 0.428571432828903 0
  66. 1.000000000000000 0.476190477609634 0
  67. 1.000000000000000 0.523809552192688 0
  68. 1.000000000000000 0.571428596973419 0
  69. 1.000000000000000 0.619047641754150 0
  70. 1.000000000000000 0.666666686534882 0
  71. 1.000000000000000 0.714285731315613 0
  72. 1.000000000000000 0.761904776096344 0
  73. 1.000000000000000 0.809523820877075 0
  74. 1.000000000000000 0.857142865657806 0
  75. 1.000000000000000 0.904761910438538 0
  76. 1.000000000000000 0.952380955219269 0
  77. 1.000000000000000 1.000000000000000 0];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement