No BSD License  

Highlights from
Introduction à Matlab (deuxième édition)

from Introduction à Matlab (deuxième édition) by Jean-Thierry
tous les m-fichiers relatifs à la deuxième édition de l'Introduction à Matlab

plotsub(f, a, b, n)
function plotsub(f, a, b, n)

  x =  linspace(a, b, n);
  y =  feval(f, x); 
  subplot(2, 2, 1);  % divise l'cran en 4 et se place dans le quart haut gauche
  plot(x, y, 'y-'); 
  title('fonction','fontsize',20);
  subplot(2, 2, 2);  % se place dans le quart haut droit
  yd =  diff(y)*n/(b-a); 
  plot(x(1:end-1), yd, 'y-');
  title('drive','fontsize',20);
  subplot(2, 2, 3);  % se place dans le quart bas gauche
  yp =  (cumsum(y)-0.5*(y(1)-y))*(b-a)/n; 
  plot(x, yp, 'y-');
  title('primitive','fontsize',20);
  h=subplot(2, 2, 4);  % se place dans le quart bas gauche
  axes(h)
  set(h,'visible', 'off'); 
  text(0.1, 0.7, '\it\bfUne fonction','fontsize',20);
  text(0.1, 0.5, '\itSa drive','fontsize',20);
  text(0.1, 0.3, '\bfSa primitive','fontsize',20); 
  print -deps2 plotsub.eps
  

Contact us at files@mathworks.com