Code covered by the BSD License  

Highlights from
Google Earth Toolbox

image thumbnail
from Google Earth Toolbox by scott lee davis
Various plotting/drawing functions that can be saved as KML output, and loaded in Google Earth

demo_ge_surf()
function demo_ge_surf()

figure
z = peaks(30);
x = linspace(-158.5,-157.5,size(z,2));
y = linspace(20,21,size(z,1));
cLimLow = min(z(:));
cLimHigh = max(z(:));

kmlFileName = 'demo_ge_surf.kml';

surf(x,y,z);

kmlStr1 = ge_surf(x,y,z,...
            'polyAlpha','FF',...
            'lineColor','FF0000FF',...
            'lineWidth',0.1,...
              'cLimLow',cLimLow,...
             'cLimHigh',cLimHigh,...
            'vertExagg',5e3,...
          'altRefLevel',2e4,...
              'extrude',true);

              
kmlStr2 = ge_colorbar(x(end),y(1),z,...
                       'numClasses',20,...
                          'cLimLow',cLimLow,...
                         'cLimHigh',cLimHigh,...
                    'cBarFormatStr','%+07.4f');

ge_output(kmlFileName,[kmlStr1,kmlStr2],...
               'name','everybody's gone surfin');
                                           
                                           

Contact us at files@mathworks.com