MATLAB POLYSPACE RELEASE NOTES Manuel d'utilisateur Page 136

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 240
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 135
3 Graphics
Specifyi
ng the Axes or Figure
MATLAB al
ways creates an axes o r figure if one does not exist when you
issue a pl
otting command. However, when you are creating a graphics M-file,
it is good
practice to explicitly create and specify the parent axes and figure,
particu
larly if others will use your program. Specifying the parent prevents
the f oll
owing problems:
Your M -f
ile o verwrites the graph in the current figure. Note that a figure
becomes
the current figure wh enever a u ser clicks it.
The curr
ent figure might be in an unexpected state and not behave as
your pro
gram expects.
The foll
owing e xa mple shows a simp le M-file th at plots a fu ncti on and the
mean of
the function over the specified range:
function myfunc(x)
% x = -10:.005 :40; Here's a value you can use for x
y = [1.5*cos(x) + 6*exp(-.1*x) + exp(.07*x).*sin(3*x)];
ym = mean(y);
3-80
Vue de la page 135
1 2 ... 131 132 133 134 135 136 137 138 139 140 141 ... 239 240

Commentaires sur ces manuels

Pas de commentaire