S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

27
SCILAB: TEACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio

Transcript of S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

Page 1: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

SCILAB: TEACHING MATHEMATICS WITH A COMPUTATIONAL TOOLDavid Angulo Rubio

Page 2: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

WHAT IS SCILAB

Page 3: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

MOTIVATION

The way mathematics courses are being developed. Students have to struggle to against abstractions and do not get to see any of the applications.

Mathematical concepts are important in order to understand the results supplied by Scilab

Teaching mathematics could be definitively more effective if suitable computational methodology and software were introduced

Page 4: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

TOOLBOXES AVAILABLE

Page 5: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

SCILAB ENVIRONMENT AND BASIC FUNCTIONS

Scilab has the ability to store values, so that they can be used later

Page 6: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

COMPARISONS AND LOGICAL OPERATORS

ScilLab provides the user with a number of programming constructs very similar to those available in Fortran and other high-level languages.

Page 7: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

WORKSPACE AND WORKING DIRECTORY

Scilab Environment Visible Workspace Memory Space where all

variables and functions are stored. It’s useful to check this workspace to check

where a variable or function has been defined or not

Page 8: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

LOOPS IN SCILAB FOR

WHILE:

Page 9: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

CONDITIONAL CONSTRUCTS IN SCILAB

Page 10: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

MATRIX OPERATIONSMatrix Operations built-in into SciLab:•Addition, •Subtraction•Multiplication •Transpose •Inversion •Determinant,•Trigonometric •Logarithmic •Exponential, and many others

Page 11: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

MATRIX OPERATIONS

Page 12: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

SUB-MATRICES

Page 13: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

SELECT-CASE

SCILAB SCRIPTS OR PROGRAMS.

Type the following SCILAB script into afile called prog1.txt

Page 14: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

STATISTICS

Page 15: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

FUNCTIONS IN SCILAB

Page 16: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

FUNCTION EXAMPLE: CALCULATION OF FROBENIUS NORM OF A MATRIX

Page 17: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

PLOT COMMAND: SIMPLE X-Y PLOTSIn the solutions of linear or nonlinear equations, it is often convenientto be able to plot the function to visualize the location of the roots of the function

Page 18: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

PLOT COMMAND: SIMPLE X-Y PLOTS

Page 19: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

PLOTTING DATA IN 3D

3D GRAPHS USING GRIDS

Page 20: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

DATA FITTING AND INTERPOLATION

SIMPLE LINEAR INTERPOLATION

Page 21: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

SIMPLE LINEAR INTERPOLATION

Page 22: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

SIMPLE LINEAR INTERPOLATION

Page 23: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

POLYNOMIALS IN SCILABDEFINING A POLYNOMIAL : IDENTIFYING VARIABLE, DEGREE AND COEFFICIENTS

Page 24: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

OPERATIONS WITH POLYNOMIALS

Page 25: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

POLYNOMIAL FRACTIONS

MATRICES WITH POLYNOMIAL ELEMENTS

Page 26: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

DETERMINANT OF A POLYNOMIAL MATRIX

EVALUATING A POLYNOMIAL OR POLYNOMIAL MATRIX

Page 27: S CILAB : T EACHING MATHEMATICS WITH A COMPUTATIONAL TOOL David Angulo Rubio.

REFERENCES

Urroz, G.,2001,“Programming with SCILAB” Urroz, G.,2001,“Graphics with SCILAB” Urroz, G.,2001,“Introduccion to SCILAB” Annigeri,S.,2004,“ SCILAB: A Hands On

Introduction” Urroz, G.,2001,“Data Fitting and Interpolation

with SCILAB” Benmahammed , K.,2010,“SCILAB” Campbell, L. Chancelier,J. and Nikoukhah,

R.,2006,“Modeling and Simulation in Scilab/Scicos”