Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
labScilab_English_Part1.doc
Скачиваний:
28
Добавлен:
07.02.2016
Размер:
2.38 Mб
Скачать

4.4 The Tasks for Self-Examination

Determine the result of the following commands:

  1. -->a=[1 2 3; 4 5 6;7 8 9]

  2. --> b1=[1; 2; 3]

  3. -->c=[a b1]

  4. --> e=[1 2 3; 4 5 ]

  5. -->b=[a(1,2:end) a(3,end-1:-1:1)]

  6. --> b2=[a(1,2:end); a(3,end-1:-1:1)]

  7. -->a[:,2]=[]

4.5 Test Questions

    1. What is SCILAB?

    2. What features provides SCILAB?

    3. What windows can you open in SCILAB?

    4. What can you do in Command Window?

    5. What is Work Space?

    6. How to save variables from workspace in file?

    7. What is variable?

    8. How many digits of accuracy have Scilab numbers?

    9. What types of variables do you know?

    10. How to create a vector-row?

    11. How to create a vector-column?

    12. Suppose n is the column vector. What result following statement: >>n’ ?

    13. How to input value from keyboard?

    14. How to input data from file?

    15. What arithmetic operations are used in SCILAB?

    16. How to change evaluation order in arithmetic expressions?

    17. What elementary mathematical functions do you know?

    18. What difference between * and .* operators?

    19. What functions for creating special matrices do you know?

5 Laboratory work № 5

creating plots in Scilab

5.1 Purpose of the Work

To study a few of the most important graphics functions and practical skills gaining of their use in the Scilab

5.2 The Task to Laboratory Work

1. Study item 5.3.

2. Repeat all examples adduced in item 5.3.

3. Carry out in Scilab the individual task - item 5.4.

4. Save the result of the work (protocol of the work, graphics) in your personal folder.

5. Draw up report.

5.3 The Basic Theoretical Knowledge

SCILAB provides a variety of functions for displaying vector data as line plots, as well as functions for annotating and printing these graphs. The following table summarizes the functions that produce basic line plots. These functions differ in the way they scale the plot's axes. Each accepts input in the form of vectors or matrices and automatically scales the axes to accommodate the data.

Table 5.1 - Basic Plotting Commands

р1оt(x,y)

- Graph 2-D data with linear scales for both axes;

loglog(x,y)

- Graph with logarithmic scales for both axes;

semilogx(x,y)

- Graph with a logarithmic scale for the x-axis and a linear scale for the y-axis;

semilogy(x,y)

- Graph with a logarithmic scale for the y-axis and a linear scale for the x-axis;

polar(φ,r)

- creates a polar coordinate plot of the angle φ versus the radius r. φ is the angle from the x-axis to the radius vector specified in radians; r is the length of the radius vector specified in dataspace units.;

plotyy(x,y,x,f)

- Graph with y-tick labels on the left and right side;

fplot(<nameFun>,limits)

- plots function between the limits specified by limits. limits is a vector specifying the x-axis limits ([xmin xmax]), or the x- and y-axis limits, ([xmin xmax ymin ymax])..

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]