Code covered by the BSD License  

Highlights from
Data Analysis with MATLAB for Excel Users

image thumbnail

Data Analysis with MATLAB for Excel Users

by

 

09 Mar 2007 (Updated )

Materials for public seminar of the same name (slides and demos)

myCreateFigure(zdata1)
function myCreateFigure(zdata1)
  %myCreateFigure(ZDATA1)
  %  ZDATA1:  surface zdata

  %  Auto-generated by MATLAB on 29-Dec-2006 16:10:48
  %  Copyright 2006-2009 The MathWorks, Inc.

  % Create figure
  figure1 = figure('Units','Pixels','Position',[200, 200, 800, 400]);

  % Create subplot
  subplot1 = subplot(1,2,1,'Parent',figure1);
  % Uncomment the following line to preserve the X-limits of the axes
  xlim([1 24]);
  % Uncomment the following line to preserve the Y-limits of the axes
  ylim([1 31]);
  view([-37.5 30]);
  grid('on');
  hold('all');

  % Create surf
  surf(zdata1,'Parent',subplot1,'EdgeLighting','flat','FaceLighting','none',...
    'LineWidth',1.5,...
    'FaceColor',[1 1 1],...
    'EdgeColor',[0 0 1]);

  % Create xlabel
  xlabel('hours');

  % Create ylabel
  ylabel('days');

  % Create zlabel
  zlabel('system load (MW)');

  % Create axes
  axes1 = axes('Parent',figure1,'Position',[0.5703 0.11 0.3751 0.815],...
    'Layer','top');
  % Uncomment the following line to preserve the X-limits of the axes
  xlim([1 24]);
  % Uncomment the following line to preserve the Y-limits of the axes
  ylim([1 31]);
  box('on');
  hold('all');

  % Create title
  title('System Load (MW)');

  % Create contour
  contour(zdata1,'LineColor',[0 0 0],'Fill','on','DisplayName','data',...
    'Parent',axes1);

  % Create xlabel
  xlabel('hours');

  % Create ylabel
  ylabel('days');

  % Create colorbar
  colorbar('peer',axes1);

Contact us