MATLAB POLYSPACE RELEASE NOTES Manuel d'utilisateur Page 105

  • 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 104
Using Basic Plotting Functions
Using Basic Plotting Functions
In this section.. .
“Creating a Plot” on page 3-49
“Plotting Multiple Data Sets in One Graph” on page 3-50
“Specifying Line Styles a nd Colors” on page 3-51
“Plotting Lines and Markers” on page 3-52
“Graphing Imaginary and Complex Data” on page 3-53
“Adding Plots to an Existing Graph” on page 3-54
“Figure Windows” on page 3-55
“Displaying M ultiple Plots in One Figure” on page 3-56
“Controlling the Axes” on page 3-58
AddingAxisLabelsandTitles”onpage3-59
“Saving Figures” on page 3-61
Creating a Plot
The plot fu ncti on has differe n t forms, depe nding on the input argum en ts. If
y is a vector, plo t(y) produces a piecewise linear g raph of the ele m ents of y
versus the index of the elements of y. If you specify two vectors as arguments,
plot(x,y) produces a graph of y versus x.
For example, these statements use the
colon operator to create a vector of
x values ranging from 0 to 2 π, compute the sine of these values, and plot
the result:
x = 0:pi/100:2*pi;
y = sin(x);
plot(x,y)
Now label the axes and add a title. The characters \pi create the symbol π.
See “text strings” in the MATLAB Reference documentation for more symbols:
xlabel('x = 0:2\pi')
ylabel('Sine of x')
3-49
Vue de la page 104
1 2 ... 100 101 102 103 104 105 106 107 108 109 110 ... 239 240

Commentaires sur ces manuels

Pas de commentaire