0% found this document useful (0 votes)
36 views25 pages

Cla Scilab 2023007 PDF

This document provides an overview of Scilab commands for calculus and linear algebra. It covers topics such as simple calculations, variables, functions, matrices, plotting, simulation, solving differential equations, and other useful Scilab functions. Sections describe how to write in the editor, work with the graphic window, use loops and tests, access matrix elements, perform operations on matrices and vectors, and calculate accuracy.

Uploaded by

Ronak Makwana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views25 pages

Cla Scilab 2023007 PDF

This document provides an overview of Scilab commands for calculus and linear algebra. It covers topics such as simple calculations, variables, functions, matrices, plotting, simulation, solving differential equations, and other useful Scilab functions. Sections describe how to write in the editor, work with the graphic window, use loops and tests, access matrix elements, perform operations on matrices and vectors, and calculate accuracy.

Uploaded by

Ronak Makwana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Calculus & Linear Algebra

Scilab Commands

1. Simple numerical calculations

Enrolment No.: 20C23007 Branch: CSN Name: Ronak Makwana


Calculus & Linear Algebra

2. Writing in editor

Enrolment No.: 20C23007 Branch: CSN Name: Ronak Makwana


Calculus & Linear Algebra

3. The graphic window

Enrolment No.: 20C23007 Branch: CSN Name: Ronak Makwana


Calculus & Linear Algebra

4. Variables

Enrolment No.: 20C23007 Branch: CSN Name: Ronak Makwana


Calculus & Linear Algebra

5. Functions

6. Display

(a) Writing: Typing the name of a variable display its value, except when there is
‘;’ at the end of the command line.

Enrolment No.: 20C23007 Branch: CSN Name: Ronak Makwana


Calculus & Linear Algebra

(b) Brackets: Matrices are defined using square brackets.

(c) Disp function

Enrolment No.: 20C23007 Branch: CSN Name: Ronak Makwana


Calculus & Linear Algebra

7. Loops

(a) Incrementation

(b) For

Enrolment No.: 20C23007 Branch: CSN Name: Ronak Makwana


Calculus & Linear Algebra

(c) While

8. Tests

(a) Comparison operators

- To test if two vectors are equal, isequal is used and ~isqual is used if they are
different

Enrolment No.: 20C23007 Branch: CSN Name: Ronak Makwana


Calculus & Linear Algebra

(b) If..then

9. 2-D plots

Enrolment No.: 20C23007 Branch: CSN Name: Ronak Makwana


Calculus & Linear Algebra

(a) Basic plots

(b) To plot a segment

Enrolment No.: 20C23007 Branch: CSN Name: Ronak Makwana


Calculus & Linear Algebra

(c) Plots of plane curves defined by functions y=f(x)

- By adding the program below, we obtain the plot of two curves, that of f in red
and that of g in green. The previous plot was cleared through the clf command
(“clear figure”)

Enrolment No.: 20C23007 Branch: CSN Name: Ronak Makwana


Calculus & Linear Algebra

(d) Plot of sequences of points

Enrolment No.: 20C23007 Branch: CSN Name: Ronak Makwana


Calculus & Linear Algebra

(e) Bivariate statistical data

10. 3-D plots

(a) Plotting Surface

Enrolment No.: 20C23007 Branch: CSN Name: Ronak Makwana


Calculus & Linear Algebra

(b) Plotting Curve

Enrolment No.: 20C23007 Branch: CSN Name: Ronak Makwana


Calculus & Linear Algebra

11. Simulation and statistics

(a) Random sequences

(b) Statistics

Enrolment No.: 20C23007 Branch: CSN Name: Ronak Makwana


Calculus & Linear Algebra

- For a bar graph representing two sets side by side

12. Accessing elements of matrix

Enrolment No.: 20C23007 Branch: CSN Name: Ronak Makwana


Calculus & Linear Algebra

(a) To view any row of matrix

(b) To view any column of matrix

(c) Transpose of matrix

13. Operations on matrix

Enrolment No.: 20C23007 Branch: CSN Name: Ronak Makwana


Calculus & Linear Algebra

14. Operations on vector

Enrolment No.: 20C23007 Branch: CSN Name: Ronak Makwana


Calculus & Linear Algebra

15. Solving linear systems

16. Sort function

Enrolment No.: 20C23007 Branch: CSN Name: Ronak Makwana


Calculus & Linear Algebra

17. Length Function

18. Sum and Product Function

Enrolment No.: 20C23007 Branch: CSN Name: Ronak Makwana


Calculus & Linear Algebra

19. Unique Function

20. Find Function

21. Accuracy Computation

(a) Example 1: Computation of sin(%pi)

Enrolment No.: 20C23007 Branch: CSN Name: Ronak Makwana


Calculus & Linear Algebra

(b) Testing if triangle is a right-angled triangle.

(c) Display

Enrolment No.: 20C23007 Branch: CSN Name: Ronak Makwana


Calculus & Linear Algebra

22. Solving Differential equations

Enrolment No.: 20C23007 Branch: CSN Name: Ronak Makwana


Calculus & Linear Algebra

23. Useful Scilab functions

Enrolment No.: 20C23007 Branch: CSN Name: Ronak Makwana


Calculus & Linear Algebra

Enrolment No.: 20C23007 Branch: CSN Name: Ronak Makwana

You might also like