Code covered by the BSD License  

Highlights from
Demo files for MATLAB for Excel Users in Academia Webinar

image thumbnail

Demo files for MATLAB for Excel Users in Academia Webinar

by

 

19 Jul 2007 (Updated )

These are the demo files used in the "MATLABĀ® for Excel Users in Academia" Webinar

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

  % Copyright 2007 The MathWorks, Inc.

  %  Auto-generated by MATLAB on 29-Dec-2006 16:10:48

  % 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