Code covered by the BSD License  

Highlights from
Introduction to MATLAB® Webinar materials

Introduction to MATLAB® Webinar materials

by

 

20 Mar 2007 (Updated )

Presentation and demo materials from the live Webinar "Introduction to MATLAB®" (March 20, 2007)

mycreatefigure(time1, in1, ins1)
function mycreatefigure(time1, in1, ins1)
  %MYCREATEFIGURE(TIME1,IN1,INS1)
  %  TIME1:  vector of x data
  %  IN1:  matrix of y data
  %  INS1:  matrix of y data

  % Copyright 2007 The MathWorks, Inc.

  %  Auto-generated by MATLAB on 03-Jan-2007 11:49:39

  % Create figure
  figure1 = figure;

  % Create subplot
  subplot1 = subplot(2,1,1,'Parent',figure1,'YGrid','on','XGrid','on');
  box('on');
  hold('all');

  % Create multiple lines using matrix input to plot
  plot1 = plot(time1,in1);
  set(plot1(1),'DisplayName','in');
  set(plot1(2),'DisplayName','out');

  % Create xlabel
  xlabel('time (s)');

  % Create ylabel
  ylabel('voltage (V)');

  % Create title
  title('Raw Data');

  % Create subplot
  subplot(2,1,2,'Parent',figure1,'YGrid','on','XGrid','on');
  box('on');
  hold('all');

  % Create title
  title('Scaled Data');

  % Create multiple lines using matrix input to plot
  plot2 = plot(time1,ins1);
  set(plot2(1),'DisplayName','ins');
  set(plot2(2),'DisplayName','outs');

  % Create xlabel
  xlabel('time (s)');

  % Create ylabel
  ylabel('voltage (V)');

  % Create legend
  legend(subplot1,'show');

Contact us