MATLAB POLYSPACE RELEASE NOTES Uživatelský manuál Strana 88

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 240
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 87
3 Graphics
Modifying the Graph Data Source
You can link graph data to variables in your workspace. When you change
the values contained in the variables, you can then update the graph to use
thenewdatawithouthavingtocreateanewgraph. (Seealsothe
refresh
function.)
1 Define 50 points between -3π and 3π and compute their sines and cosines:
x = linspace(-3*pi,3* pi,50);
ys = sin(x);
yc = cos(x);
2 Using the plotting tools, create a graph of ys = sin(x):
figure
plottools
3 In the Figure Palette, alternate-click to sele ct x and ys in the Variable pane.
4 Right-click either selected variable and choose plot(x, ys) from the context
menu, as shown belo w.
The res ulting plot looks like this.
3-32
Zobrazit stránku 87
1 2 ... 83 84 85 86 87 88 89 90 91 92 93 ... 239 240

Komentáře k této Příručce

Žádné komentáře